Fixed bug in getting the configured parameter type. Fixed bug in processing object presets.
This commit is contained in:
1 parent
6f0d7a747e
commit
1fe72e93a9
2 files changed
+3
-3
No files matched your search
+1
-1
@@ -13,9 +13,9 @@ MAX_PARAMETERS = 52
|
||||
getLsb = (num) ->
|
||||
i = -1
|
||||
while num > 0
|
||||
++ i
|
||||
break if num & 1
|
||||
num >>= 1
|
||||
++ i
|
||||
return i
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -200,7 +200,7 @@ exports.processDevicePreset = (deviceId, devicePreset, callback) ->
|
||||
for objectName, objectDetails of object
|
||||
continue if not objectDetails.current?
|
||||
if objectDetails.preset?
|
||||
if Object.keys(objectDetails.current) > 0
|
||||
if Object.keys(objectDetails.current).length > 0
|
||||
for i, obj of objectDetails.current
|
||||
for paramName, paramValue of objectDetails.preset
|
||||
continue if paramName[0] == '_'
|
||||
@@ -214,7 +214,7 @@ exports.processDevicePreset = (deviceId, devicePreset, callback) ->
|
||||
for k,v of objectDetails.preset
|
||||
vals.push([k, v]) if k[0] != '_'
|
||||
taskList.push({device : deviceId, name : 'addObject', objectName : parameterPath, parameterValues : vals, instanceName : objectName})
|
||||
else if Object.keys(objectDetails.current) > 0
|
||||
else if Object.keys(objectDetails.current).length > 0
|
||||
for i, obj of objectDetails.current
|
||||
taskList.push({device : deviceId, name : 'deleteObject', objectName : "#{parameterPath}.#{i}"})
|
||||
|
||||
|
||||
Reference in new issue
Block a user