[Nut-upsdev] zero-prepended values - why oh why?
Arjen de Korte
nut+devel at de-korte.org
Tue Feb 28 09:56:07 UTC 2006
> Given this experience, I think it would be a good thing to document
suggested format strings in docs/new-names.txt. Something like %.1f for
measurements. The question is how to handle stuff with only
> integer output, do we want those to stick to integers or do we want them
to produce similarly formatted output? I tend to prefer the latter,
consistent output is a good thing. However, since my taste isn't the
Universal Truth<tm> I expect a lengthy thread debating this :)
You asked for it, so here we go. Where analog values (voltage, current,
temperature) are measured, you may have a point, although I would rather
leave this up to the driver to decide. If the UPS can't measure a value
with decimal precision, I'd prefer not to add a decimal. On the other
hand, if it can measure a value more precisely I don't see what value
there is in truncating it. Regarding integer values, I would hate to see
something like "number of batteries installed 4.0" or "outputs active
2.0". So where exact counts/numbers are involved, I think it is not a good
idea at all to add a decimal. Of course, for display purposes you can
truncate or add whatever decimal positions you like, but the drivers
should not be limited in that respect.
Arjen
--
Eindhoven - The Netherlands
Key fingerprint - 66 4E 03 2C 9D B5 CB 9B 7A FE 7E C1 EE 88 BC 57
More information about the Nut-upsdev
mailing list