Skip to content

Multi-pulse support for even more UPS types

Compare
Choose a tag to compare
@jbaumann jbaumann released this 26 Sep 10:32
· 28 commits to master since this release

New / Added

Added the option to have multiple pulses to turn the UPS off or on. The number of additional pulses is configured in the high 4 bits of the option „ups configuration“. Bits 4-5 contain the value of pulse repeats for turning the ups off, bits 6-7 the value of pulse repeats for turning the ups on. The delay between the repeated pulses is a switch_recovery_delay / 4.

Changed

Refactoring to communicate the intent of some configuration options clearer.

  • "shutdown voltage" is now "ups shutdown voltage"
  • "reset configuration" is now "ups configuration"
  • "reset pulse length" is now "pulse length"

Changed the meaning of config option led_off_mode. Now takes an integer that decides in which state to signal by comparing the number to the current state. 0 is always, 1 is in any state but running, 8 is turned off (higher than warn_state i.e., shutdown in which the LED is turned off anyway). Generally, if the number is higher than the current state's value, don't blink.

Optimized parameter size for function blink_led() leads to 30 bytes less code and smaller stack allocation

Fixed Bugs

In voltage_dependent_state_change() some values were not saved from change during an interrupt. Fixed