|
RoboJDETM v2.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Motor
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 |
---|
static final int MAX_FORWARD
static final int MAX_REVERSE
static final int STOP
Method Detail |
---|
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.
void setPower(int power)
power
- The power level to set.
void stop()
This method has the same effect as setPower(STOP) or setPower(0).
|
RoboJDETM v2.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |