#491 fixed ps table indexing for boiler/turbine online

This commit is contained in:
Mikayla Fischler
2024-05-16 22:06:53 -04:00
parent 41b7a68f3e
commit 9b8947fba2
2 changed files with 9 additions and 3 deletions

View File

@@ -603,11 +603,17 @@ function iocontrol.record_unit_data(data)
for key, val in pairs(unit.annunciator) do
if key == "BoilerOnline" or key == "TurbineOnline" then
-- split up online arrays
local every = true
-- split up online arrays
for id = 1, #val do
every = every and val[id]
unit.boiler_ps_tbl[id].publish(key, val[id])
if key == "BoilerOnline" then
unit.boiler_ps_tbl[id].publish(key, val[id])
else
unit.turbine_ps_tbl[id].publish(key, val[id])
end
end
if not every then rcs_disconn = true end