Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: CircularBuffer Servo Terminal mbed Radio
Diff: RobotLeg.cpp
- Revision:
- 13:1c5d255835ce
- Parent:
- 12:a952bd74d363
- Child:
- 15:ab358f19cf76
- Child:
- 17:4ec59e8b52a6
diff -r a952bd74d363 -r 1c5d255835ce RobotLeg.cpp
--- 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;