Variable precision printing of floats

I've been using this function from the Print library to print floats:

void Print::printFloat(double number, uint8_t digits)

It is currently a private, but is making it available to the Print class as simple as moving it down into the publics in Print.h?

Yep.

b

Cool. And if I delete Print.cpp.o, it will recompile automagically?

yep

If you are going to modify the class, adding the following two methods are a more consistent way of getting the functionality you are looking for (of course you need to declare these in the h file as well)

void Print::print(double n, uint8_t digits)
{
  printFloat(n, digits);
}

void Print::println(double n, uint8_t digits)
{
  printFloat(n, digits);
  println();
}

I expect the Arduino team will be supporting user settable precision in future using this syntax.

Yes, that preserves the orthogonality. That's the way I'll do it.

I expect the Arduino team will be supporting user settable precision in future using this syntax

And maybe even the Reference page as well... ;)