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: main.cpp
- Revision:
- 13:1c5d255835ce
- Parent:
- 12:a952bd74d363
- Child:
- 14:21f932d6069d
diff -r a952bd74d363 -r 1c5d255835ce main.cpp
--- a/main.cpp Tue May 21 04:27:58 2013 +0000
+++ b/main.cpp Tue May 21 19:58:01 2013 +0000
@@ -30,6 +30,8 @@
RobotLeg legC(p19, p11, p8, false);
RobotLeg legD(p25, p24, p23, false);
+
+
CmdHandler* legpos(Terminal* terminal, const char*)
{
char output[256];
@@ -84,16 +86,6 @@
-void resetLegs()
-{
- legA.reset(-0.6f);
- legB.reset(-0.1f);
- legC.reset(0.4f);
- legD.reset(0.9f);
-} // resetLegs()
-
-
-
void setupLegs();
@@ -143,7 +135,7 @@
yaxis = -0.0078125f * deadzone((int8_t)((radio.rx_controller>>8)&0xff), 8);
turnaxis = -0.0078125f * deadzone((int8_t)((radio.rx_controller>>16)&0xff), 8);
- turnaxis = 0.1f;
+ yFixeaxis = 1.0f;
// Get delta-time
deltaTime = deltaTimer.read();
@@ -237,7 +229,7 @@
legC.phi.calibrate(1930, 1050, 70.0f, -45.0f);
legC.psi.calibrate(1100, 2000, 70.0f, -60.0f);
legD.theta.calibrate(2000, 1070, 45.0f, -45.0f);
- legD.phi.calibrate(1930, 1050, 70.0f, -45.0f);
+ legD.phi.calibrate(1910, 970, 70.0f, -45.0f);
legD.psi.calibrate(1020, 1900, 70.0f, -60.0f);
// Initialize leg position deltas
@@ -264,5 +256,8 @@
legC.psi.enable(); wait(0.1f);
legD.psi.enable(); wait(0.1f);
wait(0.4f);
- resetLegs();
+ legA.reset(-0.6f);
+ legB.reset(-0.1f);
+ legC.reset(0.4f);
+ legD.reset(0.9f);
}