#150 save and automatically set priority groups, added checks to set waste and set group commands, restore waste mode control if operation failed

This commit is contained in:
Mikayla Fischler
2023-02-03 16:40:58 -05:00
parent 72791d042b
commit a117d5ee97
6 changed files with 36 additions and 7 deletions

View File

@@ -292,6 +292,7 @@ function iocontrol.update_facility_status(status)
if (type(group_map) == "table") and (#group_map == fac.num_units) then
local names = { "Manual", "Primary", "Secondary", "Tertiary", "Backup" }
for i = 1, #group_map do
io.units[i].unit_ps.publish("auto_group_id", group_map[i] + 1)
io.units[i].unit_ps.publish("auto_group", names[group_map[i] + 1])
end
end