mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-16 10:02:05 +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;
|
break;
|
||||||
}
|
}
|
||||||
if (requiresReboot) {
|
if (requiresReboot && !hasOpenEditTransaction) {
|
||||||
disableBluetooth();
|
disableBluetooth();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -592,6 +592,7 @@ void AdminModule::handleSetConfig(const meshtastic_Config &c)
|
|||||||
|
|
||||||
void AdminModule::handleSetModuleConfig(const meshtastic_ModuleConfig &c)
|
void AdminModule::handleSetModuleConfig(const meshtastic_ModuleConfig &c)
|
||||||
{
|
{
|
||||||
|
if (!hasOpenEditTransaction)
|
||||||
disableBluetooth();
|
disableBluetooth();
|
||||||
switch (c.which_payload_variant) {
|
switch (c.which_payload_variant) {
|
||||||
case meshtastic_ModuleConfig_mqtt_tag:
|
case meshtastic_ModuleConfig_mqtt_tag:
|
||||||
@ -966,7 +967,7 @@ void AdminModule::saveChanges(int saveWhat, bool shouldReboot)
|
|||||||
} else {
|
} else {
|
||||||
LOG_INFO("Delaying save of changes to disk until the open transaction is committed\n");
|
LOG_INFO("Delaying save of changes to disk until the open transaction is committed\n");
|
||||||
}
|
}
|
||||||
if (shouldReboot) {
|
if (shouldReboot && !hasOpenEditTransaction) {
|
||||||
reboot(DEFAULT_REBOOT_SECONDS);
|
reboot(DEFAULT_REBOOT_SECONDS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user