From 010905ca2e3dfc072a9f61e8e75304b8c3c1d089 Mon Sep 17 00:00:00 2001 From: Andre K Date: Mon, 14 Oct 2024 08:54:04 -0300 Subject: [PATCH] retain `fixed_position` during reset-nodedb --- src/mesh/NodeDB.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mesh/NodeDB.cpp b/src/mesh/NodeDB.cpp index 371cea413e..558c5b8259 100644 --- a/src/mesh/NodeDB.cpp +++ b/src/mesh/NodeDB.cpp @@ -556,7 +556,8 @@ void NodeDB::installDefaultChannels() void NodeDB::resetNodes() { - clearLocalPosition(); + if (!config.position.fixed_position) + clearLocalPosition(); numMeshNodes = 1; std::fill(devicestate.node_db_lite.begin() + 1, devicestate.node_db_lite.end(), meshtastic_NodeInfoLite()); devicestate.has_rx_text_message = false; @@ -1207,4 +1208,4 @@ void recordCriticalError(meshtastic_CriticalErrorCode code, uint32_t address, co LOG_ERROR("A critical failure occurred, portduino is exiting..."); exit(2); #endif -} \ No newline at end of file +}