[Nut-upsdev] PowerCOM Driver Update
atescomp at gmail.com
atescomp at gmail.com
Fri May 13 02:18:54 UTC 2011
Arnaud,
Yes, this patch may also fix the other user list problem. In effect, it
allows the fine user of control all the setting to these PowerCom devices.
Without the patch, the driver ignores critical user setting with another
type or defaults (as opposed to the other way around). Notice the comment:
/* Give "BNT-other" a chance! */
This was because I was frustrated with "IMP" hijacking "BNT-other" (and
other types) from the line:
if (raw_data[UPSVERSION]==0xFF){
I don't think the UPSVERSION should have anything to do with forcing the
driver to use the "IMP" type. So the rewrite seems justified.
Also, there was some serious array length issues. The driver required
arrays longer than they were defined, so I added zeros to the declarations.
Example: "voltages" was originally declared with a length of 11 indices,
but the line
linevoltage=voltages[raw_data[MODELNUMBER]%16]
clearly shows that it could be up to 16 indices (0-15).
On my system, playing with the values got the KNutClient to display nicely.
Keven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20110513/9c092cd6/attachment.htm>
More information about the Nut-upsdev
mailing list