review fixes

This commit is contained in:
Mikayla
2025-11-07 23:19:14 +00:00
parent 50dedaa7c8
commit 2ecb662b0a
11 changed files with 46 additions and 42 deletions

View File

@@ -36,7 +36,8 @@ local changes = {
{ "v1.2.12", { "Added main UI theme", "Added front panel UI theme", "Added color accessibility modes" } },
{ "v1.3.3", { "Added standard with black off state color mode", "Added blue indicator color modes" } },
{ "v1.5.1", { "Added energy scale options" } },
{ "v1.6.13", { "Added option for Po/Pu pellet green/cyan pairing" } }
{ "v1.6.13", { "Added option for Po/Pu pellet green/cyan pairing" } },
{ "v1.7.0", { "Added support for wired communications modems" } }
}
---@class crd_configurator

View File

@@ -193,7 +193,7 @@ function coordinator.comms(version, nic, wl_nic, sv_watchdog)
apisessions.init(wl_nic, config)
end
-- PRIVATE FUNCTIONS --
--#region PRIVATE FUNCTIONS --
-- send a packet to the supervisor
---@param msg_type MGMT_TYPE|CRDN_TYPE
@@ -245,7 +245,9 @@ function coordinator.comms(version, nic, wl_nic, sv_watchdog)
_send_sv(PROTOCOL.SCADA_MGMT, MGMT_TYPE.KEEP_ALIVE, { srv_time, util.time() })
end
-- PUBLIC FUNCTIONS --
--#endregion
--#region PUBLIC FUNCTIONS --
---@class coord_comms
local public = {}
@@ -734,6 +736,8 @@ function coordinator.comms(version, nic, wl_nic, sv_watchdog)
---@nodiscard
function public.is_linked() return self.sv_linked end
--#endregion
return public
end

View File

@@ -290,11 +290,11 @@ end
-- toggle heartbeat indicator
function iocontrol.heartbeat() io.fp.ps.toggle("heartbeat") end
-- report presence of the wired modem
-- report presence of the wired comms modem
---@param has_modem boolean
function iocontrol.fp_has_wd_modem(has_modem) io.fp.ps.publish("has_wd_modem", has_modem) end
-- report presence of the wireless modem
-- report presence of the wireless comms modem
---@param has_modem boolean
function iocontrol.fp_has_wl_modem(has_modem) io.fp.ps.publish("has_wl_modem", has_modem) end
@@ -308,7 +308,7 @@ function iocontrol.fp_link_state(state) io.fp.ps.publish("link_state", state) en
-- report monitor connection state
---@param id string|integer unit ID for unit monitor, "main" for main monitor, or "flow" for flow monitor
---@param connected 1|2|3 1 for disconnected, 2 for connected but no view (may not fit), 3 for connected with view shown
---@param connected 1|2|3 1 for disconnected, 2 for connected but no view (may not fit), 3 for connected with view rendered
function iocontrol.fp_monitor_state(id, connected)
local name = nil