Skip to content

Commit

Permalink
retain fixed_position during reset-nodedb
Browse files Browse the repository at this point in the history
  • Loading branch information
andrekir authored and fifieldt committed Oct 14, 2024
1 parent ea20bb1 commit 010905c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/mesh/NodeDB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
}
}

0 comments on commit 010905c

Please sign in to comment.