|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlejos.nxt.addon.PFMateMotor
public class PFMateMotor
Motor class for PFMate class
| Method Summary | |
|---|---|
void |
backward()
Runs the motor backward |
void |
flt()
Floats the motor |
void |
forward()
Runs the motor forward |
int |
getPower()
Returns the current motor power setting. |
int |
getSpeed()
returns the speed |
boolean |
isBackward()
Determines if motor is moving backwards this is based on what the receiver has in its registers |
boolean |
isFlt()
Determines if motor is floating this is based on what the receiver has in its registers |
boolean |
isForward()
Determines if motor is moving forward this is based on what the receiver has in its registers |
boolean |
isMoving()
Return true if the motor is moving. |
boolean |
isStop()
Determines if motor is stopped this is based on what the receiver has in its registers |
void |
setPower(int power)
Set the power level 0%-100% to be applied to the motor |
void |
setSpeed(int speed)
Sets the motors speed |
void |
stop()
Stops the Motor |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void flt()
flt in interface BaseMotorpublic void forward()
forward in interface BaseMotorpublic void backward()
backward in interface BaseMotorpublic void stop()
stop in interface BaseMotorpublic void setSpeed(int speed)
speed - 1 = 7public int getSpeed()
public boolean isFlt()
public boolean isForward()
public boolean isBackward()
public boolean isStop()
public boolean isMoving()
BaseMotortrue if the motor is moving.
isMoving in interface BaseMotortrue if the motor is currently in motion, false if stopped.public void setPower(int power)
DCMotor
setPower in interface DCMotorpower - new motor power 0-100public int getPower()
DCMotor
getPower in interface DCMotor
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||