Skip to content

Commit 7879b33

Browse files
committed
#139 Update GATTBloodPressureMeasurement
1 parent 20b4ebb commit 7879b33

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/BluetoothGATT/GATTBloodPressureManagement.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public struct GATTBloodPressureMeasurement: GATTCharacteristic {
9292
guard data.count >= Self.length
9393
else { return nil }
9494

95-
let flags = BitMaskOptionSet<Flag>(rawValue: data[0])
95+
let flags = Flag(rawValue: data[0])
9696

9797
let unit: Unit = flags.contains(.bloodPressureUnits) ? .kPa : .mmHg
9898
let systolic = SFloat(bitPattern: UInt16(littleEndian: UInt16(bytes: (data[1], data[2]))))
@@ -156,7 +156,7 @@ public struct GATTBloodPressureMeasurement: GATTCharacteristic {
156156
guard index + MemoryLayout<MeasurementStatus.RawValue>.size < data.count
157157
else { return nil }
158158

159-
self.measurementStatus = BitMaskOptionSet<MeasurementStatus>(rawValue: UInt16(littleEndian: UInt16(bytes: (data[index + 1], data[index + 2]))))
159+
self.measurementStatus = MeasurementStatus(rawValue: UInt16(littleEndian: UInt16(bytes: (data[index + 1], data[index + 2]))))
160160

161161
index += MemoryLayout<MeasurementStatus.RawValue>.size
162162

0 commit comments

Comments
 (0)