Restart coffee making while slowing down

This commit is contained in:
Klemens Schölhorn 2018-06-08 23:14:33 +02:00
parent 2a785dd71d
commit 01274b2bba
1 changed files with 6 additions and 1 deletions

View File

@ -85,7 +85,12 @@ void loop() {
}
break;
case State::Slowing:
Serial.println(eegLedDelay);
if(event == ButtonEvent::Press || event == ButtonEvent::LongPress) {
tmrpcm.play("coffee.wav");
state = State::MakingCoffee;
coffeeLedTimeout = millis();
}
if((uint16_t) millis() - eegLedDelayTimeout >= 300) {
eegLedDelayTimeout = millis();
if(eegLedDelay > maxEegLedDelay) {