Base the number of decimal digits on actual sensor resolution.

Use Sensor.getResolution() to calculate the number of decimal digits to be displayed.

Prevents showing meaningless digits and hiding information.