Link Search Menu Expand Document

Ev3Wrap::MotorPair

public methods


static MotorPair CreateMotorPair(Ev3Wrap::Motor& m1, Ev3Wrap::Motor& m2)

Constructor

Description: static constructor for creating a “manager” class. Parameters must be placed in order, from left to right.


MotorPair& runMotorsForever(float rpm1 = 50, float rpm2 = 50)

Output method

Description: runs the 2 motors forever at certain speeds. Calls the motor’s runForever internally.


MotorPair& runMotorsTimed(float milliseconds, float rpm1 = 50, float rpm2 = 50)

Output method

Affected by Blockable

Description: runs the motors for a set number of seconds, then stops the motors.

Warning - This relies on the motors not isBlocking


MotorPair& stopMotors()

Output method

Description: tells the motors to stop whilst resisting any force trying to budge / move the motor.


MotorPair& releaseMotors()

Output method

Description: tells the motors to cut its electricity and freely come to a stop.