changes to motor library
Fork of motor by
motor.h@11:4a6f97cc1f1e, 2016-11-14 (annotated)
- Committer:
- lh14g13
- Date:
- Mon Nov 14 18:04:20 2016 +0000
- Branch:
- testing
- Revision:
- 11:4a6f97cc1f1e
- Parent:
- 7:9aaa4f73bb32
- Child:
- 14:bc77edc4adb0
sensor free ED tested version;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
lh14g13 | 0:b0476dcfa14c | 1 | #include "mbed.h" |
lh14g13 | 0:b0476dcfa14c | 2 | #include "TFC.h" |
lh14g13 | 11:4a6f97cc1f1e | 3 | #include <math.h> |
lh14g13 | 0:b0476dcfa14c | 4 | |
lh14g13 | 0:b0476dcfa14c | 5 | int motor_setup(); |
lh14g13 | 0:b0476dcfa14c | 6 | void TurnOn(); |
lh14g13 | 7:9aaa4f73bb32 | 7 | void runMotor(); |
lh14g13 | 0:b0476dcfa14c | 8 | void DefaultMode(); |
lh14g13 | 7:9aaa4f73bb32 | 9 | void centerWheels(); |
lh14g13 | 0:b0476dcfa14c | 10 | |
lh14g13 | 0:b0476dcfa14c | 11 | //Speed control |
lh14g13 | 0:b0476dcfa14c | 12 | void Acc(float& motorA, float& motorB); |
lh14g13 | 0:b0476dcfa14c | 13 | void Decc(float& motorA, float& motorB); |
lh14g13 | 0:b0476dcfa14c | 14 | void StartLine(); |
lh14g13 | 0:b0476dcfa14c | 15 | |
lh14g13 | 0:b0476dcfa14c | 16 | //Corner Control |
lh14g13 | 0:b0476dcfa14c | 17 | |
lh14g13 | 0:b0476dcfa14c | 18 | void PWM_cornerCntrl(bool a,float pwmRatio); |
lh14g13 | 0:b0476dcfa14c | 19 | void cornerLeft(float speed); |
lh14g13 | 0:b0476dcfa14c | 20 | void cornerRight(float speed); |
lh14g13 | 6:b4346ef9fa04 | 21 | |
lh14g13 | 6:b4346ef9fa04 | 22 | //advanced corner |
lh14g13 | 11:4a6f97cc1f1e | 23 | void dutyCycleCorner( float speed, float angle); |
lh14g13 | 11:4a6f97cc1f1e | 24 | void corner(float &w1,float &w2,float deltaTheta,int maxspeed); |
lh14g13 | 11:4a6f97cc1f1e | 25 | void centerWheels(); |
lh14g13 | 11:4a6f97cc1f1e | 26 | void steering(float center, float theta, int maxspeed); |