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

Fix issue #439 Incorrect Output Voltage on CPS*EFPCLCD, including libusb-1.0 branch #1246

Closed

Conversation

flashydave
Copy link
Contributor

This fixes the problem whereby the Output Voltage on Cyberpower CPS*EPFCLCD UPS's is masked.
The root cause is due to a legal but inappropriate Report Descriptor published as part of the HID.
Specifically it looks liike Report ID 17 was deleted (ie Report 16 is followed by Report 18) with the result that there was no attempt to reset the LogMin and LogMax values from those used by the HighVoltageTransfer Item for those used by the Output Voltage.

The fix conditionally corrects the Report Descriptor structure by applying the same LogMin and LogMax values used by the Input Voltage Item after first checking the issue exists.

The fix creates a generic framework for fixing Report Descriptors that can be used for different manufacturers by adding code to the appropriate subdriver rather than polluting the main code with UPS specific exceptions.

This version is identical to PR #1245 but is for the libusb-1.0 branch.

@lgtm-com
Copy link

lgtm-com bot commented Dec 24, 2021

This pull request introduces 1 alert when merging 0a94d76 into 5454b34 - view on LGTM.com

new alerts:

  • 1 for Local variable hides global variable

@jimklimov jimklimov changed the title Issue439 libusb1.0 Fix issue #439 Incorrect Output Voltage on CPS*EFPCLCD, including libusb-1.0 branch Dec 28, 2021
@jimklimov jimklimov changed the base branch from master to libusb-1.0 December 28, 2021 15:16
@lgtm-com
Copy link

lgtm-com bot commented Dec 28, 2021

This pull request introduces 1 alert when merging 0a94d76 into f71c188 - view on LGTM.com

new alerts:

  • 1 for Local variable hides global variable

@jimklimov jimklimov deleted the branch networkupstools:libusb-1.0 January 10, 2022 14:47
@jimklimov jimklimov closed this Jan 10, 2022
@jimklimov jimklimov added the USB-HID encoding/LogMin/LogMax Issues and solutions (PRs) specifically about incorrect values in bitstream label Jan 12, 2022
@jimklimov
Copy link
Member

Oops, got auto-closed by merge of libusb-1.0 (target branch) into master.

@flashydave
Copy link
Contributor Author

flashydave commented Jan 12, 2022 via email

@flashydave
Copy link
Contributor Author

flashydave commented Jan 12, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
USB-HID encoding/LogMin/LogMax Issues and solutions (PRs) specifically about incorrect values in bitstream
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants