feat: check WiFi firmware version before flashing#387
Open
feat: check WiFi firmware version before flashing#387
Conversation
Before downloading and flashing the WiFi module firmware, query the device for its current WiFi chip version using GetLanChipInfoAsync and compare it against the latest GitHub release via GetLatestWifiReleaseAsync. If the device is already running the latest version, skip the download and flash entirely and report 100 % progress immediately. Changes: - Bump Daqifi.Core to 0.18.3 (adds ILanChipInfoProvider, GetLanChipInfoAsync, and IFirmwareDownloadService.GetLatestWifiReleaseAsync) - SerialStreamingDevice implements ILanChipInfoProvider, delegating to its underlying Core DaqifiStreamingDevice - CoreStreamingDeviceAdapter implements ILanChipInfoProvider, delegating to the wrapped desktop device - DaqifiViewModel.UpdateWifiModuleAsync performs a version check before downloading; shows "already up to date" status or "X → Y" version info - Add IsWifiVersionCurrent helper using FirmwareVersion comparison Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1cc6102 to
2064c3a
Compare
When GetLanChipInfoAsync returns null (device still initializing after a PIC32 firmware flash), bail out early rather than proceeding with the WiFi flash. Force-flashing without version confirmation was putting the device into WiFi bridge mode unnecessarily, leaving it in a broken state when the flash tool subsequently failed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Allows building against a local Daqifi.Core project instead of the published NuGet package by passing -p:DaqifiCoreProjectPath=<path>. Falls back to the pinned NuGet version when the property is not set. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
📊 Code Coverage ReportSummarySummary
CoverageDAQiFi - 9.7%
Daqifi.Desktop.Common - 39.3%
Daqifi.Desktop.DataModel - 100%
Daqifi.Desktop.IO - 0%
Coverage report generated by ReportGenerator • View full report in build artifacts |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes #185.
Before downloading and flashing the WiFi module firmware, the app now:
ILanChipInfoProvider.GetLanChipInfoAsync()IFirmwareDownloadService.GetLatestWifiReleaseAsync()Implementation
Bumps
Daqifi.Coreto 0.18.3 (released as daqifi/daqifi-core#141) which addsILanChipInfoProvider,GetLanChipInfoAsync, andIFirmwareDownloadService.GetLatestWifiReleaseAsync.The version-check capability propagates through the firmware update delegation chain:
Graceful degradation: if the version strings can't be parsed, or the metadata fetch fails, the existing download + flash path runs unchanged.
Test plan
Build succeeded. 0 Error(s)🤖 Generated with Claude Code