diff options
Diffstat (limited to 'lib/support/drivers/hotplug/tilt.lua')
-rw-r--r-- | lib/support/drivers/hotplug/tilt.lua | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/lib/support/drivers/hotplug/tilt.lua b/lib/support/drivers/hotplug/tilt.lua deleted file mode 100644 index 1076479..0000000 --- a/lib/support/drivers/hotplug/tilt.lua +++ /dev/null @@ -1,19 +0,0 @@ -local device = _G - -api={} -api.getTilt = {} -api.getTilt.parameters = {} -- -- no input parameters -api.getTilt.returns = {[1]={rname="par1", rtype="int"}} -api.getTilt.call = function () - device:send(string.char(0x00)) -- codigo de operacion 0 - local sen_dig_response = device:read(3) - local raw_val - if not sen_dig_response or string.byte(sen_dig_response or "00000000", 2) == nil or string.byte(sen_dig_response or "00000000", 3) == nil - then - raw_val = "nil value" - else - raw_val = string.byte(sen_dig_response, 3) % 2 - end - return raw_val - -end |