Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed QEI HIDScope biquadFilter MODSERIAL FastPWM
global.h@37:6602655a80f4, 2019-10-10 (annotated)
- Committer:
- JordanO
- Date:
- Thu Oct 10 15:33:24 2019 +0000
- Revision:
- 37:6602655a80f4
- Parent:
- 35:51914ac2d7f4
- Child:
- 38:3ff3cdb8740d
Input for motorAndSensorControl now all in structure
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
JornD | 28:4a5671b3d88d | 1 | #ifndef global_h |
JornD | 28:4a5671b3d88d | 2 | #define global_h |
JornD | 28:4a5671b3d88d | 3 | |
JordanO | 35:51914ac2d7f4 | 4 | //Structuresv |
JordanO | 37:6602655a80f4 | 5 | struct motorDataOutputSub |
JordanO | 31:d1bd16a05148 | 6 | { |
JordanO | 31:d1bd16a05148 | 7 | int counts; |
JordanO | 31:d1bd16a05148 | 8 | float angle; |
JordanO | 31:d1bd16a05148 | 9 | float velocity; |
JordanO | 31:d1bd16a05148 | 10 | }; |
JordanO | 31:d1bd16a05148 | 11 | |
JordanO | 37:6602655a80f4 | 12 | struct motorDataInputSub |
JordanO | 37:6602655a80f4 | 13 | { |
JordanO | 37:6602655a80f4 | 14 | float PWM; |
JordanO | 37:6602655a80f4 | 15 | }; |
JordanO | 37:6602655a80f4 | 16 | |
JordanO | 37:6602655a80f4 | 17 | struct motorDataCombined |
JordanO | 31:d1bd16a05148 | 18 | { |
JordanO | 37:6602655a80f4 | 19 | motorDataOutputSub output; |
JordanO | 37:6602655a80f4 | 20 | motorDataInputSub input; |
JordanO | 37:6602655a80f4 | 21 | |
JordanO | 37:6602655a80f4 | 22 | }; |
JordanO | 37:6602655a80f4 | 23 | |
JordanO | 37:6602655a80f4 | 24 | struct motorStruc |
JordanO | 37:6602655a80f4 | 25 | { |
JordanO | 37:6602655a80f4 | 26 | motorDataCombined motor1; |
JordanO | 37:6602655a80f4 | 27 | motorDataCombined motor2; |
JordanO | 37:6602655a80f4 | 28 | motorDataCombined motor3; |
JordanO | 37:6602655a80f4 | 29 | float dt; |
JordanO | 31:d1bd16a05148 | 30 | }; |
JornD | 28:4a5671b3d88d | 31 | |
JornD | 28:4a5671b3d88d | 32 | //Define global variables |
JornD | 28:4a5671b3d88d | 33 | extern double X; //Input from EMG, signal X |
JornD | 28:4a5671b3d88d | 34 | |
JornD | 28:4a5671b3d88d | 35 | //Define structures |
JordanO | 37:6602655a80f4 | 36 | extern motorStruc motorData; |
JornD | 28:4a5671b3d88d | 37 | |
JornD | 28:4a5671b3d88d | 38 | #endif |