Rain rate MAYBE implemented correctly
This commit is contained in:
@@ -202,12 +202,15 @@ class davisDecoder(object):
|
||||
def rainrate_decode(self, byte2, byte3):
|
||||
# if byte3(b2 here) is 0xFF, or 255, there is not rain
|
||||
print("b2:{} b3:{} = result:{}".format(byte2, byte3, byte2 + (byte3 >> 4 << 8)))
|
||||
# No Rain rainstate = 0
|
||||
if byte2 == 255:
|
||||
rainstate = 0
|
||||
rainrate = 0
|
||||
# Light Rain rainstate = 1
|
||||
elif byte2 == 254:
|
||||
rainstate = 1
|
||||
rainrate = 0.1
|
||||
# Heavy rain rainstate = 2
|
||||
else:
|
||||
rainstate = 2
|
||||
if byte3 > 4:
|
||||
|
||||
Reference in New Issue
Block a user