Edit: Button Press

If there is loot you have 5 seconds to press the button again (in this 5 seconds its blinking light blue). If done the payload is stopped. If the button is not pressed the payload keeps running until it's pressed again.
pull/23/head
Sebastian Seifert 2017-11-13 12:21:40 +01:00
parent b46d0b8d2d
commit ff32e6c548
1 changed files with 8 additions and 6 deletions

View File

@ -45,13 +45,15 @@ function run() {
do
NO_LED=true BUTTON && {
checkLog && {
LED FINISH
kill $npid
BUTTON 5s && {
LED FINISH
kill $npid
sleep 3
sleep 3
LED OFF
halt
LED OFF
halt
}
} || {
LED FAIL
sleep 3