What happened?
PR #3401 (ELAD/WoodBoxRadio TMate 2 USB HID support) added calls to
triggerTMate2Overlay(TMate2Overlay::...) inside applyFlexControlWheelAction.
applyFlexControlWheelAction is declared outside any #ifdef HAVE_HIDAPI block —
it handles wheel inputs from FlexControl, MIDI, and other non-HID sources — but
both TMate2Overlay (an enum class) and triggerTMate2Overlay are declared
inside the #ifdef HAVE_HIDAPI block in MainWindow.h (lines 573–623). The
five unguarded call sites cause a build failure on any configuration where
HIDAPI is not present.
Compiler output (MinGW GCC 13.1.0, Qt 6.11.0, no hidapi):
src/gui/MainWindow.cpp:7823:34: error: 'TMate2Overlay' has not been declared
src/gui/MainWindow.cpp:7823:13: error: 'triggerTMate2Overlay' was not declared in this scope
src/gui/MainWindow.cpp:7840:30: error: 'TMate2Overlay' has not been declared
... (5 sites total)
This does not reproduce on CI because the Docker image and MSVC Windows path
both include HIDAPI. It only surfaces locally on Windows without
scripts/setup/setup-hidapi.ps1 having been run, or on Linux/macOS builds
where the HID optional dependency was not installed.
Steps to reproduce
- Clone the repo on Windows without running
setup-hidapi.ps1
- Configure and build normally
- Observe compile failure in
MainWindow.cpp
Expected behavior
Build succeeds on all target platforms regardless of HIDAPI availability,
matching the pattern established in PR #3344.
Affected lines
src/gui/MainWindow.cpp — five call sites inside applyFlexControlWheelAction:
WheelRit (×1), WheelVolume (×2), WheelPower (×1), WheelCwSpeed (×1).
Fix
Wrap each of the five sites with #ifdef HAVE_HIDAPI / #endif.
Branch fix/tmate2-wheel-mingw-no-hidapi on NF0T/AetherSDR has the patch
ready for PR.
What happened?
PR #3401 (ELAD/WoodBoxRadio TMate 2 USB HID support) added calls to
triggerTMate2Overlay(TMate2Overlay::...)insideapplyFlexControlWheelAction.applyFlexControlWheelActionis declared outside any#ifdef HAVE_HIDAPIblock —it handles wheel inputs from FlexControl, MIDI, and other non-HID sources — but
both
TMate2Overlay(an enum class) andtriggerTMate2Overlayare declaredinside the
#ifdef HAVE_HIDAPIblock inMainWindow.h(lines 573–623). Thefive unguarded call sites cause a build failure on any configuration where
HIDAPI is not present.
Compiler output (MinGW GCC 13.1.0, Qt 6.11.0, no hidapi):
This does not reproduce on CI because the Docker image and MSVC Windows path
both include HIDAPI. It only surfaces locally on Windows without
scripts/setup/setup-hidapi.ps1having been run, or on Linux/macOS buildswhere the HID optional dependency was not installed.
Steps to reproduce
setup-hidapi.ps1MainWindow.cppExpected behavior
Build succeeds on all target platforms regardless of HIDAPI availability,
matching the pattern established in PR #3344.
Affected lines
src/gui/MainWindow.cpp— five call sites insideapplyFlexControlWheelAction:WheelRit(×1),WheelVolume(×2),WheelPower(×1),WheelCwSpeed(×1).Fix
Wrap each of the five sites with
#ifdef HAVE_HIDAPI/#endif.Branch
fix/tmate2-wheel-mingw-no-hidapion NF0T/AetherSDR has the patchready for PR.