|
RoboJDETM v1.5 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Generic interface to a variable power motor.
| Field Summary | |
static int |
MAX_FORWARD
Maximum power in the forward direction. |
static int |
MAX_REVERSE
Maximum power in the reverse direction. |
static int |
STOP
Power off (coast and/or stop). |
| Method Summary | |
void |
brake()
Applies active braking if supported by the motor controller. |
void |
setPower(int power)
Sets the motor's power. |
void |
stop()
Turns the motor power off, allowing the motor to coast or stop. |
| Field Detail |
public static final int MAX_FORWARD
public static final int MAX_REVERSE
public static final int STOP
| Method Detail |
public void brake()
If active braking is not supported by the motor controller, this method will have the same effect as the stop method or setPower(0).
See the documentation for the supporting classes for your robotics controller or motor controller to determine if active braking is supported.
public void setPower(int power)
power - The power level to set.
public void stop()
This method has the same effect as setPower(STOP) or setPower(0).
|
RoboJDETM v1.5 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||