Only call loop() functions of radio modules that are enabled and set up

This commit is contained in:
you69man 2023-12-11 23:48:03 +01:00
parent 1c12f4c141
commit 41e000f01a

View file

@ -105,9 +105,11 @@ void app::setup() {
void app::loop(void) { void app::loop(void) {
ah::Scheduler::loop(); ah::Scheduler::loop();
mNrfRadio.loop(); if(mConfig->nrf.enabled)
mNrfRadio.loop();
#if defined(ESP32) #if defined(ESP32)
mCmtRadio.loop(); if(mConfig->cmt.enabled)
mCmtRadio.loop();
#endif #endif
mCommunication.loop(); mCommunication.loop();