Skip to content

Commit

Permalink
drivers/cps-hid.c, NEWS.adoc: cps_fix_report_desc(): do actually "set…
Browse files Browse the repository at this point in the history
… Input Voltage" for a fix [networkupstools#1245]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
  • Loading branch information
jimklimov committed Dec 13, 2024
1 parent 42c4319 commit d2a23b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions NEWS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ https://github.com/networkupstools/nut/milestone/11
its report descriptors were being discovered. Now this flag, as well as
`interruptsize` and `interruptonly`, are considered before we first try
to open the USB device handle. [#1575, #1512]
* In `cps_fix_report_desc()` we intended to fix-up input and output voltages
in certain cases against high voltage transfer, we only fixed-up one of
them. [#1245]
- development iterations of NUT should now identify with not only the semantic
version of a preceding release, but with git-derived information about the
Expand Down
3 changes: 3 additions & 0 deletions drivers/cps-hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,9 @@ static int cps_fix_report_desc(HIDDevice_t *pDev, HIDDesc_t *pDesc_arg) {
upsdebugx(4, "Original Report Descriptor: input "
"LogMin: %ld LogMax: %ld",
input_logmin, input_logmax);

pData->LogMin = CPS_VOLTAGE_LOGMIN;
pData->LogMax = CPS_VOLTAGE_LOGMAX;
upsdebugx(3, "Fixing Report Descriptor: "
"set Input Voltage LogMin = %d, LogMax = %d",
CPS_VOLTAGE_LOGMIN, CPS_VOLTAGE_LOGMAX);
Expand Down

0 comments on commit d2a23b7

Please sign in to comment.