#580 RTU gateway multi-modem wired/wireless failover networking

This commit is contained in:
Mikayla Fischler
2025-10-18 17:23:06 -04:00
parent fe9ee313f9
commit 1fcc91e98b
6 changed files with 162 additions and 42 deletions

View File

@@ -447,15 +447,15 @@ end
---@return table|nil reactor function table
function ppm.get_fission_reactor() return ppm.get_device("fissionReactorLogicAdapter") end
-- get a wired modem by name
-- get a modem by name
---@nodiscard
---@param iface string CC peripheral interface
---@return Modem|nil modem function table
function ppm.get_wired_modem(iface)
function ppm.get_modem(iface)
local modem = nil
local device = ppm_sys.mounts[iface]
if device.type == "modem" then modem = device.dev end
if device and device.type == "modem" then modem = device.dev end
return modem
end