
Basic Mid-Level control for the rebuilt MorphGI control unit, using PWM to communicate with the low level controllers.
Dependencies: ros_lib_kinetic
MLSettings.h@28:8e0c502c1a50, 2019-02-06 (annotated)
- Committer:
- WD40andTape
- Date:
- Wed Feb 06 16:10:18 2019 +0000
- Revision:
- 28:8e0c502c1a50
- Parent:
- 27:6853ee8ffefd
- Child:
- 29:10a5cf37a875
Tested and working (separate from HL).
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dofydoink | 12:595ed862e52f | 1 | // MLSettings.h |
dofydoink | 12:595ed862e52f | 2 | |
dofydoink | 12:595ed862e52f | 3 | #ifndef MLSETTINGS_H |
dofydoink | 12:595ed862e52f | 4 | #define MLSETTINGS_H |
dofydoink | 12:595ed862e52f | 5 | |
dofydoink | 12:595ed862e52f | 6 | // GENERAL SETTINGS |
dofydoink | 12:595ed862e52f | 7 | const unsigned short int N_CHANNELS = 8; // Number of channels to control |
dofydoink | 12:595ed862e52f | 8 | // 1-3: front segment; 4-6: rear segment; 7-8: mid segment |
WD40andTape | 28:8e0c502c1a50 | 9 | const int BAUD_RATE = 115200; //9600; //115200 |
dofydoink | 12:595ed862e52f | 10 | |
dofydoink | 12:595ed862e52f | 11 | // HL COMMUNICATION SETTINGS |
dofydoink | 12:595ed862e52f | 12 | const bool IS_PRINT_OUTPUT = false; |
dofydoink | 12:595ed862e52f | 13 | const bool IS_DHCP = false; |
WD40andTape | 28:8e0c502c1a50 | 14 | const unsigned short int HL_COMMS_FREQ_HZ = 100; // Frequency at which communications can happen with HL, if messages are waiting |
WD40andTape | 24:bc852aa89e7a | 15 | |
WD40andTape | 24:bc852aa89e7a | 16 | // REAL TIME FREQUENCIES |
WD40andTape | 28:8e0c502c1a50 | 17 | const short int SENSOR_FEEDBACK_HZ = 20; // Frequency at which sensor messages are queued / published to HL |
WD40andTape | 27:6853ee8ffefd | 18 | const float LL_DEMANDS_FREQ_HZ = 50; |
dofydoink | 12:595ed862e52f | 19 | const unsigned int LOW_LEVEL_SPI_FREQUENCY = 10000000; |
dofydoink | 12:595ed862e52f | 20 | |
WD40andTape | 26:7c59002c9cd7 | 21 | const float MAX_PRESSURE_LIMIT = 10.0; |
WD40andTape | 26:7c59002c9cd7 | 22 | |
dofydoink | 12:595ed862e52f | 23 | // PATH GENERATION SETTINGS |
WD40andTape | 27:6853ee8ffefd | 24 | const float MAX_ACTUATOR_LIMIT_MM = 40.0; |
WD40andTape | 26:7c59002c9cd7 | 25 | const float MAX_ACTUATOR_LENGTH_MM = 52.2; |
dofydoink | 12:595ed862e52f | 26 | const float MAX_SPEED_MMPS = 24.3457; |
dofydoink | 12:595ed862e52f | 27 | //const float FLT_MAX_CHAMBER_LENGTHS_MM[N_CHANNELS] = {80.0,80.0,80.0,80.0,80.0,80.0,80.0,80.0}; |
WD40andTape | 27:6853ee8ffefd | 28 | //const float FLT_ACTUATOR_CONVERSION[N_CHANNELS] = {1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0}; // Convert from chamber lengths to actuator |
WD40andTape | 27:6853ee8ffefd | 29 | const float FLT_PATH_TOLERANCE_MM = 0.1; // Maximum achievable mm path tolerance |
dofydoink | 12:595ed862e52f | 30 | |
dofydoink | 12:595ed862e52f | 31 | #endif |