diff --git a/coordinator/iocontrol.lua b/coordinator/iocontrol.lua index 0a42038..26ef62b 100644 --- a/coordinator/iocontrol.lua +++ b/coordinator/iocontrol.lua @@ -112,7 +112,8 @@ function iocontrol.record_builds(builds) unit.reactor_ps.publish(key, val) end - if unit.reactor_data.mek_struct.length ~= 0 and unit.reactor_data.mek_struct.width ~= 0 then + if (type(unit.reactor_data.mek_struct.length) == "number") and (unit.reactor_data.mek_struct.length ~= 0) and + (type(unit.reactor_data.mek_struct.width) == "number") and (unit.reactor_data.mek_struct.width ~= 0) then unit.reactor_ps.publish("size", { unit.reactor_data.mek_struct.length, unit.reactor_data.mek_struct.width }) end end diff --git a/coordinator/startup.lua b/coordinator/startup.lua index 5416262..b4f3db4 100644 --- a/coordinator/startup.lua +++ b/coordinator/startup.lua @@ -16,7 +16,7 @@ local config = require("coordinator.config") local coordinator = require("coordinator.coordinator") local renderer = require("coordinator.renderer") -local COORDINATOR_VERSION = "alpha-v0.5.12" +local COORDINATOR_VERSION = "alpha-v0.6.0" local print = util.print local println = util.println diff --git a/coordinator/ui/components/unit_detail.lua b/coordinator/ui/components/unit_detail.lua index df79a00..182b773 100644 --- a/coordinator/ui/components/unit_detail.lua +++ b/coordinator/ui/components/unit_detail.lua @@ -141,6 +141,7 @@ local function init(parent, id) local rps_noc = IndicatorLight{parent=annunciator,label="No Coolant",colors=cpair(colors.yellow,colors.gray)} local rps_flt = IndicatorLight{parent=annunciator,label="PPM Fault",colors=cpair(colors.yellow,colors.gray),flash=true,period=period.BLINK_500_MS} local rps_tmo = IndicatorLight{parent=annunciator,label="Timeout",colors=cpair(colors.yellow,colors.gray),flash=true,period=period.BLINK_500_MS} + local rps_sfl = IndicatorLight{parent=annunciator,label="System Failure",colors=cpair(colors.orange,colors.gray),flash=true,period=period.BLINK_500_MS} r_ps.subscribe("rps_tripped", rps_trp.update) r_ps.subscribe("dmg_crit", rps_dmg.update) @@ -151,6 +152,7 @@ local function init(parent, id) r_ps.subscribe("no_cool", rps_noc.update) r_ps.subscribe("fault", rps_flt.update) r_ps.subscribe("timeout", rps_tmo.update) + r_ps.subscribe("sys_fail", rps_sfl.update) annunciator.line_break() @@ -171,7 +173,7 @@ local function init(parent, id) -- machine-specific indicators if unit.num_boilers > 0 then - TextBox{parent=main,x=32,y=34,text="B1",width=2,height=1,fg_bg=cpair(colors.black, colors.white)} + TextBox{parent=main,x=32,y=35,text="B1",width=2,height=1,fg_bg=cpair(colors.black, colors.white)} local b1_hr = IndicatorLight{parent=annunciator,label="Heating Rate Low",colors=cpair(colors.yellow,colors.gray)} b_ps[1].subscribe("HeatingRateLow", b1_hr.update) end diff --git a/supervisor/session/plc.lua b/supervisor/session/plc.lua index 079d8e9..6b066ef 100644 --- a/supervisor/session/plc.lua +++ b/supervisor/session/plc.lua @@ -304,7 +304,7 @@ function plc.new_session(id, for_reactor, in_queue, out_queue) self.sDB.formed = pkt.data[5] if not self.sDB.no_reactor and self.sDB.formed then - self.sDB.mek_status.heating_rate = pkt.data[6] + self.sDB.mek_status.heating_rate = pkt.data[6] or 0.0 -- attempt to read mek_data table if pkt.data[7] ~= nil then @@ -471,7 +471,7 @@ function plc.new_session(id, for_reactor, in_queue, out_queue) if self.received_struct then return self.sDB.mek_struct else - return nil + return {} end end @@ -480,7 +480,7 @@ function plc.new_session(id, for_reactor, in_queue, out_queue) if self.received_status_cache then return self.sDB.mek_status else - return nil + return {} end end diff --git a/supervisor/startup.lua b/supervisor/startup.lua index adf6437..2b3412d 100644 --- a/supervisor/startup.lua +++ b/supervisor/startup.lua @@ -13,7 +13,7 @@ local svsessions = require("supervisor.session.svsessions") local config = require("supervisor.config") local supervisor = require("supervisor.supervisor") -local SUPERVISOR_VERSION = "beta-v0.6.6" +local SUPERVISOR_VERSION = "beta-v0.6.7" local print = util.print local println = util.println