[Nut-upsdev] UPS (Megatec) with strange voltage values

Carlos Rodrigues cefrodrigues at gmail.com
Thu Oct 9 21:25:13 UTC 2008


On Thu, Oct 9, 2008 at 8:03 AM, Arjen de Korte <nut+devel at de-korte.org> wrote:
> Citeren Arjen de Korte <nut+devel at de-korte.org>:
>
>>> Perhaps the graphics should use a dynamic scale instead of a fixed
>>> scale (there are many other models out there reporting nominal
>>> voltages of 12V and then ~2V for the current battery voltage).
>>
>> This is the case. The problem here is that in this case the megatec
>> driver reports 'battery.voltage' as single cell and
>> 'battery.voltage.nominal' as the total string voltage.
>
> Have a look at changeset 1337 for the bestups driver, this suffered from a
> similar problem a while back. It won't be a drop in replacement here since
> that one didn't report a nominal battery voltage, so we try to guess that
> based on the reported low/high battert voltage. But it too uses a battery
> voltage multiplier so that the graphics report the battery string voltage,
> instead of just the single cell voltage.

The attached patch adds a "battvoltmult" parameter to the megatec
driver in the trunk.

It should work, but I'm away from a development environment, so it is
totally untested (it wasn't even compiled to check for syntax errors).
The changes are mostly harmless, though.

-- 
Carlos Rodrigues
-------------- next part --------------
A non-text attachment was scrubbed...
Name: megatec-battvoltmult.diff
Type: application/octet-stream
Size: 2770 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20081009/9450f277/attachment.obj 


More information about the Nut-upsdev mailing list