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
System/StaticDefs.hpp@92:52a91656458a, 2019-05-13 (annotated)
- Committer:
- joel_ssc
- Date:
- Mon May 13 19:25:26 2019 +0000
- Revision:
- 92:52a91656458a
- Parent:
- 87:6d95f853dab3
version for first flight test, timeouts not yet set correctly
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
tnhnrl | 45:16b8162188ca | 1 | #ifndef AUTOPILOTSTATICDEFS_H_ |
tnhnrl | 45:16b8162188ca | 2 | #define AUTOPILOTSTATICDEFS_H_ |
tnhnrl | 45:16b8162188ca | 3 | |
tnhnrl | 45:16b8162188ca | 4 | #include "mbed.h" |
tnhnrl | 45:16b8162188ca | 5 | #include "MODSERIAL.h" |
tnhnrl | 45:16b8162188ca | 6 | #include "ltc1298.hpp" |
tnhnrl | 45:16b8162188ca | 7 | #include "LinearActuator.hpp" |
tnhnrl | 45:16b8162188ca | 8 | #include "IMU.h" |
tnhnrl | 45:16b8162188ca | 9 | #include "omegaPX209.hpp" |
tnhnrl | 45:16b8162188ca | 10 | #include "PosVelFilter.hpp" |
tnhnrl | 45:16b8162188ca | 11 | #include "OuterLoop.hpp" |
tnhnrl | 45:16b8162188ca | 12 | #include "StateMachine.hpp" |
tnhnrl | 45:16b8162188ca | 13 | |
tnhnrl | 45:16b8162188ca | 14 | #include "ConfigFileIO.hpp" |
tnhnrl | 45:16b8162188ca | 15 | #include "SequenceController.hpp" |
tnhnrl | 45:16b8162188ca | 16 | #include "MbedLogger.hpp" |
tnhnrl | 79:3688c3a0d7f4 | 17 | #include "SDFileSystem.h" |
tnhnrl | 45:16b8162188ca | 18 | #include "ServoDriver.hpp" |
tnhnrl | 73:f6f378311c8d | 19 | #include "Gui.hpp" |
tnhnrl | 73:f6f378311c8d | 20 | #include "Sensors.hpp" |
tnhnrl | 45:16b8162188ca | 21 | |
tnhnrl | 45:16b8162188ca | 22 | //Declare static global variables using 'construct on use' idiom to ensure they are always constructed correctly |
tnhnrl | 45:16b8162188ca | 23 | // and avoid "static initialization order fiasco". |
tnhnrl | 45:16b8162188ca | 24 | |
tnhnrl | 45:16b8162188ca | 25 | Timer & systemTime(); |
tnhnrl | 45:16b8162188ca | 26 | Ticker & pulse(); |
tnhnrl | 45:16b8162188ca | 27 | |
tnhnrl | 74:d281aaef9766 | 28 | //MODSERIAL & pc(); |
tnhnrl | 74:d281aaef9766 | 29 | MODSERIAL & xbee(); |
tnhnrl | 45:16b8162188ca | 30 | |
tnhnrl | 45:16b8162188ca | 31 | LocalFileSystem & local(); |
tnhnrl | 45:16b8162188ca | 32 | |
tnhnrl | 45:16b8162188ca | 33 | SpiADC & adc(); |
tnhnrl | 45:16b8162188ca | 34 | LinearActuator & bce(); |
tnhnrl | 45:16b8162188ca | 35 | LinearActuator & batt(); |
tnhnrl | 45:16b8162188ca | 36 | |
tnhnrl | 45:16b8162188ca | 37 | omegaPX209 & depth(); |
tnhnrl | 45:16b8162188ca | 38 | OuterLoop & depthLoop(); |
tnhnrl | 45:16b8162188ca | 39 | |
tnhnrl | 45:16b8162188ca | 40 | IMU & imu(); |
joel_ssc | 87:6d95f853dab3 | 41 | Sensors & sensors(); |
joel_ssc | 87:6d95f853dab3 | 42 | |
tnhnrl | 45:16b8162188ca | 43 | OuterLoop & pitchLoop(); |
tnhnrl | 45:16b8162188ca | 44 | |
tnhnrl | 45:16b8162188ca | 45 | StateMachine & stateMachine(); |
tnhnrl | 45:16b8162188ca | 46 | |
tnhnrl | 45:16b8162188ca | 47 | MbedLogger & mbedLogger(); //internal memory log files |
tnhnrl | 45:16b8162188ca | 48 | |
tnhnrl | 80:4e5d306d695b | 49 | //SDFileSystem & sd_card(); //SD card file system |
joel_ssc | 87:6d95f853dab3 | 50 | //MbedLogger & sdLogger(); //sd log files |
tnhnrl | 45:16b8162188ca | 51 | |
tnhnrl | 45:16b8162188ca | 52 | ConfigFileIO & configFileIO(); |
tnhnrl | 45:16b8162188ca | 53 | |
tnhnrl | 45:16b8162188ca | 54 | SequenceController & sequenceController(); |
joel_ssc | 82:0981b9ada820 | 55 | LegController & legController(); |
tnhnrl | 45:16b8162188ca | 56 | |
tnhnrl | 45:16b8162188ca | 57 | //servo driver |
tnhnrl | 52:f207567d3ea4 | 58 | ServoDriver & rudder(); //new 06/06/2018 |
tnhnrl | 54:d4990fb68404 | 59 | OuterLoop & headingLoop(); //change 06/08/2018 |
joel_ssc | 87:6d95f853dab3 | 60 | OuterLoop & altimLoop(); //change 03may2019 |
tnhnrl | 45:16b8162188ca | 61 | |
tnhnrl | 45:16b8162188ca | 62 | // leds for debugging, global for use in any function |
tnhnrl | 45:16b8162188ca | 63 | DigitalOut & led1(); |
tnhnrl | 45:16b8162188ca | 64 | DigitalOut & led2(); |
tnhnrl | 45:16b8162188ca | 65 | DigitalOut & led3(); |
tnhnrl | 45:16b8162188ca | 66 | DigitalOut & led4(); |
joel_ssc | 87:6d95f853dab3 | 67 | DigitalIn & motorDisconnect(); // is this right? is it basically global? |
tnhnrl | 45:16b8162188ca | 68 | |
tnhnrl | 73:f6f378311c8d | 69 | Gui & gui(); |
tnhnrl | 73:f6f378311c8d | 70 | |
tnhnrl | 45:16b8162188ca | 71 | #endif |