#580 RTU gateway multi-modem wired/wireless failover networking
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user