Browse Source

Oops.

pyserial_fix
Scott Petersen 11 years ago
parent
commit
1e388d98b8
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      pyad2usb/messages.py

+ 1
- 1
pyad2usb/messages.py View File

@@ -192,7 +192,7 @@ class RFMessage(object):
self.serial_number, self.value = values.split(',') self.serial_number, self.value = values.split(',')
self.value = int(self.value, 16) self.value = int(self.value, 16)


is_bit_set = lambda v, b: self.value & (1 << b) > 0
is_bit_set = lambda b: self.value & (1 << b) > 0


# Bit 1 = unknown # Bit 1 = unknown
self.battery = is_bit_set(2) self.battery = is_bit_set(2)


Loading…
Cancel
Save