Re: [B.A.T.M.A.N.] Changing vis output ready for mainline...

Andrew Lunn
2009-10-13T08:00:20Z

> Couple of questions:
>
> * Would (<TQ_Value> / 255) be equivalent to the label value in the
> current vis output?

Here is the current kernel code:

#define TQ_MAX_VALUE 255
[snip]
/* kernel has no printf-support for %f? it'd be better
* to return this in float. */
int_part = TQ_MAX_VALUE / entry->quality;
frac_part = (1000 * TQ_MAX_VALUE / entry->quality) -
(int_part * 1000);
[snip]
seq_printf(seq,
"\t\"%s\" -> \"%s\" [label=\"%d.%d\"]\n",
from, to, int_part, frac_part);

Andrew