fixed coordinator bug with fp init, fixed incorrect comments
This commit is contained in:
@@ -34,18 +34,10 @@ local HIGH_RTT = 1500 -- 3.33x as long as expected w/ 0 ping
|
|||||||
local iocontrol = {}
|
local iocontrol = {}
|
||||||
|
|
||||||
---@class ioctl
|
---@class ioctl
|
||||||
local io = {}
|
local io = {
|
||||||
|
|
||||||
-- initialize front panel PSIL
|
|
||||||
---@param firmware_v string coordinator version
|
|
||||||
---@param comms_v string comms version
|
|
||||||
function iocontrol.init_fp(firmware_v, comms_v)
|
|
||||||
---@class ioctl_front_panel
|
---@class ioctl_front_panel
|
||||||
io.fp = { ps = psil.create() }
|
fp = { ps = psil.create() }
|
||||||
|
}
|
||||||
io.fp.ps.publish("version", firmware_v)
|
|
||||||
io.fp.ps.publish("comms_version", comms_v)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- initialize the coordinator IO controller
|
-- initialize the coordinator IO controller
|
||||||
---@param conf facility_conf configuration
|
---@param conf facility_conf configuration
|
||||||
@@ -290,6 +282,14 @@ end
|
|||||||
-- toggle heartbeat indicator
|
-- toggle heartbeat indicator
|
||||||
function iocontrol.heartbeat() io.fp.ps.toggle("heartbeat") end
|
function iocontrol.heartbeat() io.fp.ps.toggle("heartbeat") end
|
||||||
|
|
||||||
|
-- report versions to front panel
|
||||||
|
---@param firmware_v string coordinator version
|
||||||
|
---@param comms_v string comms version
|
||||||
|
function iocontrol.fp_versions(firmware_v, comms_v)
|
||||||
|
io.fp.ps.publish("version", firmware_v)
|
||||||
|
io.fp.ps.publish("comms_version", comms_v)
|
||||||
|
end
|
||||||
|
|
||||||
-- report presence of the wired comms modem
|
-- report presence of the wired comms modem
|
||||||
---@param has_modem boolean
|
---@param has_modem boolean
|
||||||
function iocontrol.fp_has_wd_modem(has_modem) io.fp.ps.publish("has_wd_modem", has_modem) end
|
function iocontrol.fp_has_wd_modem(has_modem) io.fp.ps.publish("has_wd_modem", has_modem) end
|
||||||
|
|||||||
@@ -136,8 +136,8 @@ local function main()
|
|||||||
-- system startup
|
-- system startup
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
|
|
||||||
-- report versions/init fp PSIL
|
-- report versions
|
||||||
iocontrol.init_fp(COORDINATOR_VERSION, comms.version)
|
iocontrol.fp_versions(COORDINATOR_VERSION, comms.version)
|
||||||
|
|
||||||
-- init renderer
|
-- init renderer
|
||||||
renderer.configure(config)
|
renderer.configure(config)
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ local function main()
|
|||||||
-- startup
|
-- startup
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
|
|
||||||
-- record firmware versions and ID
|
-- report versions and ID
|
||||||
databus.tx_versions(R_PLC_VERSION, comms.version)
|
databus.tx_versions(R_PLC_VERSION, comms.version)
|
||||||
databus.tx_id(config.UnitID)
|
databus.tx_id(config.UnitID)
|
||||||
|
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ local function main()
|
|||||||
-- startup
|
-- startup
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
|
|
||||||
-- record firmware versions and ID
|
-- report versions
|
||||||
databus.tx_versions(RTU_VERSION, comms.version)
|
databus.tx_versions(RTU_VERSION, comms.version)
|
||||||
|
|
||||||
-- mount connected devices
|
-- mount connected devices
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ local function main()
|
|||||||
-- startup
|
-- startup
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
|
|
||||||
-- record firmware versions and ID
|
-- report versions
|
||||||
databus.tx_versions(SUPERVISOR_VERSION, comms.version)
|
databus.tx_versions(SUPERVISOR_VERSION, comms.version)
|
||||||
|
|
||||||
-- mount connected devices
|
-- mount connected devices
|
||||||
|
|||||||
Reference in New Issue
Block a user