feat: support BLE low power mode

This commit is contained in:
Stefan Zollinger
2024-08-16 11:06:01 +02:00
parent 83b120b1ce
commit 48c6b2c314
9 changed files with 65 additions and 58 deletions

View File

@@ -55,6 +55,10 @@ object DecoderIaq {
parseUnsignedInt(inputBytes, 8, 9) ushr 4 and INVALID_OCCUPANCY
measurement.occupancy = if (occupancy == INVALID_OCCUPANCY) null else occupancy
val occupancy2 =
parseUnsignedInt(inputBytes, 10, 11) ushr 4 and INVALID_OCCUPANCY
measurement.occupancy = if (occupancy == INVALID_OCCUPANCY) null else occupancy
if (msgType == 0) {
val pm25 =
parseUnsignedInt(inputBytes, 8, 10) ushr 2 and INVALID_PM25