diff --git a/coordinator/sounder.lua b/coordinator/sounder.lua index 373b8f1..556fbbd 100644 --- a/coordinator/sounder.lua +++ b/coordinator/sounder.lua @@ -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 diff --git a/coordinator/startup.lua b/coordinator/startup.lua index 8af8567..ef035e7 100644 --- a/coordinator/startup.lua +++ b/coordinator/startup.lua @@ -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