-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(hardware): Update appropriate revision (#12130)
We have separate firmware for each revision of each device. We need to update devices with the firmware for their appropriate revision. To that end, let's add the revision to the device info cache in the network subsystem so we can then pass it back down to the firmware update machinery and select the appropriate firmware file for the revision. We also need to establish a map of default revisions because some devices won't have them. For instance, devices built during the DVT phase of ot-3 development were built in large numbers before we added the revision tracking to the firmware, so they won't have a revision and it's impractical to reflash them all with an ISP (since the revision is captured in the bootloader as well). This required some refactoring in utils to keep function complexity down. Specifically, check_firmware_update was pretty complex (by mccabe complexity rules) because it was a linear series of transforms with each transform validity-checked. By turning this into a chained series of iterators and pushing down the validity into the iterators themselves, we can make each iterator independently testable. Closes RET-1323
- Loading branch information
Showing
8 changed files
with
326 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.