From 6d05bcd981353210d16507ab93bfaf4d4a6b1e64 Mon Sep 17 00:00:00 2001 From: Peter Buchegger Date: Tue, 10 Mar 2026 22:21:51 +0100 Subject: [PATCH] Fix module _ready flag and add license-headers CI job - Add setReady() to IModule and call it in ModuleManager::scanAndInit() after successful begin(). Without this, modules were never marked ready, so inputCount() returned 0 and the web UI showed no inputs in the function mapping dropdowns. - Add license-headers CI job that checks all source, HTML, and Python files for the SPDX-License-Identifier: GPL-3.0-or-later marker. --- .github/workflows/ci.yml | 2 +- firmware/src/transmitter/modules/IModule.h | 5 +++++ firmware/src/transmitter/modules/ModuleManager.cpp | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) 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();