Building with UDSP_DEBUG enabled fails:
lib/lib_display/UDisplay/src/uDisplay.cpp:908:24: error: #if with no expression
908 | #if USE_UNIVERSAL_TOUCH
| ^
USE_UNIVERSAL_TOUCH is defined without a value (my_user_config.h and the
user_config_override.h convention both use a bare `#define`), so `#if` expands
to an empty expression and the preprocessor errors out.
Every other test of this macro already uses #ifdef:
uDisplay.cpp:47 #ifdef USE_UNIVERSAL_TOUCH
uDisplay.cpp:792 #ifdef USE_UNIVERSAL_TOUCH
uDisplay_touch.cpp:4 #ifdef USE_UNIVERSAL_TOUCH
so this looks like a typo rather than a deliberate value test.
Introduced in a1639507d ("Udisp SPI fix for mono color display", #24899). It
goes unnoticed in normal builds because the block sits inside #ifdef
UDSP_DEBUG, which ships commented out at uDisplay.cpp:27 — it only surfaces
for anyone who turns that debug logging on. Found on an ESP32-P4 build with
UDSP_DEBUG enabled for DSI init diagnostics.
Co-authored-by: Ari Friedman <afriedman@millsupplyco.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Large refactor of the EQ3/TRV ESP32 BLE driver. The primary goal was to replace `strcmp`-based logic in TRV subcommand handling with an index-driven approach.
Additional improvements included:
* Optimizing ESP32 memory management using `constexpr` and removing obsolete `PSTR` and `PROGMEM` statements
* Adjusting variable types for better efficiency
* Improving overall code readability
* Enabling safer, compile-time constants
These changes reduce binary size, flash usage, RAM footprint, and CPU overhead.
Functional behavior remains entirely unchanged.
* [EQ3-TRV] Update parsing and logging
Here are a lot of optimizations for parsing the command data. They make it smaller and saver.
Some adjustments of the log logic.
Cleaning up code in common.
* Fix MAC in Log
* Adapt `BLEDebug` to common command syntax
Adapt `BLEDebug` to common command syntax:
- `BLEDebug` - show debug logging status
- `BLEDebug 0` - turn off
- `BLEDebug 1` - turn on
A bit code cleanup without functional changes.
* More cleanup
* Implement per-level BLE logging
Replace the single BLEDebugMode flag with a BLELogLevel[] array and route BLE logging through per-level checks. Added a fast path in AddLog to skip loglevel==0. Updated the BLEDebug command to set and show per-level log values, and replaced conditional BLEDebugMode checks across BLE driver and MI/EQ3 modules with AddLog(BLELogLevel[...]) calls. Miscellaneous whitespace/help text tweaks included.
Clear the BLERunningScan flag when starting a new BLE operation to ensure proper state management. This prevents the scanning state from persisting incorrectly across operations.