Peter Selinger
2007-Jan-08 22:56 UTC
[Nut-upsdev] Re: [nut-commits] svn commit r716 - in trunk: . drivers
Arnaud, you changed the "if" part, perhaps you'd like to change the "else" part, too? Changing the output format of HIDDumpTree() has the potential to break the functionality of scripts/subdriver/path-to-subdriver.sh; I don't think it does in this instance, but I have not checked it. Perhaps it would be good to add a comment in the source code as a caution. -- Peter Arnaud Quette wrote:> > Author: aquette > Date: Mon Jan 8 10:52:18 2007 > New Revision: 716 > > Modified: > trunk/ChangeLog > trunk/drivers/libhid.c > Log: > HIDDumpTree() also prints the data ReportID, Offset and Size > > Modified: trunk/ChangeLog > =============================================================================> --- trunk/ChangeLog (original) > +++ trunk/ChangeLog Mon Jan 8 10:52:18 2007 > @@ -1,3 +1,7 @@ > +Mon Jan 8 00:52:51 UTC 2007 / Arnaud Quette <aquette.dev@gmail.com> > + > + - libhid.c: HIDDumpTree() also prints the data ReportID, Offset and Size. > + > Mon Jan 8 00:52:51 UTC 2007 / Peter Selinger <selinger@users.sourceforge.net> > > - autoconf: removed test for s6_addr32, added test for IN6_IS_ADDR_V4MAPPED. > > Modified: trunk/drivers/libhid.c > =============================================================================> --- trunk/drivers/libhid.c (original) > +++ trunk/drivers/libhid.c Mon Jan 8 10:52:18 2007 > @@ -561,8 +561,9 @@ > > /* Get data value */ > if (HIDGetItemValue(udev, path, &value, utab) > 0) > - upsdebugx(1, "Path: %s, Type: %s, Value: %f", path, type, value); > - > + upsdebugx(1, "Path: %s, Type: %s, ReportID: 0x%02x, Offset: %i, Size: %i, Value: %f", > + path, type, pData->ReportID, pData->Offset, pData->Size, value); > + > else > upsdebugx(1, "Path: %s, Type: %s", path, type); > } > > _______________________________________________ > nut-commits mailing list > nut-commits@lists.alioth.debian.org > http://lists.alioth.debian.org/mailman/listinfo/nut-commits >
Arnaud Quette
2007-Jan-09 09:16 UTC
[Nut-upsdev] Re: [nut-commits] svn commit r716 - in trunk: . drivers
2007/1/8, Peter Selinger <selinger@mathstat.dal.ca>:> Arnaud, > > you changed the "if" part, perhaps you'd like to change the "else" > part, too?good point. fixed in r727, thanks> Changing the output format of HIDDumpTree() has the potential to break > the functionality of scripts/subdriver/path-to-subdriver.sh; I don't > think it does in this instance, but I have not checked it. Perhaps it > would be good to add a comment in the source code as a caution.I've quickly tried it (for the 1rst time ; it's really a good tool), and it seems to work. Anyway, I've added a comment in DumpTree() since breaking the output format can lead to path-to-subdriver.sh breakage. Note that I've updated a bit the script for the "do not forget to" section, following the automake switch.> Arnaud Quette wrote: > > > > Author: aquette > > Date: Mon Jan 8 10:52:18 2007 > > New Revision: 716 > > > > Modified: > > trunk/ChangeLog > > trunk/drivers/libhid.c > > Log: > > HIDDumpTree() also prints the data ReportID, Offset and Size > > > > Modified: trunk/ChangeLog > > > ...thanks, Arnaud -- Linux / Unix Expert - MGE UPS SYSTEMS - R&D Dpt Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/ Debian Developer - http://people.debian.org/~aquette/ OpenSource Developer - http://arnaud.quette.free.fr/