mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2025-07-26 03:22:51 +00:00
#589 cleanup and fixes
This commit is contained in:
@ -364,9 +364,9 @@ function facility.new(config)
|
||||
end
|
||||
end
|
||||
|
||||
-- initialize startup recovery
|
||||
-- initialize facility resume boot recovery
|
||||
---@param state sv_boot_state|nil
|
||||
function public.startup_recovery_init(state)
|
||||
function public.boot_recovery_init(state)
|
||||
if self.recovery == RCV_STATE.INACTIVE and state then
|
||||
self.recovery_boot_state = state
|
||||
self.recovery = RCV_STATE.PRIMED
|
||||
@ -374,9 +374,9 @@ function facility.new(config)
|
||||
end
|
||||
end
|
||||
|
||||
-- attempt startup recovery
|
||||
-- attempt facility resume boot recovery
|
||||
---@param auto_cfg start_auto_config configuration
|
||||
function public.startup_recovery_start(auto_cfg)
|
||||
function public.boot_recovery_start(auto_cfg)
|
||||
if self.recovery == RCV_STATE.PRIMED then
|
||||
self.recovery = util.trinary(_auto_check_and_save(auto_cfg), RCV_STATE.RUNNING, RCV_STATE.STOPPED)
|
||||
log.info(util.c("FAC: startup resume ", util.trinary(self.recovery == RCV_STATE.RUNNING, "started", "failed")))
|
||||
|
@ -145,7 +145,7 @@ function update.boot_recovery()
|
||||
|
||||
-- try to start auto control
|
||||
if self.recovery_boot_state.mode ~= nil and self.units_ready then
|
||||
if was_inactive then
|
||||
if not was_inactive then
|
||||
self.mode = self.mode_set
|
||||
log.info("FAC: process startup resume initiated")
|
||||
end
|
||||
|
@ -247,7 +247,7 @@ function coordinator.new_session(id, s_addr, i_seq_num, in_queue, out_queue, tim
|
||||
limits = pkt.data[5]
|
||||
}
|
||||
|
||||
facility.startup_recovery_start(config)
|
||||
facility.boot_recovery_start(config)
|
||||
else
|
||||
log.debug(log_tag .. "CRDN process ready packet length mismatch")
|
||||
end
|
||||
|
@ -148,7 +148,7 @@ local function main()
|
||||
local heartbeat_toggle = true
|
||||
|
||||
-- init startup recovery
|
||||
sv_facility.startup_recovery_init(supervisor.boot_state)
|
||||
sv_facility.boot_recovery_init(supervisor.boot_state)
|
||||
|
||||
-- event loop
|
||||
while true do
|
||||
|
Reference in New Issue
Block a user