milo config backups

This commit is contained in:
kepler155c@gmail.com
2019-03-12 10:20:02 -04:00
parent 7ac10948df
commit d8e0a669af
2 changed files with 8 additions and 5 deletions

View File

@@ -2,9 +2,9 @@ local Milo = require('milo')
local Sound = require('sound')
local UI = require('ui')
local colors = _G.colors
local context = Milo:getContext()
local peripheral = _G.peripheral
local colors = _G.colors
local device = _G.device
local context = Milo:getContext()
local speakerNode = context.storage:getSingleNode('speaker')
if speakerNode then
@@ -50,7 +50,8 @@ function wizardPage:validate()
end
function wizardPage:isValidType(node)
return node.adapter and node.adapter.type == 'speaker' and {
local m = device[node.name]
return m and m.type == 'speaker' and {
name = 'Speaker',
value = 'speaker',
category = 'custom',