From 1f1800f046a32a969c17d1d48d2dd826ffc4081e Mon Sep 17 00:00:00 2001 From: Phil Taylor Date: Thu, 9 Feb 2023 18:43:42 +0000 Subject: [PATCH] Flip bits in knob command --- usbcontroller.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usbcontroller.cpp b/usbcontroller.cpp index 7871cf3..87dd4df 100644 --- a/usbcontroller.cpp +++ b/usbcontroller.cpp @@ -561,7 +561,7 @@ void usbController::runTimer() if ((tempKnobs >> (i*8) & 0xff) != (knobs >> (i*8) & 0xff) && kb->command->index > 0) { COMMAND cmd = *kb->command; - cmd.suffix = (unsigned char)(knobs >> (i * 8) & 0xff); + cmd.suffix = (unsigned char)~(knobs >> (i * 8)) & 0xff; qDebug(logUsbControl()) << "Knob event:" << cmd.command << "Value:" << cmd.suffix; emit button(&cmd); }