move nodeDB::init code into nodeDB constructor (#3455)

This commit is contained in:
Jonathan Bennett
2024-03-21 13:14:02 -05:00
committed by GitHub
parent dfcd0d14f6
commit fd26914d88
3 changed files with 58 additions and 66 deletions

View File

@@ -556,7 +556,7 @@ void setup()
// We do this as early as possible because this loads preferences from flash
// but we need to do this after main cpu init (esp32setup), because we need the random seed set
nodeDB = NodeDB::init();
nodeDB = new NodeDB;
// If we're taking on the repeater role, use flood router and turn off 3V3_S rail because peripherals are not needed
if (config.device.role == meshtastic_Config_DeviceConfig_Role_REPEATER) {