CaptSnus/ShelfEdgeClock

color change (per minute) not working

CaptSnus opened this issue · 2 comments

Describe the bug
If you set the color change function to "every minute", the color won't change every minute.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Einstellungen -> Uhr'
  2. Click on 'Front - Farbwechsel'
  3. Choose 'jede minute'
  4. See led, they won't change color every minute

Expected behavior
A color change every minute

Additional context
Add any other context about the problem here.

changed the code from resetting the respective flags in the loop to resetting the flags in the respective mode...

added the following flags:

bool clockMinPassed      = true;    // flag for the color change of the clock face (1 min)
bool clockHourPassed     = true;    // flag for the color change of the clock face (1 hour)
bool clockDayPassed      = true;    // flag for the color change of the clock face (1 day)
bool downMinPassed       = true;    // flag for the color change of the downlights (1 min)
bool downHourPassed      = true;    // flag for the color change of the downlights (1 hour)
bool downDayPassed       = true;    // flag for the color change of the downlights (1 day)

clearing the flag of the edge lights (in current active mode)

downMinPassed  = false;     // reset the color change flag (1 min)
downHourPassed = false;     // reset the color change flag (1 hour)
downDayPassed  = false;     // reset the color change flag (1 day)

clearing the flag of the downlights

downMinPassed  = false;      // reset the color change flag (1 min)
downHourPassed = false;      // reset the color change flag (1 hour)
downDayPassed  = false;      // reset the color change flag (1 day)

Seems to work now -> adding it to the next release