Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernize and introduce new statuses #10

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

desertwitch
Copy link

@desertwitch desertwitch commented Oct 21, 2024

This pull request addresses the issues #8 and #9, as well as a compiler warning.
The status handling was modernized to graphically visualize (including combinations of) these statuses:

#define ST_ONLINE      (1 << 0)	/* UPS is on line */
#define ST_ONBATT      (1 << 1)	/* UPS is on battery */
#define ST_LOWBATT     (1 << 2)	/* UPS is on low battery */
#define ST_FSD         (1 << 3)	/* UPS is shutting down */
#define ST_REPLBATT    (1 << 4)	/* UPS battery needs replacement */
#define ST_CAL         (1 << 5)	/* UPS is calibrating */
#define ST_OFF         (1 << 6)	/* UPS is (administratively) offline */
#define ST_BYPASS      (1 << 7)	/* UPS is on bypass */
#define ST_OVERLOAD    (1 << 8)	/* UPS is overloaded */
#define ST_TRIM        (1 << 9)	/* UPS is trimming */
#define ST_BOOST       (1 << 10)	/* UPS is boosting */
#define ST_ALARM       (1 << 11)	/* UPS has active alarm(s) */

The (graphical) visualization of the various statuses can be looked at here: wmnut-pr.pdf

More (not road-blocking) issues outside the scope of this PR have been discovered (and will be logged into "Issues") with further work possible for a prospective new version. This could include removal of unused legacy arguments and internal code remnants e.g. for previous beep/alert functions that are no longer in the codebase even before this PR (and upsmon being better equipped and integrated for handling notifications nowadays, when compared to 12 years ago). More importantly improvements to ensure more graceful client retrying/reconnections on staleness/connection loss not requiring widget restart.

fixes #8, fixes #9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Overload and non-parsed status processing is failing Add support for more UPS statuses
1 participant