From e9c110c1fedfb5cc4994aee06f6db872bb002fb9 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 9 Jun 2023 18:09:31 -0500 Subject: [PATCH] button --- components/ratgdo/ratgdo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/ratgdo/ratgdo.cpp b/components/ratgdo/ratgdo.cpp index 616621e..7432750 100644 --- a/components/ratgdo/ratgdo.cpp +++ b/components/ratgdo/ratgdo.cpp @@ -112,7 +112,7 @@ namespace ratgdo { } else if (cmd == 0x284) { motor = 1; } else if (cmd == 0x280) { - button = byte1 == 1; + button = byte1 == 1 ? ButtonState::BUTTON_STATE_PRESSED : ButtonState::BUTTON_STATE_RELEASED; ESP_LOGD(TAG, "Pressed: %s", byte1 == 1 ? "pressed" : "released"); } else if (cmd == 0x48c) { openings = (byte1 << 8) | byte2;