Class: Rumba::Sensor::WheelOvercurrents
- Inherits:
-
Object
- Object
- Rumba::Sensor::WheelOvercurrents
- Defined in:
- lib/rumba/sensors.rb
Class Method Summary collapse
Class Method Details
.convert(v) ⇒ Object
68 69 70 71 72 73 74 75 |
# 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 |