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

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) {