You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/nextftc/concepts/commands.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ A command has four main components: `isDone`, `start`, `update`, and `stop`.
14
14
Additionally, it has two more properties:
15
15
16
16
-`interruptible` determines whether or not the command is able to be interrupted. A command is interrupted when another command is scheduled that requires a subsystem the command is using. If a command is not interruptible, then the new command will not run.
17
-
-`subsystems` is a set of all the subsystems a command uses. This is used for determing when two commands requrie the same subsystem. This is passed to the constructor of most premade commands.
17
+
-`requirements` is the set of all the objects a command uses, which are most commonly [subsystems](/subsystems). This is used for determining when two commands require the same subsystem. This is passed to the constructor of most premade commands.
18
18
19
19
## Creating Commands
20
20
@@ -29,10 +29,10 @@ A lambda command is the main way to create a command in NextFTC. A lambda comman
29
29
30
30
```kotlin
31
31
val myLambdaCommand =LambdaCommand()
32
-
.setStart {
32
+
.setStart {
33
33
// Runs on start
34
34
}
35
-
.setUpdate {
35
+
.setUpdate {
36
36
// Runs on update
37
37
}
38
38
.setStop { interrupted ->
@@ -66,7 +66,7 @@ Command myLambdaCommand = new LambdaCommand()
66
66
> [!TIP]
67
67
> All functions are completely optional. You only need to call the ones you will use. They can be called in any order.
68
68
69
-
## Commands as Classes
69
+
###Commands as Classes
70
70
71
71
It is unlikely that you will need to use this very often, but you can also create a command as a class. This is useful for cases where you need to reuse your command a lot. An command can be created as a class as follows:
0 commit comments