recantha / picopicorder

The Picorder project, redux, on a Raspberry Pi Pico
8 stars 1 forks source link

Could use "mono" font #5

Closed dglaude closed 3 years ago

dglaude commented 3 years ago

From your early video, the temperature display was "shaking". Depending on the precision and digit display, the "C°" was moving. You could use a mono space font and fix the number of decimal to display (including ending zero). If you want to keep that font, you could right align the display.

recantha commented 3 years ago

I'd like to keep the font - it matches everything else. BUT right aligning... I didn't realise I could do that... ;-) Thanks!

dglaude commented 3 years ago

I guess there is right alignement, if not, it is missing and should be added to the library. :-)

But I was mostly also making a reference to this:

self.lcarsDisplayText(name="value_1", text_to_display=str(round(self.bme680.temperature + temperature_offset, 2)) + ' C')

That you could replace by something like this (not tested):

self.lcarsDisplayText(name="value_1", text_to_display="%0.1f C" % (bme680.temperature + temperature_offset))

This should make sure you always only display on decimal digit and avoid the variable precision of your rounding.

recantha commented 3 years ago

I've done it a different way, but you're right - specifying the precision is key.