On Thu, Mar 25, 2010 at 11:58:07PM +0100, Linus Lüssing wrote:
Hmm, in the frac_part, wouldn't that thing be rounded to 3 digits max anyway because of "(_1000_ * TQ_MAX_VALUE / tq) ..."? So, is it really necessary to limit this value with %02d again? Or should we change this as it is not such an obvious part maybe?
Argh, sorry, wrong again.... Are you talking about the issue with missing leading 0s here? TQ-values like
42 6 95 255 1 3
would of course wrongly become 6.95 instead of 6.095 and 1.3 instead of 1.003... So yes, %03 seems to be what we're looking for.
So it looks like we need a field width of 3, not 2.
BTW: Is a TQ == 0 possible? batctl does not prevent the / 0 from happening.
Andrew