Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When importing config, keep Bluetooth on and defer rebooting until co… #4898

Merged
merged 3 commits into from
Sep 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/modules/AdminModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ void AdminModule::handleSetConfig(const meshtastic_Config &c)

break;
}
if (requiresReboot) {
if (requiresReboot && !hasOpenEditTransaction) {
disableBluetooth();
}

Expand All @@ -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");
Expand Down Expand Up @@ -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);
}
}
Expand Down
Loading