#574 possible fix for RTU formed checking
This commit is contained in:
@@ -466,6 +466,9 @@ end
|
||||
---@param smem rtu_shared_memory
|
||||
---@param unit rtu_registry_entry
|
||||
function threads.thread__unit_comms(smem, unit)
|
||||
-- print a log message to the terminal as long as the UI isn't running
|
||||
local function println_ts(message) if not smem.rtu_state.fp_ok then util.println_ts(message) end end
|
||||
|
||||
---@class parallel_thread
|
||||
local public = {}
|
||||
|
||||
@@ -538,6 +541,15 @@ function threads.thread__unit_comms(smem, unit)
|
||||
rtu_comms.send_remounted(unit.uid)
|
||||
elseif (is_formed == false) and unit.formed then
|
||||
log.warning(util.c(detail_name, " is no longer formed"))
|
||||
elseif is_formed == nil then
|
||||
log.error(util.c(detail_name, " failed to check if formed, attempting remount..."))
|
||||
|
||||
local type, dev = ppm.remount(unit.name)
|
||||
if type and dev then
|
||||
handle_unit_mount(smem, println_ts, unit.name, type, dev, unit)
|
||||
else
|
||||
log.error(util.c(detail_name, " failed to remount"))
|
||||
end
|
||||
end
|
||||
|
||||
unit.formed = is_formed
|
||||
|
||||
Reference in New Issue
Block a user