test
Fork of MotorDriver by
Revision 1:19476b49822b, committed 2017-11-25
- Comitter:
- tgw
- Date:
- Sat Nov 25 02:02:40 2017 +0000
- Parent:
- 0:871adb9cf798
- Commit message:
- test
Changed in this revision
MotorDriver.cpp | Show annotated file Show diff for this revision Revisions of this file |
MotorDriver.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/MotorDriver.cpp Tue Dec 08 00:11:04 2015 +0000 +++ b/MotorDriver.cpp Sat Nov 25 02:02:40 2017 +0000 @@ -31,7 +31,7 @@ motor_state.value = _pwm; } else{ - motor_state.code = ERROR; // Undefined config found + motor_state.code = ERROR_M; // Undefined config found motor_state.value = _pwm; } } @@ -44,7 +44,7 @@ if(isTryingToInstantReverse){ // Set motor to brake, set state to error coast(); - motor_state.code = ERROR; motor_state.value = _pwm; + motor_state.code = ERROR_M; motor_state.value = _pwm; return motor_state; } else{
--- a/MotorDriver.h Tue Dec 08 00:11:04 2015 +0000 +++ b/MotorDriver.h Sat Nov 25 02:02:40 2017 +0000 @@ -32,7 +32,7 @@ #include "mbed.h" -typedef enum {ERROR=0, DRIVING_CW=1, DRIVING_CCW=2, BRAKING=3, COASTING=4}Code_t; +typedef enum {ERROR_M=0, DRIVING_CW=1, DRIVING_CCW=2, BRAKING=3, COASTING=4}Code_t; typedef struct{ Code_t code; float value;