Skip to content

Commit

Permalink
configurator summary enhancements
Browse files Browse the repository at this point in the history
  • Loading branch information
MikaylaFischler committed Feb 26, 2025
1 parent 5fc8912 commit 1971153
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 12 deletions.
2 changes: 1 addition & 1 deletion coordinator/config/system.lua
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ function system.create(tool_ctl, main_pane, cfg_sys, divs, ext, style)
local c = util.trinary(alternate, g_lg_fg_bg, cpair(colors.gray,colors.white))
alternate = not alternate

if string.len(val) > val_max_w then
if (string.len(val) > val_max_w) or string.find(val, "\n") then
local lines = util.strwrap(val, inner_width)
height = #lines + 1
end
Expand Down
2 changes: 1 addition & 1 deletion coordinator/startup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ local renderer = require("coordinator.renderer")
local sounder = require("coordinator.sounder")
local threads = require("coordinator.threads")

local COORDINATOR_VERSION = "v1.6.10"
local COORDINATOR_VERSION = "v1.6.11"

local CHUNK_LOAD_DELAY_S = 30.0

Expand Down
2 changes: 1 addition & 1 deletion pocket/config/system.lua
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ function system.create(tool_ctl, main_pane, cfg_sys, divs, style, exit)
local c = tri(alternate, g_lg_fg_bg, cpair(colors.gray,colors.white))
alternate = not alternate

if string.len(val) > val_max_w then
if (string.len(val) > val_max_w) or string.find(val, "\n") then
local lines = util.strwrap(val, inner_width)
height = #lines + 1
end
Expand Down
2 changes: 1 addition & 1 deletion pocket/startup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ local pocket = require("pocket.pocket")
local renderer = require("pocket.renderer")
local threads = require("pocket.threads")

local POCKET_VERSION = "v0.13.0-beta"
local POCKET_VERSION = "v0.13.1-beta"

local println = util.println
local println_ts = util.println_ts
Expand Down
2 changes: 1 addition & 1 deletion reactor-plc/config/system.lua
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ function system.create(tool_ctl, main_pane, cfg_sys, divs, style, exit)
local c = util.trinary(alternate, g_lg_fg_bg, cpair(colors.gray,colors.white))
alternate = not alternate

if string.len(val) > val_max_w then
if (string.len(val) > val_max_w) or string.find(val, "\n") then
local lines = util.strwrap(val, inner_width)
height = #lines + 1
end
Expand Down
2 changes: 1 addition & 1 deletion reactor-plc/startup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ local plc = require("reactor-plc.plc")
local renderer = require("reactor-plc.renderer")
local threads = require("reactor-plc.threads")

local R_PLC_VERSION = "v1.8.18"
local R_PLC_VERSION = "v1.8.19"

local println = util.println
local println_ts = util.println_ts
Expand Down
2 changes: 1 addition & 1 deletion rtu/config/system.lua
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ function system.create(tool_ctl, main_pane, cfg_sys, divs, ext, style)
local c = tri(alternate, g_lg_fg_bg, cpair(colors.gray,colors.white))
alternate = not alternate

if string.len(val) > val_max_w then
if (string.len(val) > val_max_w) or string.find(val, "\n") then
local lines = util.strwrap(val, inner_width)
height = #lines + 1
end
Expand Down
2 changes: 1 addition & 1 deletion rtu/startup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ local sna_rtu = require("rtu.dev.sna_rtu")
local sps_rtu = require("rtu.dev.sps_rtu")
local turbinev_rtu = require("rtu.dev.turbinev_rtu")

local RTU_VERSION = "v1.11.5"
local RTU_VERSION = "v1.11.6"

local RTU_UNIT_TYPE = types.RTU_UNIT_TYPE
local RTU_HW_STATE = databus.RTU_HW_STATE
Expand Down
20 changes: 17 additions & 3 deletions supervisor/config/system.lua
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,13 @@ function system.create(tool_ctl, main_pane, cfg_sys, divs, fac_pane, style, exit

val = ""

local count = 0
for idx = 1, #tank_list do
if tank_list[idx] > 0 then count = count + 1 end
end

local bullet = tri(count < 2, "", " \x07 ")

for idx = 1, #tank_list do
local prefix = "?"
local fluid = "water"
Expand All @@ -646,17 +653,24 @@ function system.create(tool_ctl, main_pane, cfg_sys, divs, fac_pane, style, exit
fluid = "sodium"
end

val = val .. tri(val == "", "", "\n") .. util.sprintf(" \x07 tank %s - %s", prefix, fluid)
val = val .. tri(val == "", "", "\n") .. util.sprintf(bullet .. "tank %s - %s", prefix, fluid)
end
end

if val == "" then val = "no emergency coolant tanks" end
elseif f[1] == "AuxiliaryCoolant" then
val = ""

local count = 0
for idx = 1, #cfg.AuxiliaryCoolant do
if cfg.AuxiliaryCoolant[idx] then count = count + 1 end
end

local bullet = tri(count < 2, "", " \x07 ")

for idx = 1, #cfg.AuxiliaryCoolant do
if cfg.AuxiliaryCoolant[idx] then
val = val .. tri(val == "", "", "\n") .. util.sprintf(" \x07 auxiliary coolant for unit %d", idx)
val = val .. tri(val == "", "", "\n") .. util.sprintf(bullet .. "unit %d", idx)
end
end

Expand All @@ -669,7 +683,7 @@ function system.create(tool_ctl, main_pane, cfg_sys, divs, fac_pane, style, exit
local c = tri(alternate, g_lg_fg_bg, cpair(colors.gray,colors.white))
alternate = not alternate

if string.len(val) > val_max_w then
if (string.len(val) > val_max_w) or string.find(val, "\n") then
local lines = util.strwrap(val, inner_width)
height = #lines + 1
end
Expand Down
2 changes: 1 addition & 1 deletion supervisor/startup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ local supervisor = require("supervisor.supervisor")

local svsessions = require("supervisor.session.svsessions")

local SUPERVISOR_VERSION = "v1.6.7"
local SUPERVISOR_VERSION = "v1.6.8"

local println = util.println
local println_ts = util.println_ts
Expand Down

0 comments on commit 1971153

Please sign in to comment.