Skip to content

Release v0.3.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@blucoat blucoat released this 24 Feb 03:57
· 210 commits to master since this release

This release contains the code that is going with our robot to the 2017 competitions. Once we migrate some of the vision processing from hypercode2017 to here, and we've had some more "user acceptance testing" with junior programmers on the team, it looks like a 1.0 release will be in sight!

Most notably, we've added CommandBuilder, a builder-pattern type of thing which replaces CommandGroups (actually, it uses a CommandGroup under the hood, but it aims to be more ergonomic. In the future, we might change from CommandGroups entirely to our own thing, and code would still be compatible). Some features include:

  • Easily chain together commands (e.g. new CommandBuilder().sequential(foo).parallel(bar).build())
  • Wait for times, conditions, and other commands with waitForDuration, waitForCondition, waitForMatchTime, and waitForChildren. This way you can separate what a command does from when it finishes.
  • Easily end parallel commands with release(Subsystem) and releaseAll(). This combines well with the waitFor* methods, something we had a good deal of trouble with in 2016.
  • Use control flow in commands using ifThen, forLoop, and whileLoop. ifThen uses a WPILib ConditionalCommand, but it takes a lambda instead of requiring you to extend an abstract class. The loop commands are entirely original.

Currently the syntax on the loops and ifs makes it cumbersome to nest loops and branches. In a future release we may change it to beginWhile and endWhile, and so on, with validation being done in build(). This is low priority, since currently we don't have any autonomous mode or other routines that need this complexity. (Or perhaps this difficulty has stopped us from trying anything too complex?)

Minor change: we now use one-letter abbreviations for "pressed", "release", and "held" in the OI diagrams, to save space. These diagrams could still use some work to make them pretty.

Lastly, we've set up more unit testing. As the library grows and becomes more complex, this will only get more important.