On Nov 9, 2014, at 8:13 AM, Marcelo Fernandez <marcelo.fidel.fernan...@gmail.com> wrote:
> 2014-11-09 9:59 GMT-03:00 Charles Lepple <clep...@gmail.com>: >> >> Strange, I would have thought that the "Value: 0" would show the actual >> number. Does it look like drivers/libhid.o got rebuilt? > > Yes, at first I thought the same (that I did something wrong), but > everything seems ok: My apologies, you did say the numbers looked different. Here's how the numbers get interpreted: In hidparser.c:GetValue(), the bits get extracted from the report (example: "Report[buf]: (5 bytes) => 05 51 00 48 00"). For ConfigVoltage, the offset is 16 bits, and we skip the first 8 (the report ID; 05 in this case). The size is 16 bits, so that is "48 00" -> "0048", which should be 72. However, this UPS still has a logical Min/Max of 0/1 in effect when the parser reads this. Can you add the attached patch to your tree? I guess leave the other line commented out; I think there is some other scaling that needs to be addressed. The proper way to fix this is to override the HID descriptor, and that will take a little more coding. -- Charles Lepple clepple@gmail
hidparser_fix_logical_max.patch
Description: Binary data
_______________________________________________ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser