class TeletaskApi::Converter
Public Class Methods
byte_to_humidity(byte)
click to toggle source
# File lib/converter.rb, line 11 def self.byte_to_humidity byte raise NotImplementedError end
byte_to_lux(byte)
click to toggle source
# File lib/converter.rb, line 19 def self.byte_to_lux byte raise NotImplementedError end
humidity_to_byte(humidity)
click to toggle source
# File lib/converter.rb, line 15 def self.humidity_to_byte humidity raise NotImplementedError end
lux_to_byte(lux)
click to toggle source
# File lib/converter.rb, line 23 def self.lux_to_byte lux raise NotImplementedError end
short_to_temperature(short)
click to toggle source
# File lib/converter.rb, line 3 def self.short_to_temperature short (short.pack("cc").unpack("s>").first / 10.0 - 273).round(1) end
temperature_to_short(temperature_to_short)
click to toggle source
# File lib/converter.rb, line 7 def self.temperature_to_short temperature_to_short raise NotImplementedError end