From 77ff1704db0413e8f8b0b6d7614ecb71d55d0338 Mon Sep 17 00:00:00 2001 From: GUVWAF <78759985+GUVWAF@users.noreply.github.com> Date: Wed, 10 Jan 2024 02:45:54 +0100 Subject: [PATCH] Allow button press if CannedMessage `updown1` or `rotary1` are not enabled (#3067) `BUTTON_PIN` may be 0, which is equal to `inputbroker_pin_press` by default --- src/ButtonThread.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ButtonThread.h b/src/ButtonThread.h index 5f68aa5b6..7138d3b6a 100644 --- a/src/ButtonThread.h +++ b/src/ButtonThread.h @@ -138,6 +138,7 @@ class ButtonThread : public concurrency::OSThread #ifdef BUTTON_PIN if (((config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN) != moduleConfig.canned_message.inputbroker_pin_press) || + !(moduleConfig.canned_message.updown1_enabled || moduleConfig.canned_message.rotary1_enabled) || !moduleConfig.canned_message.enabled) { powerFSM.trigger(EVENT_PRESS); } @@ -232,4 +233,4 @@ class ButtonThread : public concurrency::OSThread } }; -} // namespace concurrency +} // namespace concurrency \ No newline at end of file