|
@@ -167,7 +167,8 @@ void displayStateUpdated(event_t *event) {
|
|
|
coffee_status_t state = *(coffee_status_t*) event->data;
|
|
|
if (state != coffeeState) {
|
|
|
coffeeState = state;
|
|
|
- timerScaler = REFRESH_RATE;
|
|
|
+ if (timerScaler)
|
|
|
+ timerScaler--;
|
|
|
elapsedCnt = 0;
|
|
|
displayTimer.call();
|
|
|
}
|
|
@@ -186,7 +187,8 @@ void displayModeUpdated(event_t *event) {
|
|
|
coffee_mode_t mode = *(coffee_mode_t*) event->data;
|
|
|
if (mode != coffeeMode) {
|
|
|
coffeeMode = mode;
|
|
|
- timerScaler = REFRESH_RATE;
|
|
|
+ if (timerScaler)
|
|
|
+ timerScaler--;
|
|
|
elapsedCnt = 0;
|
|
|
displayTimer.call();
|
|
|
}
|