Conversation
litehed
left a comment
There was a problem hiding this comment.
Looks good, and I agree that this is definitely an improvement from OpMode. However, I am a bit confused as to why this is the only OpMode that takes care of the gamepad in the backend. Why wouldn't CommandOpMode do the same in that regard?
The CommandOpMode doesn't need to update the button values. Those calls strictly refer to the button readers map. Refer to #142. |
| waitForStart(); | ||
|
|
||
| while (!isStopRequested() && opModeIsActive()) { | ||
| hubs.forEach(LynxModule::clearBulkCache); |
There was a problem hiding this comment.
Make sure to document this! Otherwise people are going to run clearBulkCache themselves.
Better OpMode
Let's be real:
OpModeis mediocre. With this, you can program in the basicinit(),loop()style ofOpModewithout the drawbacks. TheFTCLibOpModehas twoGamepadExobjects and updates the button values each iteration so the user does not have to (it's taken care of in the backend). You can take a look at the sampleOpModeSample.What kind of change does this PR introduce?
Did this PR introduce a breaking change?
Please make sure your PR satisfies the requirements of the contributing page