-
Notifications
You must be signed in to change notification settings - Fork 35
/
Action.java
executable file
·33 lines (29 loc) · 973 Bytes
/
Action.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package com.team254.frc2018.auto.actions;
/**
* An interface that describes an iterative action. It is run by an autonomous action, called by the
* method runAction in AutoModeBase (or more commonly in autonomous modes that extend AutoModeBase)
*
* @see com.team254.frc2018.auto.AutoModeBase#runAction
*/
public interface Action {
/**
* Returns whether or not the code has finished execution. When implementing this interface, this method is used by
* the runAction method every cycle to know when to stop running the action
*
* @return boolean
*/
boolean isFinished();
/**
* Called by runAction in AutoModeBase iteratively until isFinished returns true. Iterative logic lives in this
* method
*/
void update();
/**
* Run code once when the action finishes, usually for clean up
*/
void done();
/**
* Run code once when the action is started, for set up
*/
void start();
}