Short-circuit eval in countdown.
This commit is contained in:
parent
f833578517
commit
3b8b6b6f5e
@ -1,7 +1,3 @@
|
|||||||
# needs a Weather Station
|
|
||||||
# a siren and an announcer (2x Kit (Speaker))
|
|
||||||
# and a display of some sort (Kit (Console))
|
|
||||||
|
|
||||||
alias Weather d0 # Weather Station
|
alias Weather d0 # Weather Station
|
||||||
alias Readout d1 # Kit (Console)
|
alias Readout d1 # Kit (Console)
|
||||||
alias Announcer d2 # Kit (Speaker)
|
alias Announcer d2 # Kit (Speaker)
|
||||||
@ -9,9 +5,7 @@ alias Siren d3 # Kit (Speaker)
|
|||||||
|
|
||||||
alias StormMode r0
|
alias StormMode r0
|
||||||
alias Minutes r1
|
alias Minutes r1
|
||||||
alias SirenHigh r2
|
alias SirenOn r2
|
||||||
alias SirenLow r3
|
|
||||||
alias SirenOn r4
|
|
||||||
|
|
||||||
s Announcer Mode 18 # "StormIncoming"
|
s Announcer Mode 18 # "StormIncoming"
|
||||||
s Siren Mode 10 # "Alarm8"
|
s Siren Mode 10 # "Alarm8"
|
||||||
@ -32,9 +26,8 @@ l Minutes Weather NextWeatherEventTime
|
|||||||
div Minutes Minutes 60 # convert to minutes
|
div Minutes Minutes 60 # convert to minutes
|
||||||
trunc Minutes Minutes # drop decimals
|
trunc Minutes Minutes # drop decimals
|
||||||
s Readout Setting Minutes # send to display
|
s Readout Setting Minutes # send to display
|
||||||
slt SirenHigh Minutes 3 # got less than 3m?
|
bgt Minutes 2 countdown # got more than 3m?
|
||||||
sgt SirenLow Minutes 0 # got more than 60s?
|
sgt SirenOn Minutes 0 # got more than 60s?
|
||||||
and SirenOn SirenHigh SirenLow # sound siren?
|
|
||||||
s Siren On SirenOn # start siren if 1<minutes<3
|
s Siren On SirenOn # start siren if 1<minutes<3
|
||||||
beq StormMode 1 countdown # still waiting? go back
|
beq StormMode 1 countdown # still waiting? go back
|
||||||
j start # reset and start waiting again
|
j start # reset and start waiting again
|
||||||
|
Loading…
Reference in New Issue
Block a user