42 spin(vex::fwd,
m_cmd, vex::pct);
46 spin(vex::fwd,
m_cmd * 12 / 100.f, vex::volt);
Header containing a simple motor wrapper class.
A Simple Motor Wrapper Class.
SimpleMotor(vex::motor mot)
Construct a new Simple Motor object.
void set(double cmd)
Sets the motor to spin at the specified command.
void setSpeedMode(bool speedMode)
Set the SpeedMode of the SimpleMotor.
bool getSpeedMode()
Get the SpeedMode of the SimpleMotor.
bool m_speedMode
Whether or not the motor should use speed, rather than voltage.
double get()
Returns the command the motor was last commanded to.
double m_cmd
The command the motor is set to, as a percentage of the max.
SimpleMotor & withSpeedMode(bool speedMode)
Returns a SimpleMotor refrence with the specified speedMode.