From 4b14c6910c468b413a830a1ea04e54e011aa11be Mon Sep 17 00:00:00 2001 From: Kristian Sloth Lauszus Date: Mon, 21 Mar 2016 17:57:33 +0100 Subject: [PATCH] Make sure that a invalid LED report is not sent Does not seem to make any difference, but just in case --- SRWS1.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SRWS1.cpp b/SRWS1.cpp index fa33a7a0..19003a27 100644 --- a/SRWS1.cpp +++ b/SRWS1.cpp @@ -113,7 +113,7 @@ void SRWS1::setLeds(uint16_t leds) { uint8_t buf[3]; buf[0] = 0x40; // Report ID buf[1] = leds & 0xFF; - buf[2] = leds >> 8; + buf[2] = (leds >> 8) & 0x7F; pUsb->outTransfer(bAddress, epInfo[ hidInterfaces[0].epIndex[epInterruptOutIndex] ].epAddr, sizeof(buf), buf); }