sleep
or similar blocking code
(like while loops) to structure LinearOpMode
autonomous code. Instead, write
‘asynchronous polled’ friendly code. This style of code take the form of update
functions that get run (polled) every loop, and does not block the loop
(asynchronous). This must not be done in OpMode
either, but this is much
harder to do in OpMode
. Feature
s rely on the hooks running, and you lose
many of the benefits of Dairy, or may cause undefined / unexpected behaviourFeature
s are components that have hooks into the OpMode runtime.Dependency
system allows Feature
s to declare the conditions that need
to be met for them to be attached to an OpMode, whether this is an annotation
or another Feature
.Controller
s have support for systems like PID controllers, or
MotionProfiles, that update in the background of your OpMode.OpModeLazyCell
allows you to separate out your hardware access into several
functions.OpModeLazyCell
and the enhanced Dairy runtime, an
improved alternative to a RobotHardware
class.EnhancedDoubleSupplier
s and EnhancedBooleanSupplier
s that rely on the
Dairy runtime to automatically provide additional utilities.TeamCode
’s build.gradle
, above dependencies
.
dependencies
block: