Skip to content

Commit

Permalink
Merge pull request #344 from eLod/fix/pressure-resolution
Browse files Browse the repository at this point in the history
Fixing DevicePropertyCharacteristic.pressure missing resolution when converting to Data.
  • Loading branch information
philips77 authored Apr 15, 2021
2 parents c1bdfe9 + 9ee64c7 commit 6d19b4a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1164,7 +1164,7 @@ internal extension DevicePropertyCharacteristic {

// Float as UInt32:
case .pressure(let value):
return value.toData(ofLength: 4, withRange: 0...Decimal(UInt32.max))
return value.toData(ofLength: 4, withRange: 0...Decimal(UInt32.max), withResolution: 0.1)

// UInt32 with 0xFFFFFFFF as unknown:
case .timeSecond32(let value):
Expand Down

0 comments on commit 6d19b4a

Please sign in to comment.