Repository navigation
v0.1.3
- Replaced manual bit manipulation with idiomatic
u16::from_le_bytes()andi16::from_le_bytes()for register conversions - Fixed off-by-one error in signed current read: The milliamps field in
BatteryStatewas incorrectly calculated due to a sign conversion error. Values like -1 mA were returned as 0, and -32768 mA as -32767. The battery current is now correctly interpreted as a signed 16-bit integer.