Closed gnawinganimal closed 4 years ago
Here's an example of a subsystem with a default task and setup function:
class Arm : Subsystem() {
override val default: Default = {
println("Running default task")
}
override val setup: Setup = {
println("Setting stuff up")
}
}
Notice that the name is gone, because it is now inferred by the class name. It can be overridden if you want, though.
Okay I fixed stuff and now its not dumb. Now it would be
class Arm : Subsystem() {
override suspend fun CoroutineScope.default() {
println("Running default task")
}
override fun CoroutineScope.setup() {
println("Setting stuff up")
}
}
That's weird it worked fine on my device
Okay it was some weird bug with github actions, the JDK didn't download right
This is a pretty big change on the inside, but is basically the same on the outside.