This is some awesome robot code
Dependencies: mbed-rtos mbed QEI
Fork of ICRSEurobot13 by
Processes/MotorControl/MotorControl.h@62:78d99b781f02, 2013-04-14 (annotated)
- Committer:
- madcowswe
- Date:
- Sun Apr 14 12:57:04 2013 +0000
- Revision:
- 62:78d99b781f02
- Parent:
- 25:b16f1045108f
- Child:
- 73:265d3cc6b0b1
Basic fwd dc power feed forward working
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
madcowswe | 22:6e3218cf75f8 | 1 | |
madcowswe | 22:6e3218cf75f8 | 2 | #ifndef MOTOR_CONTROL_H |
madcowswe | 22:6e3218cf75f8 | 3 | #define MOTOR_CONTROL_H |
madcowswe | 22:6e3218cf75f8 | 4 | |
madcowswe | 22:6e3218cf75f8 | 5 | namespace MotorControl{ |
madcowswe | 22:6e3218cf75f8 | 6 | |
madcowswe | 62:78d99b781f02 | 7 | extern volatile float fwdcmd; |
madcowswe | 62:78d99b781f02 | 8 | extern volatile float omegacmd; |
madcowswe | 62:78d99b781f02 | 9 | |
madcowswe | 62:78d99b781f02 | 10 | extern volatile float mfwdpowdbg; |
madcowswe | 62:78d99b781f02 | 11 | extern volatile float mrotpowdbg; |
madcowswe | 22:6e3218cf75f8 | 12 | |
madcowswe | 22:6e3218cf75f8 | 13 | inline void set_fwdcmd(float infwdcmd){ |
madcowswe | 22:6e3218cf75f8 | 14 | fwdcmd = infwdcmd; |
madcowswe | 22:6e3218cf75f8 | 15 | } |
madcowswe | 22:6e3218cf75f8 | 16 | |
madcowswe | 25:b16f1045108f | 17 | inline void set_omegacmd(float inomega){ |
madcowswe | 25:b16f1045108f | 18 | omegacmd = inomega; |
madcowswe | 22:6e3218cf75f8 | 19 | } |
madcowswe | 22:6e3218cf75f8 | 20 | |
madcowswe | 25:b16f1045108f | 21 | void motor_control_isr(); |
madcowswe | 25:b16f1045108f | 22 | |
madcowswe | 22:6e3218cf75f8 | 23 | } |
madcowswe | 22:6e3218cf75f8 | 24 | |
madcowswe | 22:6e3218cf75f8 | 25 | #endif //MOTOR_CONTROL_H |