From fcc4faefaab2d5cd9d2986ba599642583764ca25 Mon Sep 17 00:00:00 2001 From: "kepler155c@gmail.com" Date: Sun, 2 Jun 2019 22:44:27 -0400 Subject: [PATCH] shop monitor selection --- shellex/.package | 1 + swshop/shopConfig.lua | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/shellex/.package b/shellex/.package index 1044489..20a3c8c 100644 --- a/shellex/.package +++ b/shellex/.package @@ -2,6 +2,7 @@ title = 'Shell utilities', repository = 'kepler155c/opus-apps/{{OPUS_BRANCH}}/shellex', description = [[Experimental! +A port of openos shell tools. Linux style shell commands: grep, cat, touch, df, etc. diff --git a/swshop/shopConfig.lua b/swshop/shopConfig.lua index 8afd0bc..671fcc2 100644 --- a/swshop/shopConfig.lua +++ b/swshop/shopConfig.lua @@ -1,8 +1,8 @@ -local UI = require('ui') +local UI = require('ui') -local colors = _G.colors -local os = _G.os -local peripheral = _G.peripheral +local colors = _G.colors +local device = _G.device +local os = _G.os --[[ Configuration Page ]]-- local wizardPage = UI.WizardPage { @@ -64,8 +64,8 @@ function wizardPage:saveNode(node) end function wizardPage:isValidType(node) - local m = peripheral.getType(node.name) - return m == 'monitor' and { + local m = device[node.name] + return m and m.type == 'monitor' and { name = 'Store Front', value = 'shop', category = 'display',