File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -388,11 +388,16 @@ static int cps_fix_report_desc(HIDDevice_t *pDev, HIDDesc_t *pDesc_arg) {
388388 "LogMin: %ld LogMax: %ld" ,
389389 input_logmin , input_logmax );
390390
391- pData -> LogMin = CPS_VOLTAGE_LOGMIN ;
392- pData -> LogMax = CPS_VOLTAGE_LOGMAX ;
393- upsdebugx (3 , "Fixing Report Descriptor: "
394- "set Input Voltage LogMin = %d, LogMax = %d" ,
395- CPS_VOLTAGE_LOGMIN , CPS_VOLTAGE_LOGMAX );
391+ /* TOTHINK: Should this be still about
392+ * the *HIGH* Voltage Transfer? Or LOW?
393+ */
394+ if (hvt_logmin == input_logmin && hvt_logmax == input_logmax ) {
395+ pData -> LogMin = CPS_VOLTAGE_LOGMIN ;
396+ pData -> LogMax = CPS_VOLTAGE_LOGMAX ;
397+ upsdebugx (3 , "Fixing Report Descriptor: "
398+ "set Input Voltage LogMin = %d, LogMax = %d" ,
399+ CPS_VOLTAGE_LOGMIN , CPS_VOLTAGE_LOGMAX );
400+ }
396401 }
397402
398403 retval = 1 ;
You can’t perform that action at this time.
0 commit comments