Ev3Wrap::Motor
public methods
static Motor bind(ev3dev::address_type)
Constructor
Description: static constructor to bind to an output address. returns the binded motor object.
Motor& runTimed(float milliseconds, float rpm = DEFAULT_MOTOR_RPM)
Output method
Affected by blockable
Description: tells the motor to run for a specific number of milliseconds at a specific rpm. Returns a reference of the Motor itself so that method chaining can be done.
Motor& runForever(float rpm = DEFAULT_MOTOR_RPM)
Output method
Description: tells the motor to run at a specific rpm
Motor& runToAbsPos(float pos, float rpm = DEFAULT_MOTOR_RPM)
Output method
Unstable/Untested
Affected by Blockable
Description: tells the motor to run to a specific position.
Motor::runToRelPos(float relPos, float rpm = DEFAULT_MOTOR_RPM)
Output method
Unstable/Untested
Affected by Blockable
Description: tells the motor to run to a position relative to the motor’s current position
Motor::holdPosition()
Output method
Description: tells the motor to stop whilst resisting any force trying to budge / move the motor.
Motor::releaseMotor()
Output method
Description: tells the motor to cut its electricity and freely come to a stop.
Motor& setDefaultStopAction(MotorStopActions::StopAction stopAction)
setter method
Description: tells the motor how it should stop after timed methods, such as runTimed()
.
MotorStopActions::StopAction getDefaultStopAction()
getter method
Description: gets the current stopAction. Can be set by setDefaultStopAction
—