The subsystem design/basis for the final project
Dependencies: mbed-rtos mbed-src pixylib
robot.h@5:f655435d0782, 2016-03-25 (annotated)
- Committer:
- balsamfir
- Date:
- Fri Mar 25 13:36:14 2016 +0000
- Revision:
- 5:f655435d0782
- Parent:
- 3:dfb6733ae397
- Child:
- 6:52686c25e4af
Backup before revert
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
balsamfir | 2:2bc519e14bae | 1 | // ---------------------------------------------------------------- |
balsamfir | 2:2bc519e14bae | 2 | // Used to control the robot system |
balsamfir | 2:2bc519e14bae | 3 | // ---------------------------------------------------------------- |
balsamfir | 3:dfb6733ae397 | 4 | |
balsamfir | 5:f655435d0782 | 5 | #define X_SETPOINT 160 |
balsamfir | 5:f655435d0782 | 6 | #define HEIGHT_SETPOINT 100 |
balsamfir | 5:f655435d0782 | 7 | |
balsamfir | 5:f655435d0782 | 8 | // Global Variables |
balsamfir | 5:f655435d0782 | 9 | // ---------------------------------------------------------------- |
balsamfir | 5:f655435d0782 | 10 | extern static float leftMotor, rightMotor; |
balsamfir | 5:f655435d0782 | 11 | extern int xTracked, heightTracked; |
balsamfir | 5:f655435d0782 | 12 | extern float speed, steering; |
balsamfir | 5:f655435d0782 | 13 | |
balsamfir | 5:f655435d0782 | 14 | // PI internal variables (TODO: move to object) |
balsamfir | 5:f655435d0782 | 15 | float steeringIntegral, speedIntegral; |
balsamfir | 5:f655435d0782 | 16 | float leftMotorIntegral, rightMotorIntegral; |
balsamfir | 5:f655435d0782 | 17 | |
balsamfir | 5:f655435d0782 | 18 | // Function Prototypes |
balsamfir | 5:f655435d0782 | 19 | // ---------------------------------------------------------------- |
balsamfir | 2:2bc519e14bae | 20 | void AutoTrack(void); |
balsamfir | 2:2bc519e14bae | 21 | void ManualControl(void); |
balsamfir | 5:f655435d0782 | 22 | void RunMotor(void); |
balsamfir | 5:f655435d0782 | 23 | void RunNavigation(void); |