#634 work on reactor PLC backplane

This commit is contained in:
Mikayla Fischler
2025-10-26 22:19:37 -04:00
parent 5acc6470e3
commit cddd9f7437
5 changed files with 153 additions and 134 deletions

View File

@@ -830,6 +830,22 @@ function plc.comms(version, nic, reactor, rps, conn_watchdog)
---@class plc_comms
local public = {}
-- switch the current active NIC
---@param _nic nic
function public.switch_nic(_nic)
nic.closeAll()
if _nic.isWireless() then
comms.set_trusted_range(config.TrustedRange)
end
-- configure receive channels
_nic.closeAll()
_nic.open(config.PLC_Channel)
nic = _nic
end
-- reconnect a newly connected reactor
---@param new_reactor table
function public.reconnect_reactor(new_reactor)