Skip to content

Commit

Permalink
Fix unit detection in BloodPressureMeasurement
Browse files Browse the repository at this point in the history
  • Loading branch information
weliem committed Sep 10, 2024
1 parent 67ceddd commit 3a71609
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ data class BloodPressureMeasurement(
fun fromBytes(value: ByteArray): BloodPressureMeasurement {
val parser = BluetoothBytesParser(value, ByteOrder.LITTLE_ENDIAN)
val flags = parser.getIntValue(FORMAT_UINT8)
val unit = if (flags and 0x01 > 0) ObservationUnit.MMHG else ObservationUnit.KPA
val unit = if (flags and 0x01 > 0) ObservationUnit.KPA else ObservationUnit.MMHG
val timestampPresent = flags and 0x02 > 0
val pulseRatePresent = flags and 0x04 > 0
val userIdPresent = flags and 0x08 > 0
Expand Down

0 comments on commit 3a71609

Please sign in to comment.