[Nut-upsdev] UPS (Megatec) with strange voltage values
Carlos Rodrigues
cefrodrigues at gmail.com
Mon Oct 20 12:21:50 UTC 2008
On Mon, Oct 20, 2008 at 12:38 PM, Arjen de Korte <nut+devel at de-korte.org> wrote:
> Citeren Carlos Rodrigues <cefrodrigues at gmail.com>:
>
>> 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.
>
> Not entirely. It would break the calculation of "battery.charge". I
> committed a slightly modified version that works around that. Basically the
> only change needed is to correct "battery.voltage". Internally the driver
> should still use the raw value from the UPS.
Oh, right. I completely ignored the charge calculation when not based
on the "battvolts" parameter...
BTW, the patch has a small typo in one of the comments: "applied to
battery.volage" :)
Regards,
--
Carlos Rodrigues
More information about the Nut-upsdev
mailing list