most functionality to splashdwon, find neutral and start mission. short timeouts still in code for testing, will adjust to go directly to sit_idle after splashdown
Dependencies: mbed MODSERIAL FATFileSystem
Diff: main.cpp
- Revision:
- 28:16c83a2fdefa
- Parent:
- 27:0a5b90cd65d6
- Child:
- 30:2964617e7676
--- a/main.cpp Wed Nov 29 22:37:47 2017 +0000 +++ b/main.cpp Fri Dec 01 22:43:14 2017 +0000 @@ -2,9 +2,38 @@ Modified 2017-11-29 revA by Troy - changelog.txt carries previous changes - Incorporated email changes and did quick bench test + 1) In FIND_NEUTRAL, add bce().setPosition_mm(bceFloatPosition) to the one-shot actions after the unpause(). + 2) NEUTRAL_FIRST_PITCH, changed batt position by half from 1.0 to 0.5. + 3) NEUTRAL_SINKING and NEUTRAL_SLOWLY_RISE are using getSetPosition now + 4) previousPosition_mm deleted (and print statements changed) + 5) NEUTRAL_SLOWLY_RISE check is using bce().getSetPosition_mm() + 6) Timers replaced with _neutral_timer variable + 7) Default timeout is 8 minutes = 480 seconds - Redid the sub-state recording method to only update on state changes Modified 2017-11-29 revB by Troy - minor print fixes + Modified 2017-11-29 revC by Troy + - removed depthTolerance variable that was not being used. + Modified 2017-11-30 revA by Troy/Dan + - Modified state RISE to setCommand to -1.0 feet (force out of water) and go to next state (float level) when above 0.5 feet + - Modified sub-state NEUTRAL_SINKING to only move 2.5 mm per cycle instead of 5 mm + - Commented out home function (accidentally hit home and got stuck while at LASR) + - Added max depth neutral and dive variables + - Print max recorded depths and current neutral buoyancy positions + Modified 2017-11-30 revB by Troy/Dan + - Dive and Multi-Dive cycles now exit to FLOAT_BROADCAST state + - FLOAT_LEVEL pitchTolerance variable increased from 1.0 degree to 5.0 degrees (PV was difficult to level in LASR pool) + - Added the ability to record the states of the FSM and print to user using keyboard "Z" + Modified 2017-12-01 revA by Troy + - Minor update to 2017-11-30 revB + - Now printing current neutral battery and BCE setpoints and max depth in neutral and dive cycle with "C" (and current sensor data) + - Pool-tested with successful dives. + 1) Dive working correctly. (And max dive tracker shows that it is reaching the correct commanded depth.) + 2) Float broadcast working correctly. (And we are now going directly from dive and rise to float broadcast.) + 3) Neutral sequence has PV diving with -10 to -20 degrees of pitch, battery command seems to be slow or inactive. + 3) Float broadcast working correctly. + 4) FSM tracker and sub-FSM tracker working. + 5) Antenna working until tail just under water (last depth recorded varies between 1.0 and 1.5 feet) */ #include "mbed.h" @@ -17,7 +46,7 @@ void setup() { pc().baud(57600); - pc().printf("\n\n\rFSG POOL TEST 2017-11-29 revB\n\n\r"); + pc().printf("\n\n\rFSG POOL TEST 2017-12-01 revA\n\n\r"); // start up the system timer systemTime().start();