mirror of
https://github.com/kepler155c/opus
synced 2025-11-13 22:07:10 +00:00
bit of everything
This commit is contained in:
@@ -116,23 +116,20 @@ function page.grid:getDisplayValues(row)
|
||||
return row
|
||||
end
|
||||
|
||||
Event.addThread(function()
|
||||
while true do
|
||||
page.grid:update()
|
||||
page.grid:draw()
|
||||
page:sync()
|
||||
os.sleep(1)
|
||||
end
|
||||
Event.onInterval(1, function()
|
||||
page.grid:update()
|
||||
page.grid:draw()
|
||||
page:sync()
|
||||
end)
|
||||
|
||||
Event.addHandler('device_attach', function(h, deviceName)
|
||||
Event.on('device_attach', function(h, deviceName)
|
||||
if deviceName == 'wireless_modem' then
|
||||
page.notification:success('Modem connected')
|
||||
page:sync()
|
||||
end
|
||||
end)
|
||||
|
||||
Event.addHandler('device_detach', function(h, deviceName)
|
||||
Event.on('device_detach', function(h, deviceName)
|
||||
if deviceName == 'wireless_modem' then
|
||||
page.notification:error('Wireless modem not attached')
|
||||
page:sync()
|
||||
|
||||
Reference in New Issue
Block a user