/* Prints a float variable with max numbers after decimal.  */
static void print_float(float f, uint32_t max)
/* Prints a float variable with max numbers after decimal.  */
static void print_float(float f, uint32_t max)
{
	uint32_t i = 0;
	uint32_t smax = max;
	i = (uint32_t)f;
	printf("%d.", (int)i);
	f -= i;
	while (f >= 0.0 && max--) {
		f *= 10;
		i = (uint32_t)f;
		printf("%d", (int)i);		f -= i;
	}
	if (smax == max) {
		printf("0");
	}
}