diff --git a/reactor-plc/databus.lua b/reactor-plc/databus.lua index 82bd937..6d2e81d 100644 --- a/reactor-plc/databus.lua +++ b/reactor-plc/databus.lua @@ -22,12 +22,7 @@ local _dbus = { -- evaluate and publish system health status local function eval_status() local ok = not _dbus.degraded - - if ok then - for _, v in pairs(_dbus.coroutines) do - ok = ok and v - end - end + for _, v in pairs(_dbus.coroutines) do ok = ok and v end databus.ps.publish("status", ok) end diff --git a/rtu/databus.lua b/rtu/databus.lua index 296e6d6..44b7969 100644 --- a/rtu/databus.lua +++ b/rtu/databus.lua @@ -16,12 +16,7 @@ local _dbus = { -- evaluate and publish system health status local function eval_status() local ok = _dbus.wd_modem and _dbus.wl_modem - - if ok then - for _, v in pairs(_dbus.coroutines) do - ok = ok and v - end - end + for _, v in pairs(_dbus.coroutines) do ok = ok and v end databus.ps.publish("status", ok) end