This commit is contained in:
Mikayla Fischler 2025-02-09 13:37:22 -05:00
parent 54167e2113
commit 3b2fb00285
5 changed files with 13 additions and 11 deletions

View File

@ -19,7 +19,7 @@ local renderer = require("coordinator.renderer")
local sounder = require("coordinator.sounder")
local threads = require("coordinator.threads")
local COORDINATOR_VERSION = "v1.6.4"
local COORDINATOR_VERSION = "v1.6.5"
local CHUNK_LOAD_DELAY_S = 30.0

View File

@ -79,7 +79,7 @@ function facility.new(config)
io_ctl = nil, ---@type rs_controller
-- process control
recovery = RCV_STATE.INACTIVE, ---@type RECOVERY_STATE
recovery_boot_state = nil, ---@type sv_control_state|nil
recovery_boot_state = nil, ---@type sv_boot_state|nil
last_unit_states = {}, ---@type boolean[]
units_ready = false,
mode = PROCESS.INACTIVE, ---@type PROCESS
@ -403,7 +403,7 @@ function facility.new(config)
end
-- initialize startup recovery
---@param state sv_control_state|nil
---@param state sv_boot_state|nil
function public.startup_recovery_init(state)
if self.recovery == RCV_STATE.INACTIVE and state then
self.recovery_boot_state = state

View File

@ -240,11 +240,11 @@ function coordinator.new_session(id, s_addr, i_seq_num, in_queue, out_queue, tim
---@type start_auto_config
local config = {
mode = pkt.data[1], ---@type PROCESS
burn_target = pkt.data[2], ---@type number
charge_target = pkt.data[3], ---@type number
gen_target = pkt.data[4], ---@type number
limits = pkt.data[5] ---@type number[]
mode = pkt.data[1],
burn_target = pkt.data[2],
charge_target = pkt.data[3],
gen_target = pkt.data[4],
limits = pkt.data[5]
}
facility.startup_recovery_start(config)

View File

@ -392,9 +392,8 @@ function svsessions.init(nic, fp_ok, config, facility)
conns.tanks[1] = true
end
self.dev_dbg.connected.units[i] = conns
self.plc_ini_reset[i] = true
self.dev_dbg.connected.units[i] = conns
end
end

View File

@ -19,11 +19,14 @@ local config = {}
supervisor.config = config
-- control state from last unexpected shutdown
supervisor.boot_state = nil ---@type sv_boot_state|nil
-- load the supervisor configuration and startup state
function supervisor.load_config()
if not settings.load("/supervisor.settings") then return false end
---@class sv_control_state
---@class sv_boot_state
local boot_state = {
mode = settings.get("LastProcessState"), ---@type PROCESS
unit_states = settings.get("LastUnitStates") ---@type boolean[]