Skip to content
4 changes: 2 additions & 2 deletions src/mesh/NodeDB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,8 @@ void NodeDB::installDefaultChannels()

void NodeDB::resetNodes()
{
devicestate.node_db_lite_count = 0;
memset(devicestate.node_db_lite, 0, sizeof(devicestate.node_db_lite));
devicestate.node_db_lite_count = 1;
std::fill(&devicestate.node_db_lite[1], &devicestate.node_db_lite[MAX_NUM_NODES - 1], meshtastic_NodeInfoLite());
Comment thread
thebentern marked this conversation as resolved.
saveDeviceStateToDisk();
if (neighborInfoModule && moduleConfig.neighbor_info.enabled)
neighborInfoModule->resetNeighbors();
Expand Down