Practical Robotics Modular Robot Library
motors.h@0:8a2dd255c508, 2016-11-26 (annotated)
- Committer:
- jah128
- Date:
- Sat Nov 26 17:28:53 2016 +0000
- Revision:
- 0:8a2dd255c508
- Child:
- 1:a6728adaf7e7
Initial commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jah128 | 0:8a2dd255c508 | 1 | #ifndef MOTORS_H |
jah128 | 0:8a2dd255c508 | 2 | #define MOTORS_H |
jah128 | 0:8a2dd255c508 | 3 | |
jah128 | 0:8a2dd255c508 | 4 | class Motors |
jah128 | 0:8a2dd255c508 | 5 | { |
jah128 | 0:8a2dd255c508 | 6 | public: |
jah128 | 0:8a2dd255c508 | 7 | /** |
jah128 | 0:8a2dd255c508 | 8 | * Setup the PWM based H-Bridge drivers for the motors |
jah128 | 0:8a2dd255c508 | 9 | */ |
jah128 | 0:8a2dd255c508 | 10 | void init(void); |
jah128 | 0:8a2dd255c508 | 11 | |
jah128 | 0:8a2dd255c508 | 12 | |
jah128 | 0:8a2dd255c508 | 13 | |
jah128 | 0:8a2dd255c508 | 14 | void sleep(void); |
jah128 | 0:8a2dd255c508 | 15 | void wake_up(void); |
jah128 | 0:8a2dd255c508 | 16 | void coast_left(void); |
jah128 | 0:8a2dd255c508 | 17 | void brake_left(void); |
jah128 | 0:8a2dd255c508 | 18 | void set_left_motor_speed(float speed); |
jah128 | 0:8a2dd255c508 | 19 | void coast_right(void); |
jah128 | 0:8a2dd255c508 | 20 | void brake_right(void); |
jah128 | 0:8a2dd255c508 | 21 | void coast(void); |
jah128 | 0:8a2dd255c508 | 22 | void brake(void); |
jah128 | 0:8a2dd255c508 | 23 | void set_right_motor_speed(float speed); |
jah128 | 0:8a2dd255c508 | 24 | float get_current_left(void); |
jah128 | 0:8a2dd255c508 | 25 | float get_current_right(void); |
jah128 | 0:8a2dd255c508 | 26 | float get_adjusted_speed(float speed_in); |
jah128 | 0:8a2dd255c508 | 27 | |
jah128 | 0:8a2dd255c508 | 28 | |
jah128 | 0:8a2dd255c508 | 29 | }; |
jah128 | 0:8a2dd255c508 | 30 | |
jah128 | 0:8a2dd255c508 | 31 | #endif |