roughly working
This commit is contained in:
parent
3abeeddced
commit
d239e9ce34
22
src/main.cpp
22
src/main.cpp
|
@ -67,16 +67,24 @@ bool started = false;
|
|||
|
||||
bool allDone;
|
||||
|
||||
#define STATE_READY 1
|
||||
#define STATE_RUNNING 2
|
||||
#define STATE_DONE 3
|
||||
|
||||
short state = 0;
|
||||
|
||||
void loop()
|
||||
{
|
||||
|
||||
if (digitalRead(PIN_RESET) == LOW) {
|
||||
lcd.clear();
|
||||
lcd.setCursor(0,0);
|
||||
lcd.print("Ready?");
|
||||
started = false;
|
||||
resetCarTimers();
|
||||
digitalWrite(LED_BUILTIN, LOW);
|
||||
if (state != STATE_READY) {
|
||||
state = STATE_READY;
|
||||
lcd.clear();
|
||||
lcd.setCursor(0,0);
|
||||
lcd.print("Ready?");
|
||||
started = false;
|
||||
resetCarTimers();
|
||||
digitalWrite(LED_BUILTIN, LOW);
|
||||
}
|
||||
} else {
|
||||
// if we just started, record current millis counter
|
||||
if (!started) {
|
||||
|
|
Loading…
Reference in New Issue