update with altimeter, swimfile.txt endleg.txt, etc see changes_13sep.txt also reset_PI()
Dependencies: mbed MODSERIAL FATFileSystem
Diff: main.cpp
- Revision:
- 49:47ffa4feb6db
- Parent:
- 48:20e681885161
- Child:
- 50:1d59ea7c7a1c
--- a/main.cpp Thu Feb 15 04:01:57 2018 +0000 +++ b/main.cpp Thu Feb 15 23:07:25 2018 +0000 @@ -22,8 +22,15 @@ - Data logging on SD card and MBED working simultaneously - State Machine is being used to transmit data over Xbee instead of a separate ticker - Servo driver tested separately in FSG_servo_test program (verified servo works separately) - - Electrical issue with PWM signal interfering with motor driver signal (disabled for now) - - + - Electrical issue with PWM signal interfering with motor driver signal (disabled servo for now) + - Ability to erase MBED (only the MBED) log file through keyboard console + Modified 2018-02-15 revA by Troy + - Made minor changes including cleaning up some functions + Modified 2018-02-15 revB by Troy + - Modified StateMachine class to include manual motor-driving mode and FSM-driven battery and buoyancy engine motor inner loops (CHECK_TUNING) + - Fixed some on-screen printouts in the StateMachine class + - Added CHECK_TUNING state to MbedLogger printouts to MBED and SD card + - Pool tested code worked with several dives. Neutral was BCE: 162 mm, BATT: 36 mm with CHECK_TUNING state; FIND_NEUTRAL (auto-tune) produced 161.0 and 34 mm */ #include "mbed.h" @@ -41,7 +48,7 @@ void setup() { pc().baud(57600); - pc().printf("\n\n\rFSG POOL TEST 2017-12-21 revA\n\n\r"); + pc().printf("\n\n\rFSG POOL TEST 2017-02-15 revA\n\n\r"); //setup data logger baud rate and write the start of the program (every time you reset) datalogger().baud(57600); @@ -108,9 +115,6 @@ // setup the data logger rate log_loop_rate_ticker.attach(&log_loop_trigger, 1.0); // fires the ticker at 1 Hz rate (every second) - - //create the MBED log file (current log file) - //mbedLogger().openFile(); //set time of logger (to current or close-to-current time) mbedLogger().setLogTime(); @@ -119,21 +123,6 @@ //create log files if not present on file system mbedLogger().initializeLogFile(); sdLogger().initializeLogFile(); - - pc().printf("Size of ConfigFile: %d\n\r", sizeof(ConfigFile)); - pc().printf("Size of ConfigFileIO: %d\n\r", sizeof(ConfigFileIO)); - pc().printf("Size of IMU: %d\n\r", sizeof(IMU)); - pc().printf("Size of LinearActuator: %d\n\r", sizeof(LinearActuator)); - pc().printf("Size of LTC1298 (SpiADC): %d\n\r", sizeof(SpiADC)); - pc().printf("Size of MbedLogger: %d\n\r", sizeof(MbedLogger)); - pc().printf("Size of omegaPX209: %d\n\r", sizeof(omegaPX209)); - pc().printf("Size of OuterLoop: %d\n\r", sizeof(OuterLoop)); - pc().printf("Size of PIDController: %d\n\r", sizeof(PIDController)); - pc().printf("Size of PololuHBridge: %d\n\r", sizeof(PololuHBridge)); //fix this class - pc().printf("Size of PosVelFilter: %d\n\r", sizeof(PosVelFilter)); - pc().printf("Size of SequenceController: %d\n\r", sizeof(SequenceController)); - pc().printf("Size of ServoDriver: %d\n\r", sizeof(ServoDriver)); - pc().printf("Size of StateMachine: %d\n\r", sizeof(StateMachine)); } int main() {