From 04bdf5323c781f1c4611f3532e8a818174aa174d Mon Sep 17 00:00:00 2001 From: Torrie Fischer Date: Sat, 23 Dec 2023 11:02:32 +0100 Subject: [PATCH] build-hal: add RENDERBUG_HAL define, fix logging output --- build-hal.py | 5 +++-- src/Hal.h | 2 +- src/inputs/Buttons.cpp | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/build-hal.py b/build-hal.py index d3641ae..2f5b275 100644 --- a/build-hal.py +++ b/build-hal.py @@ -4,6 +4,7 @@ frameworks = env.get("PIOFRAMEWORK") print(f"HAL configuration:") for framework in frameworks: - env.Append(SRC_FILTER=[f"+"]) + env.Append(SRC_FILTER=[f"+"]) env.Append(SRC_FILTER=[f"+"]) - print(f"- platform/{framework}{board}") + env.Append(CPPDEFINES=[f"RENDERBUG_HAL=HAL_{board.upper()}"]) + print(f"- platform/{framework}/{board}/") diff --git a/src/Hal.h b/src/Hal.h index aca9aa7..07a19be 100644 --- a/src/Hal.h +++ b/src/Hal.h @@ -8,7 +8,7 @@ typedef enum { HAL_ESP8266 } HalBackend; -constexpr HalBackend DefaultBackend = HAL_ESP8266; +constexpr HalBackend DefaultBackend = RENDERBUG_HAL; template class PlatformImpl { diff --git a/src/inputs/Buttons.cpp b/src/inputs/Buttons.cpp index 6cc9fa8..5ce9542 100644 --- a/src/inputs/Buttons.cpp +++ b/src/inputs/Buttons.cpp @@ -31,7 +31,7 @@ Buttons::read() //Log.info("Not emitting release from previous chord"); m_wasChord[i] = false; } else { - return InputEvent{InputEvent::UserInput, buttonID}; + return InputEvent{InputEvent::ButtonPress, buttonID}; } } }