mirror of
https://github.com/kepler155c/opus
synced 2025-10-21 18:57:41 +00:00
remove dependency on device global
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
local UI = require('ui')
|
||||
|
||||
local colors = _G.colors
|
||||
local device = _G.device
|
||||
local peripheral = _G.peripheral
|
||||
local settings = _G.settings
|
||||
|
||||
@@ -34,11 +33,9 @@ local tab = UI.Tab {
|
||||
function tab:enable()
|
||||
local choices = { }
|
||||
|
||||
for _,v in pairs(device) do
|
||||
if v.type == 'monitor' then
|
||||
table.insert(choices, { name = v.side, value = v.side })
|
||||
end
|
||||
end
|
||||
peripheral.find('monitor', function(side)
|
||||
table.insert(choices, { name = side, value = side })
|
||||
end)
|
||||
|
||||
self.form.monitor.choices = choices
|
||||
self.form.monitor.value = settings.get('kiosk.monitor')
|
||||
|
Reference in New Issue
Block a user