diff --git a/src/main.cpp b/src/main.cpp index e79aeda..5095e04 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -343,16 +343,19 @@ void SetSaturation_execute(int shift) { void LightOn_execute(int shift) { uint16_t &ledOnCounter = ledRingState.ledRingColorState.ledOnCounter; + static bool clockwise = true; - if (shift > 0) { + if ((shift > 0) != !clockwise) { ++ledOnCounter; if (ledOnCounter > LedCount) { - ledOnCounter = 0; + ledOnCounter = LedCount; + clockwise = !clockwise; } } else { --ledOnCounter; if (ledOnCounter == UINT16_MAX) { - ledOnCounter = LedCount; + ledOnCounter = 0; + clockwise = !clockwise; } }