|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectPER.rover.TurnToAction
Turns the Rover a specified number of degrees, dead-reckoned.
| Constructor Summary | |
TurnToAction(int degrees)
Creates new TurnToAction that takes pictures. |
|
TurnToAction(int degrees,
boolean takePictures)
Creates new TurnToAction |
|
| Method Summary | |
boolean |
doAction(Rover r)
Tries to start the action. |
int[] |
getClosestObstacle()
This function returns the closest obstacle to straight ahead. |
long |
getImageUpdateTime()
Lets you know when the last image was taken by this action. |
java.awt.image.BufferedImage |
getRecentImage()
Returns the most recent image taken by this Action. |
int |
getReturnValue()
The return value of the Action. |
java.lang.String |
getShortSummary()
Provides a shortened version of the summary returned by getSummary. |
java.lang.String |
getSummary()
Provides a textual explanation of the Action, such as "turn 90 degrees" |
int |
getTime()
How long the action will take, in milliseconds. |
int |
getTimeRemaining()
How much time until the action finishes (in milliseconds), if it has already started. |
boolean |
isCompleted()
Whether the action has completed. |
boolean |
isSuccess()
Whether the action completed successfully. |
void |
kill()
Emergency stop - end the action immediately, if it's running. |
void |
setAngle(int ang)
Sets the angle to turn to to the given value (in degrees). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TurnToAction(int degrees)
degrees - the angle in degrees of how far to turn
public TurnToAction(int degrees,
boolean takePictures)
degrees - the angle in degrees of how far to turntakePictures - whether or not to take pictures while moving| Method Detail |
public boolean isSuccess()
Action
isSuccess in interface Actionpublic boolean doAction(Rover r)
Action
doAction in interface Actionpublic void setAngle(int ang)
public int getTime()
Action
getTime in interface Actionpublic java.lang.String getSummary()
Action
getSummary in interface Actionpublic java.lang.String getShortSummary()
Action
getShortSummary in interface Actionpublic int getReturnValue()
Action
getReturnValue in interface ActionRoverState,
ActionConstantspublic int[] getClosestObstacle()
public boolean isCompleted()
Action
isCompleted in interface Actionpublic void kill()
Action
kill in interface Actionpublic int getTimeRemaining()
Action
getTimeRemaining in interface Actionpublic long getImageUpdateTime()
Action
getImageUpdateTime in interface Actionpublic java.awt.image.BufferedImage getRecentImage()
Action
getRecentImage in interface Action
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||