public class UnregulatedMotor extends BasicMotor implements EncoderMotor
Modifier and Type | Field and Description |
---|---|
protected Encoder |
encoderPort |
INVALID_MODE, mode, port, power
Constructor and Description |
---|
UnregulatedMotor(Port port)
Create an instance of a NXTMotor using the specified motor port the
PWM operating mode will be PWM_BREAK
BasicMotorPort.PWM_BRAKE |
UnregulatedMotor(Port port,
int PWMMode)
Create an instance of a NXTMotor using the specified motor port and
PWM operating mode.
|
UnregulatedMotor(TachoMotorPort port)
Create an instance of a NXTMotor using the specified motor port the
PWM operating mode will be PWM_BREAK
BasicMotorPort.PWM_BRAKE |
UnregulatedMotor(TachoMotorPort mport,
int PWMMode)
Create an instance of a NXTMotor using the specified motor port and
PWM operating mode.
|
Modifier and Type | Method and Description |
---|---|
int |
getTachoCount()
Returns the tachometer count.
|
void |
resetTachoCount()
Reset the tachometer count.
|
backward, flt, forward, getPower, isMoving, setPower, stop, updateState
close, releaseOnClose
protected Encoder encoderPort
public UnregulatedMotor(Port port, int PWMMode)
port
- The motor port that the motor will be attached to.PWMMode
- see BasicMotorPort.PWM_FLOAT
and see BasicMotorPort.PWM_BRAKE
public UnregulatedMotor(Port port)
BasicMotorPort.PWM_BRAKE
port
- The motor port that the motor will be attached to.public UnregulatedMotor(TachoMotorPort mport, int PWMMode)
mport
- The motor port that the motor will be attached to.PWMMode
- see BasicMotorPort.PWM_FLOAT
and see BasicMotorPort.PWM_BRAKE
public UnregulatedMotor(TachoMotorPort port)
BasicMotorPort.PWM_BRAKE
port
- The motor port that the motor will be attached to.public int getTachoCount()
Encoder
getTachoCount
in interface Encoder
public void resetTachoCount()
Encoder
resetTachoCount
in interface Encoder