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:
Stefan Seyfried 2020-12-26 19:17:31 +01:00 committed by GitHub
parent 99b37cbb29
commit 3e70559ef2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -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

View file

@ -1,4 +1,4 @@
import rfm69
from . import rfm69
RFM69 = 1
RFM9x = 2