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: mbed ros_lib_kinetic
Diff: initializations.cpp
- Revision:
- 6:2ffa254e8f6e
- Parent:
- 4:89ebfa37663b
- Child:
- 7:950b3c3b5a2b
--- a/initializations.cpp Mon Mar 05 23:45:59 2018 +0000 +++ b/initializations.cpp Tue Mar 06 21:44:07 2018 +0000 @@ -9,7 +9,8 @@ // Initializations void setupGimbal(){ - gimbal.servo(YAWID, YAWZERO, 50); // Set the Gimbal at the zero position. + // Set the Gimbal at the zero position. + gimbal.servo(YAWID, YAWZERO, 50); control.yaw = YAWZERO; wait(0.1); gimbal.servo(PITCHID, PITCHZERO, 50); @@ -34,9 +35,11 @@ currentPosition = 0; stopHallInt(); wait(0.1); + // Lift up from stalling position liftDirection.write(LIFTUP); liftSpeed.write(0.3); wait(0.1); + //Stop liftSpeed.write(0); } @@ -47,11 +50,11 @@ nh.subscribe(sub); } -void startHallInt() { +void startHallInt() { // Starting hall effect timer interrupt hallInt.attach(&hallInterrupt, 0.03); } -void stopHallInt() { +void stopHallInt() { // Stopping hall effect timer interrupt hallInt.detach(); }