mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-03 20:30:43 +00:00
Try-fix some import of configuration inconsistencies (#6364)
This commit is contained in:
parent
bd2d2981c9
commit
72db671e00
@ -265,7 +265,7 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta
|
|||||||
disableBluetooth();
|
disableBluetooth();
|
||||||
LOG_INFO("Commit transaction for edited settings");
|
LOG_INFO("Commit transaction for edited settings");
|
||||||
hasOpenEditTransaction = false;
|
hasOpenEditTransaction = false;
|
||||||
saveChanges(SEGMENT_CONFIG | SEGMENT_MODULECONFIG | SEGMENT_DEVICESTATE | SEGMENT_CHANNELS);
|
saveChanges(SEGMENT_CONFIG | SEGMENT_MODULECONFIG | SEGMENT_DEVICESTATE | SEGMENT_CHANNELS | SEGMENT_NODEDATABASE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case meshtastic_AdminMessage_get_device_connection_status_request_tag: {
|
case meshtastic_AdminMessage_get_device_connection_status_request_tag: {
|
||||||
@ -334,7 +334,7 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta
|
|||||||
node->position = TypeConversions::ConvertToPositionLite(r->set_fixed_position);
|
node->position = TypeConversions::ConvertToPositionLite(r->set_fixed_position);
|
||||||
nodeDB->setLocalPosition(r->set_fixed_position);
|
nodeDB->setLocalPosition(r->set_fixed_position);
|
||||||
config.position.fixed_position = true;
|
config.position.fixed_position = true;
|
||||||
saveChanges(SEGMENT_DEVICESTATE | SEGMENT_NODEDATABASE | SEGMENT_CONFIG, false);
|
saveChanges(SEGMENT_NODEDATABASE | SEGMENT_CONFIG, false);
|
||||||
#if !MESHTASTIC_EXCLUDE_GPS
|
#if !MESHTASTIC_EXCLUDE_GPS
|
||||||
if (gps != nullptr)
|
if (gps != nullptr)
|
||||||
gps->enable();
|
gps->enable();
|
||||||
@ -347,7 +347,7 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta
|
|||||||
LOG_INFO("Client received remove_fixed_position command");
|
LOG_INFO("Client received remove_fixed_position command");
|
||||||
nodeDB->clearLocalPosition();
|
nodeDB->clearLocalPosition();
|
||||||
config.position.fixed_position = false;
|
config.position.fixed_position = false;
|
||||||
saveChanges(SEGMENT_DEVICESTATE | SEGMENT_NODEDATABASE | SEGMENT_CONFIG, false);
|
saveChanges(SEGMENT_NODEDATABASE | SEGMENT_CONFIG, false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case meshtastic_AdminMessage_set_time_only_tag: {
|
case meshtastic_AdminMessage_set_time_only_tag: {
|
||||||
@ -574,7 +574,6 @@ void AdminModule::handleSetConfig(const meshtastic_Config &c)
|
|||||||
config.has_position = true;
|
config.has_position = true;
|
||||||
config.position = c.payload_variant.position;
|
config.position = c.payload_variant.position;
|
||||||
// Save nodedb as well in case we got a fixed position packet
|
// Save nodedb as well in case we got a fixed position packet
|
||||||
saveChanges(SEGMENT_DEVICESTATE, false);
|
|
||||||
break;
|
break;
|
||||||
case meshtastic_Config_power_tag:
|
case meshtastic_Config_power_tag:
|
||||||
LOG_INFO("Set config: Power");
|
LOG_INFO("Set config: Power");
|
||||||
|
Loading…
Reference in New Issue
Block a user