[Nut-upsdev] [nut] Ippon response length fix (#80)

Charles Lepple clepple at gmail.com
Sat Dec 7 14:16:40 UTC 2013


On Dec 7, 2013, at 5:43 AM, Denis Yantarev wrote:

> Ippon Back Power Pro responses are always padded to 64 bytes beyond \r payload terminator. When checking that command was successful (i.e. not echoed back) code relies on the response length reported by blazer_command which will always be 64. To fix this ippon_command should return actual payload length. This change also affects blazer_rating. Currently it assumes that battery voltage should be in %06.2f format, but in reality (and according to documentation) it may also look like %05.2f.
> 
> You can merge this Pull Request by running
> 
>   git pull https://github.com/singular0/nut master
> Or view, comment on, or merge it at:
> 
>   https://github.com/networkupstools/nut/pull/80
> 
> Commit Summary
> 
> Fixed ippon response length reported incorrectly due to padding beyond \r
> File Changes
> 
> M drivers/blazer.c (2)
> M drivers/blazer_usb.c (9)
> Patch Links:
> 
> https://github.com/networkupstools/nut/pull/80.patch
> https://github.com/networkupstools/nut/pull/80.diff

Hi Denis,

Two things:

1) @zykh has rewritten the blazer* drivers as nutdrv_qx, and it also includes an ippon subdriver. I think we would like to deprecate the blazer* drivers in one of the upcoming releases, since nutdrv_qx is more flexible. At first glance, this code looks similar, so it should not be too hard to port (if it has not been accounted for already).

2) The description you provided in the pull request seems very helpful to future developers looking at this code. Since the pull requests are somewhat ephemeral, could that description be added to either a comment in the code, or the Git commit message?

Thanks,

-- 
Charles Lepple
clepple at gmail



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20131207/965de035/attachment.html>


More information about the Nut-upsdev mailing list