Skip to content

Releases: int08h/waveshare-ups-hat-e

0.1.3

Choose a tag to compare

@int08h int08h released this 24 Dec 22:30

v0.1.3

  • Replaced manual bit manipulation with idiomatic u16::from_le_bytes() and i16::from_le_bytes() for register conversions
  • Fixed off-by-one error in signed current read: The milliamps field in BatteryState was 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.

0.1.2

Choose a tag to compare

@int08h int08h released this 23 Dec 23:12

New APIs

  • get_communication_state() - returns BQ4050 and IP2368 chip communication status
  • get_software_revision() - returns UPS firmware revision
  • is_battery_low() - checks if total battery voltage is below threshold
  • force_power_off() - initiates unconditional power-off in 30 seconds
  • is_power_off_pending() - checks if a power-off has been initiated

Examples

  • New force_power_off.rs example binary
  • Enhanced ups_monitor.rs with software revision, communication, and battery state

Release 0.1.1

Choose a tag to compare

@int08h int08h released this 20 Dec 04:36