mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-25 09:42:35 +00:00
When importing config, keep Bluetooth on and defer rebooting until co… (#4898)
* When importing config, keep Bluetooth on and defer rebooting until config is committed * One more place that was prematurely disabling Bluetooth --------- Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
parent
403e5c304e
commit
d41d4c930e
@ -583,7 +583,7 @@ void AdminModule::handleSetConfig(const meshtastic_Config &c)
|
||||
|
||||
break;
|
||||
}
|
||||
if (requiresReboot) {
|
||||
if (requiresReboot && !hasOpenEditTransaction) {
|
||||
disableBluetooth();
|
||||
}
|
||||
|
||||
@ -592,7 +592,8 @@ void AdminModule::handleSetConfig(const meshtastic_Config &c)
|
||||
|
||||
void AdminModule::handleSetModuleConfig(const meshtastic_ModuleConfig &c)
|
||||
{
|
||||
disableBluetooth();
|
||||
if (!hasOpenEditTransaction)
|
||||
disableBluetooth();
|
||||
switch (c.which_payload_variant) {
|
||||
case meshtastic_ModuleConfig_mqtt_tag:
|
||||
LOG_INFO("Setting module config: MQTT\n");
|
||||
@ -966,7 +967,7 @@ void AdminModule::saveChanges(int saveWhat, bool shouldReboot)
|
||||
} else {
|
||||
LOG_INFO("Delaying save of changes to disk until the open transaction is committed\n");
|
||||
}
|
||||
if (shouldReboot) {
|
||||
if (shouldReboot && !hasOpenEditTransaction) {
|
||||
reboot(DEFAULT_REBOOT_SECONDS);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user