From 41e000f01ae39aa28347fb046dd1c9b671da861b Mon Sep 17 00:00:00 2001 From: you69man Date: Mon, 11 Dec 2023 23:48:03 +0100 Subject: [PATCH] Only call loop() functions of radio modules that are enabled and set up --- src/app.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app.cpp b/src/app.cpp index 0d59ab10..cb2e6947 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -105,9 +105,11 @@ void app::setup() { void app::loop(void) { ah::Scheduler::loop(); - mNrfRadio.loop(); + if(mConfig->nrf.enabled) + mNrfRadio.loop(); #if defined(ESP32) - mCmtRadio.loop(); + if(mConfig->cmt.enabled) + mCmtRadio.loop(); #endif mCommunication.loop();