improved abortion containment.
This commit is contained in:
parent
b4dd3e4cb1
commit
43eeb417e9
1 changed files with 12 additions and 2 deletions
14
src/main.cpp
14
src/main.cpp
|
@ -456,7 +456,6 @@ void serial_do_it() {
|
|||
lights[i].show();
|
||||
}
|
||||
serial_aborted = false;
|
||||
serial_received();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -484,8 +483,9 @@ void serial_record() {
|
|||
blink_status = true;
|
||||
int led[] = { BTN_LED_RED };
|
||||
|
||||
while (time < timeout) {
|
||||
while (!serial_aborted && (time < timeout)) {
|
||||
btn_red.update();
|
||||
ssp.loop();
|
||||
|
||||
if (btn_red.isPressed())
|
||||
break;
|
||||
|
@ -497,6 +497,11 @@ void serial_record() {
|
|||
}
|
||||
digitalWrite(BTN_LED_RED, LOW);
|
||||
|
||||
if (serial_aborted) {
|
||||
serial_aborted = false;
|
||||
return;
|
||||
}
|
||||
|
||||
serial_received();
|
||||
}
|
||||
|
||||
|
@ -570,6 +575,11 @@ void serial_userinteract() {
|
|||
}
|
||||
blink_status = false;
|
||||
|
||||
if (serial_aborted) {
|
||||
serial_aborted = false;
|
||||
return;
|
||||
}
|
||||
|
||||
serial_received(btn_pressed);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue