From 8815a429b64da532a4994b480ce62b2cdf0d3e1f Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 9 Jun 2023 18:05:42 -0500 Subject: [PATCH] button --- components/ratgdo/ratgdo.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/ratgdo/ratgdo.cpp b/components/ratgdo/ratgdo.cpp index d8d0fd1..f49eef2 100644 --- a/components/ratgdo/ratgdo.cpp +++ b/components/ratgdo/ratgdo.cpp @@ -112,7 +112,8 @@ namespace ratgdo { } else if (cmd == 0x284) { motor = 1; } else if (cmd == 0x280) { - button = byte1 == 1 ESP_LOGD(TAG, "Pressed: %s", byte1 == 1 ? "pressed" : "released"); + button = byte1 == 1; + ESP_LOGD(TAG, "Pressed: %s", byte1 == 1 ? "pressed" : "released"); } else if (cmd == 0x48c) { openings = (byte1 << 8) | byte2; ESP_LOGD(TAG, "Openings: %d", (byte1 << 8) | byte2);