Fix telemetry config save ordering before BLE deinit#10549
Open
mokjpn wants to merge 1 commit into
Open
Conversation
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
Fix telemetry module config save ordering on ESP32-class devices by deferring BLE deinit until after telemetry config is saved.
fixes #10548
What changed
In
AdminModule::handleSetModuleConfig():meshtastic_ModuleConfig_telemetry_tagfrom the earlydisableBluetooth()pathdisableBluetooth()for telemetry only aftersaveChanges(SEGMENT_MODULECONFIG, shouldReboot)Why
On affected devices, telemetry settings enabled from the app could revert after reboot because BLE was being torn down before the module config had been persisted to
/prefs/module.proto.In failing logs, the config flow reached:
Client set module configDisable bluetooth until rebootbut did not reliably complete the telemetry save path first.
This change keeps the existing reboot behavior but moves BLE teardown later for telemetry config updates so the config is saved before reboot.
Scope
This PR is intentionally narrow:
Testing
Tested on:
Observed:
Build tested:
pio run -e arduino-nesso-n1