Broadcast neighbor info

also update trunk
This commit is contained in:
Thomas Göttgens
2023-05-31 13:18:09 +02:00
parent b1398d0770
commit 61661aed50
10 changed files with 390 additions and 8 deletions

View File

@@ -14,6 +14,7 @@
#include "error.h"
#include "main.h"
#include "mesh-pb-constants.h"
#include "modules/NeighborInfoModule.h"
#include <ErriezCRC32.h>
#include <pb_decode.h>
#include <pb_encode.h>
@@ -128,6 +129,8 @@ bool NodeDB::factoryReset()
installDefaultChannels();
// third, write everything to disk
saveToDisk();
// write NeighbourInfo
neighborInfoModule->saveProtoForModule();
#ifdef ARCH_ESP32
// This will erase what's in NVS including ssl keys, persistant variables and ble pairing
nvs_flash_erase();
@@ -259,6 +262,7 @@ void NodeDB::resetNodes()
devicestate.node_db_count = 0;
memset(devicestate.node_db, 0, sizeof(devicestate.node_db));
saveDeviceStateToDisk();
neighborInfoModule->resetNeighbors();
}
void NodeDB::installDefaultDeviceState()