mirror of
https://github.com/kepler155c/opus
synced 2025-10-10 05:17:42 +00:00
api change for modems
This commit is contained in:
@@ -30,7 +30,7 @@ function Peripheral.addDevice(deviceList, side)
|
||||
-- ptype = 'wireless_modem'
|
||||
-- else
|
||||
ptype = 'wired_modem'
|
||||
if dev.getMetadata then
|
||||
if dev.isAccessPoint then
|
||||
-- avoid open computer relays being registered
|
||||
-- as 'wired_modem'
|
||||
ptype = dev.getMetadata().name or 'wired_modem'
|
||||
|
@@ -2,7 +2,7 @@ local device = _G.device
|
||||
local kernel = _G.kernel
|
||||
|
||||
local function register(v)
|
||||
if v and v.isWireless and v.getMetadata and v.getNamesRemote then
|
||||
if v and v.isWireless and v.isAccessPoint and v.getNamesRemote then
|
||||
v.children = { }
|
||||
for _, name in pairs(v.getNamesRemote()) do
|
||||
local dev = v.getMethodsRemote(name)
|
||||
|
@@ -145,6 +145,7 @@ function kernel.newRoutine(args)
|
||||
timestamp = os.clock(),
|
||||
terminal = kernel.window,
|
||||
window = kernel.window,
|
||||
title = 'untitled',
|
||||
}, { __index = Routine })
|
||||
|
||||
Util.merge(routine, args)
|
||||
|
Reference in New Issue
Block a user