diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7064754..f6ce5b0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -247,4 +247,4 @@ jobs: echo "::error::$missing file(s) missing the GPL-3.0 copyright header." exit 1 fi - echo "All files have correct copyright headers." \ No newline at end of file + echo "All files have correct copyright headers." diff --git a/firmware/src/transmitter/modules/IModule.h b/firmware/src/transmitter/modules/IModule.h index 39588b9..3023b5e 100644 --- a/firmware/src/transmitter/modules/IModule.h +++ b/firmware/src/transmitter/modules/IModule.h @@ -66,6 +66,11 @@ class IModule { return _ready; } + /// Mark the module as ready (called by ModuleManager after begin()). + void setReady() { + _ready = true; + } + /// Slot index this module occupies (0-based). uint8_t slot() const { return _slot; diff --git a/firmware/src/transmitter/modules/ModuleManager.cpp b/firmware/src/transmitter/modules/ModuleManager.cpp index 01e8aed..9d20034 100644 --- a/firmware/src/transmitter/modules/ModuleManager.cpp +++ b/firmware/src/transmitter/modules/ModuleManager.cpp @@ -50,6 +50,7 @@ void ModuleManager::scanAndInit() { auto mod = detectModule(slot); if (mod && mod->begin()) { + mod->setReady(); _modules[slot] = std::move(mod); } _backplane.deselectAll();