Patrick Clary / Mbed 2 deprecated WalkingRobot

Dependencies:   CircularBuffer Servo Terminal mbed Radio

Revision:
13:1c5d255835ce
Parent:
12:a952bd74d363
Child:
15:ab358f19cf76
Child:
17:4ec59e8b52a6
--- a/RobotLeg.cpp	Tue May 21 04:27:58 2013 +0000
+++ b/RobotLeg.cpp	Tue May 21 19:58:01 2013 +0000
@@ -2,7 +2,6 @@
 
 
 
-
 RobotLeg::RobotLeg(PinName thetaPin, PinName phiPin, PinName psiPin, bool start) : theta(thetaPin, start), phi(phiPin, start), psi(psiPin, start)
 {
     setDimensions(0.1f, 0.1f, 0.0f, 0.0f);
@@ -106,7 +105,8 @@
 
 void RobotLeg::step(vector3 dest)
 {
-    stepA = getPosition();
+    position = getPosition();
+    stepA = position;
     stepB = dest;
 
     stepTimer.reset();
@@ -166,6 +166,7 @@
             state = neutral;
             stepTimer.stop();
             position = getPosition();
+            newPosition = position;
         }
         
         return true;