Only add interfaces to the router if they can be initied

1.2-legacy
geeksville 2020-05-25 15:47:45 -07:00
rodzic bae73a9526
commit 5d1614989e
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -234,10 +234,10 @@ void setup()
new SimRadio(); new SimRadio();
#endif #endif
router.addInterface(rIf);
if (!rIf->init()) if (!rIf->init())
recordCriticalError(ErrNoRadio); recordCriticalError(ErrNoRadio);
else
router.addInterface(rIf);
// This must be _after_ service.init because we need our preferences loaded from flash to have proper timeout values // This must be _after_ service.init because we need our preferences loaded from flash to have proper timeout values
PowerFSM_setup(); // we will transition to ON in a couple of seconds, FIXME, only do this for cold boots, not waking from SDS PowerFSM_setup(); // we will transition to ON in a couple of seconds, FIXME, only do this for cold boots, not waking from SDS