Conversation
- Reorganized some lines in UPS_Device - Made Socket object access private, WinNUT now gets connection status from UPS_Device only. - Began implementation of max load calculation algorithm - Relocated static UPS device info display logic out of variable update function and into UPS initialization function. - Also cleaned up some unused code in WinNUT.vb.
Effectively disable any post-initialization of the Load dial, since it represents a percentage which will always be between 0 and 100 percent. This removes the UPS Load fields from the Calibration tab of the Prefs GUI, and also removes any references to the `MinUPSLoad` and `MaxUPSLoad` configuration settings. - Removed the binary Icon data from Prefs resx
The node tree is created with the root node having the name of the UPS. Since UPS variables do not have the UPS name at the beginning, the UPS name had to be stripped from the node's fullpath. The Replace function was previously unlimited, which caused it to strip out the UPS name wherever it appeared in the node path. If a UPS's name was 'ups', then any variable in a 'ups' group would become unreadable. The Replace function now only removes the UPS name from the beginning of the full path.
Replacing old power calculation methods with new system. On connection, WinNUT determines what power/load data variables are available and sets an enum variable accordingly. If no such method is available, a warning is logged to the output, and future attempts to get the power value will return with 0. On every update, the appropriate method is selected from the enum variable and the calculation is returned. The hope is that this covers the majority of UPS devices. - Also cleaned up or rearranged code in the UPS_Device class.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The UPS Load dial presents conflicting information, depending on the UPS being monitored. Typically, the load percentage and real value do not line up with what the maximum possible load is. This PR will aim to correct this by:
MinUPSLoadandMaxUPSLoadcalibration settings since those were representing the percentage.ups.realpowerorups.realpower.nominalinput.current.nominal*input.voltage.nominaland 0.8 to account for loss. To find the current output power, multiply the calculated max byups.load(the percentage of max load)ups.loadCloses #41
Related to #24, #69, #74, #100, #101 and #102