Generation 3 of the Harp project
Dependencies: Servo TMP36 GZ buffered-serial1 chan_fatfs_sd nmea_parser watchdog mbed-rtos mbed
Fork of HARP2 by
Diff: main.cpp
- Revision:
- 31:b9ac7d61b15b
- Parent:
- 30:b81274979e73
- Child:
- 32:4f811b397720
--- a/main.cpp Thu Jan 17 01:44:32 2013 +0000 +++ b/main.cpp Thu Jan 17 18:09:16 2013 +0000 @@ -3,7 +3,6 @@ * * TODO: Test Servo Code * Test Watchdog Timer -* Test Append file and f_size() macro */ #include "mbed.h" @@ -210,7 +209,7 @@ queue_sensor_line.put(message); sensor_wd = true; // kick the dog - Thread::wait(500); + Thread::wait(200); } } @@ -229,18 +228,12 @@ left_s.calibrate_min(SERVO_L_MIN); right_s.calibrate_max(SERVO_R_MAX); right_s.calibrate_min(SERVO_R_MIN); - - // TODO: Calibrate release servo + release_s.calibrate_max(SERVO_RELEASE_MAX); + release_s.calibrate_min(SERVO_RELEASE_MIN); left_s = 0.0; right_s = 0.0; - - // TODO: Move release servo in and out to allow attachment on startup - release_s = 0.0; // NOT TESTED! - Thread::wait(1000); - parachute_wd = true; // kick the dog - Thread::wait(1000); - release_s = 1.0; + release_s = 0.0; //////////////////////////////////////////////////////////////////////////////// @@ -258,7 +251,10 @@ parachute_wd = true; // kick the dog if(!is_released) - release_s = 0.0; // let go of the balloon (NOT Tested) + { + release_s = 1.0; // let go of the balloon + is_released = true; + } if(counter < test_length) // test flight -- (NOT Tested) {