cansat program (version 1)
Dependencies: ADXL345_I2C BME280 Cansat2016 MBed_Adafruit-GPS-Library VNH5019 mbed
Fork of Cansat2016_v1 by
Diff: main.cpp
- Revision:
- 3:3d5f5e6ef385
- Parent:
- 2:5217160fea23
- Child:
- 4:40fe9bdb34fc
--- a/main.cpp Thu Jul 28 06:09:03 2016 +0000 +++ b/main.cpp Thu Jul 28 07:08:19 2016 +0000 @@ -60,7 +60,7 @@ Timer GPS_Timer; const int GPS_time = 1000; Timer fall_Timer; -const int fall_time = 30000; +const int fall_time = 3000; Timer action_Timer; const int action_time = 500; Timer stuck_Timer; @@ -165,7 +165,7 @@ } if(stuck_flag == 1) { - if(back_Timer.read_ms() <= 15000) { + if(back_Timer.read_ms() <= 10000) { if(back_Timer.read_ms()<= back_time) { cansat.set_action('b'); } else { @@ -192,9 +192,9 @@ if(!(d-0.15 <= cansat.get_distance() && cansat.get_distance() <= d+0.15)) { stuck_Timer.reset(); } - if(c != cansat.get_compass('r')) { + /*if(c != cansat.get_compass('r')) { stuck_Timer.reset(); - } + }*/ // stuck if(stuck_Timer.read_ms() >= stuck_time) {