mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2024-08-30 18:22:34 +00:00
#174 fixed sounder not resuming on supervisor reconnect with same alarm states
This commit is contained in:
parent
6eee0d0c72
commit
7508acb1a7
@ -296,6 +296,9 @@ end
|
||||
function sounder.reconnect(speaker)
|
||||
alarm_ctl.speaker = speaker
|
||||
alarm_ctl.playing = false
|
||||
alarm_ctl.next_block = 1
|
||||
alarm_ctl.num_active = 0
|
||||
for id = 1, #TONES do TONES[id].active = false end
|
||||
end
|
||||
|
||||
-- check alarm state to enable/disable alarms
|
||||
|
@ -19,7 +19,7 @@ local iocontrol = require("coordinator.iocontrol")
|
||||
local renderer = require("coordinator.renderer")
|
||||
local sounder = require("coordinator.sounder")
|
||||
|
||||
local COORDINATOR_VERSION = "v0.11.0"
|
||||
local COORDINATOR_VERSION = "v0.11.1"
|
||||
|
||||
local print = util.print
|
||||
local println = util.println
|
||||
@ -314,9 +314,10 @@ local function main()
|
||||
log_comms(msg)
|
||||
println_ts(msg)
|
||||
|
||||
-- close connection and UI
|
||||
-- close connection, UI, and stop sounder
|
||||
coord_comms.close()
|
||||
renderer.close_ui()
|
||||
sounder.stop()
|
||||
|
||||
if not no_modem then
|
||||
-- try to re-connect to the supervisor
|
||||
@ -341,9 +342,10 @@ local function main()
|
||||
if not coord_comms.is_linked() then
|
||||
log_comms("supervisor closed connection")
|
||||
|
||||
-- close connection and UI
|
||||
-- close connection, UI, and stop sounder
|
||||
coord_comms.close()
|
||||
renderer.close_ui()
|
||||
sounder.stop()
|
||||
|
||||
if not no_modem then
|
||||
-- try to re-connect to the supervisor
|
||||
|
Loading…
Reference in New Issue
Block a user