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: SequenceController/SequenceController.cpp
- Revision:
- 85:dd8176285b6e
- Parent:
- 82:0981b9ada820
- Child:
- 86:ba3a118b0080
--- a/SequenceController/SequenceController.cpp Tue Feb 19 20:11:43 2019 +0000 +++ b/SequenceController/SequenceController.cpp Mon Feb 25 21:26:34 2019 +0000 @@ -237,15 +237,15 @@ else {return 0; } } -legStruct LegController::load_def_leg() { +legStruct LegController::load_def_leg() { // default leg structure and if used, will NOT start leg mode legStruct loadStruct; - loadStruct.title = "leg"; - loadStruct.state = LEG_POSITION_DIVE; + loadStruct.title = "sit_idle"; + loadStruct.state = SIT_IDLE ; // LEG_POSITION_DIVE; loadStruct.max_depth = 15; loadStruct.min_depth = 5; - loadStruct.yo_time = 200; - loadStruct.timeout = 1800; + loadStruct.yo_time = 100; + loadStruct.timeout = 600; loadStruct.heading = 90; return loadStruct; } @@ -260,7 +260,7 @@ char bux2[256]; /* CONVERT STRING TO CHAR ARRAY */ - /* DIVE */ + /* leg position DIVing */ //this can only be in the first position if ((signed int) randomstring.find("leg") != -1) { loadStruct.title = "leg"; @@ -268,15 +268,15 @@ sprintf(bux2, "\n\r process leg file: found leg label, setting state to LEG_POSITION_DIVE"); mbedLogger().appendDiagFile(bux2,3); } - /* DIVE */ + /* LPD */ - /* PITCH */ + /* neutral */ if ((signed int) randomstring.find("neutral") != -1) { loadStruct.title = "neutral"; xbee().printf("\n\rLOAD neutral. %d", randomstring.find("neutral")); loadStruct.state = FIND_NEUTRAL; } - /* PITCH */ + /* neutral */ /* EXIT */ if ((signed int) randomstring.find("exit") != -1) { @@ -362,7 +362,7 @@ } /* PAUSE */ - /* TIME TO FLOAT */ + /* TIME TO maintain leg yo-yo operations */ if ((signed int) randomstring.find("timeout") != -1) { int time_pos = randomstring.find("timeout") + 8; //position of timeout + "timeout=" so 8