Skip to content

Commit

Permalink
Update Animated_dial.ino
Browse files Browse the repository at this point in the history
Correct error in example that became apparent with recent library updates.
  • Loading branch information
Bodmer committed Oct 6, 2020
1 parent 22ca819 commit 39fe01a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/Sprite/Animated_dial/Animated_dial.ino
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ void setup() {
spr.setTextColor(TFT_WHITE, bg_color);
spr.setTextDatum(MC_DATUM);
spr.setTextPadding(spr_width);
spr.drawNumber(0, spr_width/2, 0);
spr.drawNumber(0, spr_width/2, spr.fontHeight()/2);
spr.pushSprite(DIAL_CENTRE_X - spr_width / 2, DIAL_CENTRE_Y - spr.fontHeight() / 2);

// Plot the label text
Expand Down Expand Up @@ -203,7 +203,7 @@ void plotNeedle(int16_t angle, uint16_t ms_delay)
}

// Update the number at the centre of the dial
spr.drawNumber(old_angle+120, spr_width/2, 0);
spr.drawNumber(old_angle+120, spr_width/2, spr.fontHeight()/2);
spr.pushSprite(120 - spr_width / 2, 120 - spr.fontHeight() / 2);

// Slow needle down slightly as it approaches the new position
Expand Down

0 comments on commit 39fe01a

Please sign in to comment.