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

Power value calculation updates (specifically for Huawei UPS) #151

Merged
merged 2 commits into from
May 6, 2024

Conversation

gbakeman
Copy link
Contributor

@gbakeman gbakeman commented May 4, 2024

  • Added output current as new UPS_Value
  • Renamed a few PowerMethod enums to be more descriptive of what they do
  • Trying a new well-known variable initialization method that utilizes nullable values. Variable is left null if there's a problem retrieving it from the NUT server, then it will not be updated in the future. Only applying this to output.current since its use is limited to power calculation only. Applying this to other variables will likely require greater structural changes throughout WinNUT.
  • Added power calculation method involving output voltage and current, specifically in a Huawei UPS (see Huawei UPS missing load display #150)
  • GetUPSVar no longer prints a line assuming that the raised exception will go unhandled if a fallback value was not provided.
  • Added power calculation method for directly reading output.realpower UPS variable (also related to above issue)
  • Corrected missing multiplication in InputNomVALoadPct

Closes #150

- Added output current as new `UPS_Value`
- Renamed a few `PowerMethod` enums to be more descriptive of what they do
- Trying a new well-known variable initialization method that utilizes nullable values. Variable is left null if there's a problem retrieving it from the NUT server, then it will not be updated in the future. Only applying this to `output.current` since its use is limited to power calculation only. Applying this to other variables will likely require greater structural changes throughout WinNUT.
- Added power calculation method involving output voltage and current, doable in a Huawei UPS (see #150)
- GetUPSVar no longer prints a line assuming that the raised exception will go unhandled if a fallback value was not provided.
@gbakeman gbakeman added bug Something isn't working enhancement New feature or request labels May 4, 2024
@gbakeman gbakeman added this to the 2.3 Stable Release milestone May 4, 2024
@gbakeman gbakeman self-assigned this May 4, 2024
@gbakeman gbakeman linked an issue May 4, 2024 that may be closed by this pull request
- Adding the `RealOutputPower` calculation method for UPS power output, specifically for Huawei UPSes.
- Corrected mistake in `InputNomVALoadPct` calculation method that omitted a multiplication
- Make error more clear if execution ever reaches Else case in power calculation switch statement.
@gbakeman gbakeman merged commit 12fa7ec into dev-2.3 May 6, 2024
1 check passed
@gbakeman gbakeman deleted the 150-huawei-load-support branch May 6, 2024 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Huawei UPS missing load display
1 participant