add radar support
This commit is contained in:
@ -122,7 +122,7 @@ def mqttOnMessageCallback(client, userdata, message):
|
|||||||
}
|
}
|
||||||
case 'LMDS200':
|
case 'LMDS200':
|
||||||
if f_port != 2:
|
if f_port != 2:
|
||||||
raise JustIgnore()
|
raise JustIgnoreMessage()
|
||||||
battery = struct.unpack('>H', frame[0:2])[0]
|
battery = struct.unpack('>H', frame[0:2])[0]
|
||||||
distance1 = struct.unpack('>H', frame[2:4])[0]
|
distance1 = struct.unpack('>H', frame[2:4])[0]
|
||||||
distance2 = struct.unpack('>H', frame[4:6])[0]
|
distance2 = struct.unpack('>H', frame[4:6])[0]
|
||||||
@ -147,7 +147,7 @@ def mqttOnMessageCallback(client, userdata, message):
|
|||||||
|
|
||||||
logger.debug(f"{measurement=}")
|
logger.debug(f"{measurement=}")
|
||||||
dbh.storeMeasurement(measurement)
|
dbh.storeMeasurement(measurement)
|
||||||
except JustIgnore:
|
except JustIgnoreMessage:
|
||||||
pass
|
pass
|
||||||
except SensorTypeNotFoundException as e:
|
except SensorTypeNotFoundException as e:
|
||||||
logger.error(f"application has unknown sensor type {e.sensorType}")
|
logger.error(f"application has unknown sensor type {e.sensorType}")
|
||||||
|
Reference in New Issue
Block a user