From 32e662237bebcf46f337d173a195849f4d98ee7a Mon Sep 17 00:00:00 2001 From: Phil Taylor Date: Mon, 13 Feb 2023 15:14:27 +0000 Subject: [PATCH] Make ptt react correctly --- usbcontroller.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usbcontroller.cpp b/usbcontroller.cpp index e913a89..6f9715c 100644 --- a/usbcontroller.cpp +++ b/usbcontroller.cpp @@ -705,13 +705,15 @@ void usbController::receiveSensitivity(int val) void usbController::receivePTTStatus(bool on) { static QColor lastColour = currentColour; - if (on) { + static bool ptt; + if (on && !ptt) { lastColour = currentColour; programWheelColour(255, 0, 0); } else { programWheelColour((quint8)lastColour.red(), (quint8)lastColour.green(), (quint8)lastColour.blue()); } + ptt = on; } /*