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

Better handling of missing values for some UPS #4

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

karelkryda
Copy link
Contributor

My UPS returns null for Current Load and -1 for Battery Runtime. This PR modifies the display of values for these cases.

Currently, if Battery Runtime is 0, no value is displayed in the field. Instead of applying my fix only to the value -1, I applied it to the value 0, which is converted from the value -1 when seconds = Number(seconds); is called. Of course, this can be modified at will.

Current version of PeaNUT:
image

After applying the fix:
image

@Brandawg93
Copy link
Owner

Awesome! I like it.

@Brandawg93 Brandawg93 merged commit 25e8664 into Brandawg93:main Oct 20, 2023
1 check passed
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.

2 participants