diff --git a/src/WSLed.cpp b/src/WSLed.cpp index 9b6fd09..922227a 100644 --- a/src/WSLed.cpp +++ b/src/WSLed.cpp @@ -140,8 +140,7 @@ void wsLED::rtLed() { break; case LED_BREATH: { - ++mSubState; - mSubState %= countof(LB); + mSubState = (mSubState + 1) % countof(LB); uint16_t val = pgm_read_word(&LB[mSubState]); mScale = (uint8_t) val; val >>= 8;