some more python3 fixes (#8)
Add python3 compatibility to raspyrfm module and lacrosss/sensors.py. More things to fix for overall python3 suitability, but I can only test what I personally use :-)
This commit is contained in:
parent
99b37cbb29
commit
3e70559ef2
3 changed files with 3 additions and 3 deletions
|
@ -39,7 +39,7 @@ class BaudChanger(threading.Thread):
|
|||
dr = 9.579
|
||||
else:
|
||||
dr = 17.241
|
||||
print "Switch baudrate to " + str(dr) + " kbit/s"
|
||||
print("Switch baudrate to " + str(dr) + " kbit/s")
|
||||
rfm.set_params(Datarate = dr)
|
||||
self.baud = not self.baud
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ class lacross(rawsensor):
|
|||
|
||||
@staticmethod
|
||||
def Create(data):
|
||||
if (len(data[0]) < 5) or (crc8(data[0]) <> 0):
|
||||
if (len(data[0]) < 5) or (crc8(data[0]) != 0):
|
||||
return
|
||||
if (data[0][1] & 0x0F > 9) or (data[0][2] >> 4 > 9) or (data[0][2] & 0x0F > 9):
|
||||
return
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import rfm69
|
||||
from . import rfm69
|
||||
|
||||
RFM69 = 1
|
||||
RFM9x = 2
|
||||
|
|
Loading…
Reference in a new issue