From d67e637f2faaa516258c8bb0b003eb98bad98f9c Mon Sep 17 00:00:00 2001 From: Kristian Sloth Lauszus Date: Mon, 21 Mar 2016 17:57:43 +0100 Subject: [PATCH] Updated some comments --- examples/HID/SRWS1/SRWS1.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/HID/SRWS1/SRWS1.ino b/examples/HID/SRWS1/SRWS1.ino index 646f3df2..f4a5e2a7 100644 --- a/examples/HID/SRWS1/SRWS1.ino +++ b/examples/HID/SRWS1/SRWS1.ino @@ -41,13 +41,13 @@ void loop() { leds <<= 1; if (leds == 0x8000) // All are actually turned off, as there is only 15 LEDs dirUp = false; // If we have reached the end i.e. all LEDs are off, then change direction - else if (!(leds & 0x8000)) // If last bit is not set set the lowest bit + else if (!(leds & 0x8000)) // If last bit is not set, then set the lowest bit leds |= 1; // Set lowest bit } else { leds >>= 1; if (leds == 0) // Check if all LEDs are off dirUp = true; // If all LEDs are off, then repeat the sequence - else if (!(leds & 0x1)) // If last bit is not set set the lowest bit + else if (!(leds & 0x1)) // If last bit is not set, then set the top bit leds |= 1 << 15; // Set top bit } }