Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
TFT_eSPI
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
TFT_eSPI
Commits
fe5609e3
Unverified
Commit
fe5609e3
authored
Apr 30, 2022
by
Bodmer
Committed by
GitHub
Apr 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #1802
parent
d883856d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
examples/Sprite/Animated_dial/Animated_dial.ino
examples/Sprite/Animated_dial/Animated_dial.ino
+3
-3
No files found.
examples/Sprite/Animated_dial/Animated_dial.ino
View file @
fe5609e3
...
...
@@ -44,7 +44,7 @@ TFT_eSprite spr = TFT_eSprite(&tft); // Sprite for meter reading
uint16_t
*
tft_buffer
;
bool
buffer_loaded
=
false
;
uint16_t
spr_width
=
0
;
uint16_t
bg_color
=
0
;
// =======================================================================================
// This function will be called during decoding of the jpeg file
// =======================================================================================
...
...
@@ -82,9 +82,9 @@ void setup() {
// Load the font and create the Sprite for reporting the value
spr
.
loadFont
(
AA_FONT_LARGE
);
spr_width
=
spr
.
textWidth
(
"
277"
);
spr_width
=
spr
.
textWidth
(
"
777"
);
// 7 is widest numeral in this font
spr
.
createSprite
(
spr_width
,
spr
.
fontHeight
());
uint16_t
bg_color
=
tft
.
readPixel
(
120
,
120
);
// Get colour from dial centre
bg_color
=
tft
.
readPixel
(
120
,
120
);
// Get colour from dial centre
spr
.
fillSprite
(
bg_color
);
spr
.
setTextColor
(
TFT_WHITE
,
bg_color
,
true
);
spr
.
setTextDatum
(
MC_DATUM
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment