Got an error message "Expression expected near >" when declaring the >> operator:
Code: Select all
t[i+1] = (value >> (i * 16)) & 0xFFFF
What is the correct way to use the << and >> operators in dzVents.
Code: Select all
...
execute = function(domoticz, device)
domoticz.log(("%s: %s"):format(device.name, device.sValue))
local value = tonumber(device.sValue)
local t = {}
for i = 0, 3 do
'ERROR
t[i+1] = (value >> (i * 16)) & 0xFFFF
end
domoticz.log(t)
end
...