mirror of
https://github.com/kepler155c/opus
synced 2024-12-27 09:00:41 +00:00
wizard - modem fixes
This commit is contained in:
parent
17d55e75ce
commit
f9359cf77f
@ -2364,8 +2364,8 @@ end
|
||||
function UI.Wizard:eventHandler(event)
|
||||
if event.type == 'nextView' then
|
||||
local currentView = Util.find(self.pages, 'enabled', true)
|
||||
local nextView = Util.find(self.pages, 'index', currentView.index + 1)
|
||||
if self:isViewValid() then
|
||||
local nextView = Util.find(self.pages, 'index', currentView.index + 1)
|
||||
currentView:emit({ type = 'enable_view', next = nextView, current = currentView })
|
||||
end
|
||||
|
||||
|
@ -30,7 +30,7 @@ end
|
||||
-- create a psuedo-device named 'wireleess_modem'
|
||||
kernel.hook('device_attach', function(_, eventData)
|
||||
local dev = device[eventData[1]]
|
||||
if dev.type == 'modem' then
|
||||
if dev and dev.type == 'modem' then
|
||||
if setModem(dev) then
|
||||
startNetwork()
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user