#include <Motor.h>
|
| Motor (int, int, int pin_a=0, int pin_b=0) |
| Default constructor. More...
|
|
| Motor (int, int, int, int, int, int) |
| Default constructor for motor with an encoder. More...
|
|
int | setupMotor (int, int, int pin_a=0, int pin_b=0) |
| Sets up the pins of the motor class. More...
|
|
void | run (int) |
| Run the motor at the desired speed and direction or position. More...
|
|
long | getPosition (void) |
| Returns the position of the motor. More...
|
|
double | getCurrentUsage (void) |
|
Definition at line 53 of file Motor.h.
Motor::Motor |
( |
int |
type, |
|
|
int |
pin_pwm, |
|
|
int |
pin_a = 0 , |
|
|
int |
pin_b = 0 |
|
) |
| |
Default constructor.
- Author
- Frederick Wachter
- Date
- Created: 2018-03-06
Definition at line 12 of file Motor.cpp.
Motor::Motor |
( |
int |
type, |
|
|
int |
pin_pwm, |
|
|
int |
pin_a, |
|
|
int |
pin_b, |
|
|
int |
encoder_pin_a, |
|
|
int |
encoder_pin_b |
|
) |
| |
Default constructor for motor with an encoder.
- Author
- Frederick Wachter
- Date
- Created: 2018-03-06
Definition at line 19 of file Motor.cpp.
double Motor::getCurrentUsage |
( |
void |
| ) |
|
long Motor::getPosition |
( |
void |
| ) |
|
Returns the position of the motor.
- Author
- Frederick Wachter
- Date
- Created: 2018-03-06
- Returns
- motor_position - position of the motor
Definition at line 87 of file Motor.cpp.
void Motor::run |
( |
int |
speed | ) |
|
Run the motor at the desired speed and direction or position.
- Author
- Frederick Wachter
- Date
- Created: 2018-03-06
- Returns
- error code
Definition at line 65 of file Motor.cpp.
void Motor::setupMotor |
( |
int |
type, |
|
|
int |
pin_pwm, |
|
|
int |
pin_a = 0 , |
|
|
int |
pin_b = 0 |
|
) |
| |
Sets up the pins of the motor class.
- Author
- Frederick Wachter
- Date
- Created: 2018-03-06
- Returns
- error code
Definition at line 31 of file Motor.cpp.
bool Motor::CURRENT_SENSOR_SETUP = false |
|
protected |
bool Motor::ENCODER_SETUP = false |
|
protected |
bool Motor::ready = false |
The documentation for this class was generated from the following files:
- /home/swerve/Github/sdc_2018/omni_robot/Motor.h
- /home/swerve/Github/sdc_2018/omni_robot/Motor.cpp