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
d12a68a4
Commit
d12a68a4
authored
Oct 21, 2018
by
Bodmer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add checks in examples for missing font files
parent
2ba492c1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
0 deletions
+49
-0
examples/Smooth Fonts/Font_Demo_1/Font_Demo_1.ino
examples/Smooth Fonts/Font_Demo_1/Font_Demo_1.ino
+12
-0
examples/Smooth Fonts/Font_Demo_2/Font_Demo_2.ino
examples/Smooth Fonts/Font_Demo_2/Font_Demo_2.ino
+12
-0
examples/Smooth Fonts/Font_Demo_3/Font_Demo_3.ino
examples/Smooth Fonts/Font_Demo_3/Font_Demo_3.ino
+13
-0
examples/Smooth Fonts/Font_Demo_4/Font_Demo_4.ino
examples/Smooth Fonts/Font_Demo_4/Font_Demo_4.ino
+12
-0
No files found.
examples/Smooth Fonts/Font_Demo_1/Font_Demo_1.ino
View file @
d12a68a4
...
@@ -59,6 +59,18 @@ void setup(void) {
...
@@ -59,6 +59,18 @@ void setup(void) {
while
(
1
)
yield
();
// Stay here twiddling thumbs waiting
while
(
1
)
yield
();
// Stay here twiddling thumbs waiting
}
}
Serial
.
println
(
"
\r\n
SPIFFS available!"
);
Serial
.
println
(
"
\r\n
SPIFFS available!"
);
// ESP32 will crash if any of the fonts are missing
bool
font_missing
=
false
;
if
(
SPIFFS
.
exists
(
"/NotoSansBold15.vlw"
)
==
false
)
font_missing
=
true
;
if
(
SPIFFS
.
exists
(
"/NotoSansBold36.vlw"
)
==
false
)
font_missing
=
true
;
if
(
font_missing
)
{
Serial
.
println
(
"
\r\n
Font missing in SPIFFS, did you upload it?"
);
while
(
1
)
yield
();
}
else
Serial
.
println
(
"
\r\n
Fonts found OK."
);
}
}
...
...
examples/Smooth Fonts/Font_Demo_2/Font_Demo_2.ino
View file @
d12a68a4
...
@@ -53,6 +53,18 @@ void setup(void) {
...
@@ -53,6 +53,18 @@ void setup(void) {
while
(
1
)
yield
();
// Stay here twiddling thumbs waiting
while
(
1
)
yield
();
// Stay here twiddling thumbs waiting
}
}
Serial
.
println
(
"
\r\n
SPIFFS available!"
);
Serial
.
println
(
"
\r\n
SPIFFS available!"
);
// ESP32 will crash if any of the fonts are missing
bool
font_missing
=
false
;
if
(
SPIFFS
.
exists
(
"/NotoSansBold15.vlw"
)
==
false
)
font_missing
=
true
;
if
(
SPIFFS
.
exists
(
"/NotoSansBold36.vlw"
)
==
false
)
font_missing
=
true
;
if
(
font_missing
)
{
Serial
.
println
(
"
\r\n
Font missing in SPIFFS, did you upload it?"
);
while
(
1
)
yield
();
}
else
Serial
.
println
(
"
\r\n
Fonts found OK."
);
}
}
void
loop
()
{
void
loop
()
{
...
...
examples/Smooth Fonts/Font_Demo_3/Font_Demo_3.ino
View file @
d12a68a4
...
@@ -57,6 +57,19 @@ void setup(void) {
...
@@ -57,6 +57,19 @@ void setup(void) {
while
(
1
)
yield
();
// Stay here twiddling thumbs waiting
while
(
1
)
yield
();
// Stay here twiddling thumbs waiting
}
}
Serial
.
println
(
"
\r\n
SPIFFS available!"
);
Serial
.
println
(
"
\r\n
SPIFFS available!"
);
// ESP32 will crash if any of the fonts are missing
bool
font_missing
=
false
;
if
(
SPIFFS
.
exists
(
"/NotoSansBold15.vlw"
)
==
false
)
font_missing
=
true
;
if
(
SPIFFS
.
exists
(
"/NotoSansBold36.vlw"
)
==
false
)
font_missing
=
true
;
if
(
SPIFFS
.
exists
(
"/NotoSansMonoSCB20.vlw"
)
==
false
)
font_missing
=
true
;
if
(
font_missing
)
{
Serial
.
println
(
"
\r\n
Font missing in SPIFFS, did you upload it?"
);
while
(
1
)
yield
();
}
else
Serial
.
println
(
"
\r\n
Fonts found OK."
);
}
}
void
loop
()
{
void
loop
()
{
...
...
examples/Smooth Fonts/Font_Demo_4/Font_Demo_4.ino
View file @
d12a68a4
...
@@ -68,6 +68,18 @@ void setup(void) {
...
@@ -68,6 +68,18 @@ void setup(void) {
while
(
1
)
yield
();
// Stay here twiddling thumbs waiting
while
(
1
)
yield
();
// Stay here twiddling thumbs waiting
}
}
Serial
.
println
(
"
\r\n
SPIFFS available!"
);
Serial
.
println
(
"
\r\n
SPIFFS available!"
);
// ESP32 will crash if any of the fonts are missing
bool
font_missing
=
false
;
if
(
SPIFFS
.
exists
(
"/NotoSansBold15.vlw"
)
==
false
)
font_missing
=
true
;
if
(
SPIFFS
.
exists
(
"/NotoSansBold36.vlw"
)
==
false
)
font_missing
=
true
;
if
(
font_missing
)
{
Serial
.
println
(
"
\r\n
Font missing in SPIFFS, did you upload it?"
);
while
(
1
)
yield
();
}
else
Serial
.
println
(
"
\r\n
Fonts found OK."
);
}
}
void
loop
()
{
void
loop
()
{
...
...
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