Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
NASTY BUG WARNING!
tl;dr: Update your version of TechnoLib if you're using v2+
Symptoms:
Details
When I switched from a Singleton to static methods for the CommandScheduler, I no longer deleted & recreated the singleton in the CommandScheduler.clear method. That particular action, however, had the side effect of also clearing out any commands that may have been scheduled.
So, without the fix the first time you run an opmode, everything looks fine. But when you start a second opmode, all the previous commands you scheduled on the first opmode will be running along with any new commands you may have scheduled.
What does this look like?
If your run a dumb auto that does nothing but waits for 25 seconds to test things out and ends with "terminateOpMode", then you run a teleop mode for driving around, your teleop is going to terminate in 25 seconds.
If you run a RoadRunner opmode after a 'fresh' deploy, it will work fine. But then if you run that driving around opmode, the command scheduler flips between driving and running your roadrunner opmode at the same time. So the bot slowly jerks toward it's auto goals, while you're not doing anything with the joystick at all. Then, you may want to go back and try your auto opmode again, but because the joystick drive command is still scheduled, the path ran nice and smooth the first time, but not it's jerky and awful.
Kevin's a read idiot
It turns out that this change did cause some tests to start failing, but I didn't see it at the time, so 30 commits later, I noticed that some tests were failing, and just updated the tests to assume the new behavior was correct.