Add lua version and fix scripts.zip build job.
This commit is contained in:
@@ -137,7 +137,7 @@ System.setProperty("line.separator", "\n")
|
||||
|
||||
task packageScripts(type: Zip) {
|
||||
archiveFileName = "scripts.zip"
|
||||
destinationDirectory = file("$buildDir/resources/main/data/oc2/file_systems")
|
||||
destinationDirectory = file("$buildDir/resources/main/data/oc2r/file_systems")
|
||||
from "src/main/scripts"
|
||||
filter { line -> line }
|
||||
}
|
||||
|
||||
@@ -228,6 +228,31 @@ function DeviceBus:find(deviceTypeName)
|
||||
return nil, "no device of type [" .. deviceTypeName .. "]"
|
||||
end
|
||||
|
||||
function DeviceBus:findAll(deviceTypeName)
|
||||
local devices, status = self:list()
|
||||
|
||||
local found = {}
|
||||
|
||||
if not devices then
|
||||
return nil, status
|
||||
end
|
||||
|
||||
for _, device in ipairs(devices) do
|
||||
if device.typeNames then
|
||||
for _, typeName in ipairs(device.typeNames) do
|
||||
if typeName == deviceTypeName then
|
||||
found[#found+1] = Device:new(self, device)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if #found == 0 then return nil, "no device of type [" .. deviceTypeName .. "]" end
|
||||
|
||||
return found
|
||||
end
|
||||
|
||||
|
||||
function DeviceBus:methods(deviceId)
|
||||
self:flush()
|
||||
writeMessage(self, { type = "methods", data = deviceId })
|
||||
|
||||
Reference in New Issue
Block a user