class Rumba::Sensor::WheelOvercurrents

Public Class Methods

convert(v) click to toggle source
# File lib/rumba/sensors.rb, line 68
def self.convert(v)
  h = {}
  h[:side_brush]  = v & 0b1     > 0
  h[:main_brush]  = v & 0b100   > 0
  h[:right_wheel] = v & 0b1000  > 0
  h[:left_wheel]  = v & 0b10000 > 0
  h
end