Controlor for Humanoid. Walking trajectory generator, sensor reflection etc.

Dependencies:   Adafruit-PWM-Servo-Driver MPU6050 RS300 mbed

Revision:
23:0927e605af4b
Parent:
22:bf5aa20b9df0
--- a/Console.cpp	Fri Sep 06 08:36:21 2013 +0000
+++ b/Console.cpp	Fri Nov 22 00:30:42 2013 +0000
@@ -51,6 +51,25 @@
     return val;
 }
 
+float Console::get_float_cr()
+{
+    stringstream sstr;
+    serial->printf("Enter the float parameter. And push Enter.: \r\n");
+    while (1) {
+        uint8_t tmp = getc_wait();
+        serial->printf("%c", tmp);
+        if (tmp == '\r') {
+            serial->printf("\r\n");
+            break;
+            }
+        sstr << tmp;
+    }
+    float val;
+    sstr >> val;
+    serial->printf("parameter:%f \r\n", val);
+    return val;
+}
+
 uint8_t Console::getc_wait()
 {
     while (!serial->readable());
@@ -72,6 +91,14 @@
     serial->printf(str);
 }
 
+void Console::showOnline(OnlineMotion* on) {
+	serial->printf("T:%f\r\n", on->T);
+	serial->printf("h:%f\r\n", on->h);
+	serial->printf("side:%f\r\n", on->side);
+	serial->printf("stride:%f\r\n", on->stride);
+	serial->printf("up:%f\r\n", on->up);
+}
+
 /*uint16_t Console::readint()
 {
     uint8_t buff[2];
@@ -89,4 +116,4 @@
     buff[1] = (uint8_t)(val >> 8);
     pc.putc(buff[0]);
     pc.putc(buff[1]);
-}*/
\ No newline at end of file
+}*/