Skip to content

Commit

Permalink
fix #2460 - we only really need the router object after nodedb init, …
Browse files Browse the repository at this point in the history
…so lets move it there.
  • Loading branch information
caveman99 committed May 4, 2023
1 parent e360c62 commit 313860c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,6 @@ void setup()

fsInit();

router = new ReliableRouter();

#ifdef I2C_SDA1
Wire1.begin(I2C_SDA1, I2C_SCL1);
#endif
Expand Down Expand Up @@ -413,6 +411,8 @@ void setup()
// If we're taking on the repeater role, use flood router
if (config.device.role == meshtastic_Config_DeviceConfig_Role_REPEATER)
router = new FloodingRouter();
else
router = new ReliableRouter();

#if HAS_BUTTON
// Buttons. Moved here cause we need NodeDB to be initialized
Expand Down

0 comments on commit 313860c

Please sign in to comment.