#580 comment updates, rtu listen fix, and trusted range init change

This commit is contained in:
Mikayla Fischler
2025-11-02 14:30:02 -05:00
parent 0417986c15
commit d9001090c2
3 changed files with 31 additions and 17 deletions

View File

@@ -559,16 +559,16 @@ function plc.comms(version, nic, reactor, rps, conn_watchdog)
max_burn_rate = nil
}
if nic.isWireless() then
if config.WirelessModem then
comms.set_trusted_range(config.TrustedRange)
end
-- PRIVATE FUNCTIONS --
-- configure network channels
nic.closeAll()
nic.open(config.PLC_Channel)
--#region PRIVATE FUNCTIONS --
-- send an RPLC packet
---@param msg_type RPLC_TYPE
---@param msg table
@@ -825,7 +825,9 @@ function plc.comms(version, nic, reactor, rps, conn_watchdog)
end
end
-- PUBLIC FUNCTIONS --
--#endregion
--#region PUBLIC FUNCTIONS --
---@class plc_comms
local public = {}
@@ -835,10 +837,6 @@ function plc.comms(version, nic, reactor, rps, conn_watchdog)
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)
@@ -1123,6 +1121,8 @@ function plc.comms(version, nic, reactor, rps, conn_watchdog)
---@nodiscard
function public.is_linked() return self.linked end
--#endregion
return public
end