feat(robot-server): status bar animation during firmware updates #12954
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.
Overview
The status bar now pulses during firmware updates, per the status bar design requirements.
This PR takes the approach of adding an animation handler for the FirmwareUpdateManager. The animation handler has functions that are called whenever a subsystem update starts or finishes. The intent is for the Update animation to play on the status bar whenever a SubSystem is being updated, with the caveat that the status bar cannot be accessed while the rear panel is being updated.
This PR also adds in the Activation animation because it's a really simple addition. At the end of the OT-3 post-init tasks, the activation animation will run. I also adjusted the animation to have a fade-off at the beginning instead of just jumping to 0% lights.
Test Plan
Push this patch to a robot. Restart the robot server and you should see the status bar perform the Activation animation after it homes the Z motors.
Now push new firmware (with a temporary tag) and restart the robot server, with at least unattached pipette available. The firmware should update. When the updates first start, the status bar will turn off; after the rear panel finishes updating, the status bar should begin to pulse white. Once the updates finish (should take a few minutes), the status bar should run the Activation animation.
Now attach the extra pipette. Use the
/subsystems/
routes to start an update of the pipette. The update animation should play for the duration of the update, and then revert to Idle.Changelog
Review requests
We do already have a light control task that sets state based on the status of the global
EngineStore
, but because of that dependency it doesn't map cleanly to being kicked off this early... an alternative approach could be to start the LightControlTask during hardware initialization and then provide a handle to the EngineStore once that is initialized. Would that be better than adding yet another place where the status bar gets set?Risk assessment
Pretty low, just lights.