You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, the WeightScaleService's characteristics decode the flag bits by manually bit shifting and masking. In other parts of SpeziBluetooth, we utilize and OptionSet to recover the flags. This technique makes for cleaner code.
Solution
Instead of bit shifting and bit masking, we use an OptionSet to decode all the flags from a UInt8 rawValue at once.
Additional context
No response
Code of Conduct
I agree to follow this project's Code of Conduct and Contributing Guidelines
The text was updated successfully, but these errors were encountered:
Problem
Right now, the WeightScaleService's characteristics decode the flag bits by manually bit shifting and masking. In other parts of SpeziBluetooth, we utilize and OptionSet to recover the flags. This technique makes for cleaner code.
Solution
Instead of bit shifting and bit masking, we use an OptionSet to decode all the flags from a UInt8 rawValue at once.
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: