File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
examples/Sprite/Animated_dial Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ void setup() {
8989 spr.setTextColor (TFT_WHITE, bg_color);
9090 spr.setTextDatum (MC_DATUM);
9191 spr.setTextPadding (spr_width);
92- spr.drawNumber (0 , spr_width/2 , 0 );
92+ spr.drawNumber (0 , spr_width/2 , spr. fontHeight ()/ 2 );
9393 spr.pushSprite (DIAL_CENTRE_X - spr_width / 2 , DIAL_CENTRE_Y - spr.fontHeight () / 2 );
9494
9595 // Plot the label text
@@ -203,7 +203,7 @@ void plotNeedle(int16_t angle, uint16_t ms_delay)
203203 }
204204
205205 // Update the number at the centre of the dial
206- spr.drawNumber (old_angle+120 , spr_width/2 , 0 );
206+ spr.drawNumber (old_angle+120 , spr_width/2 , spr. fontHeight ()/ 2 );
207207 spr.pushSprite (120 - spr_width / 2 , 120 - spr.fontHeight () / 2 );
208208
209209 // Slow needle down slightly as it approaches the new position
You can’t perform that action at this time.
0 commit comments