disable scrolling for short text
This commit is contained in:
parent
7af71401b7
commit
959dc0dadf
1 changed files with 10 additions and 4 deletions
14
src/main.cpp
14
src/main.cpp
|
@ -92,12 +92,18 @@ void loop()
|
||||||
ticks++;
|
ticks++;
|
||||||
if (ticks == 8) {
|
if (ticks == 8) {
|
||||||
ticks = 0;
|
ticks = 0;
|
||||||
runde--;
|
if ((6 * (int)message.length()) > 120) {
|
||||||
|
runde--;
|
||||||
|
|
||||||
letters(runde);
|
letters(runde);
|
||||||
|
|
||||||
if (runde == -(6 * (int)message.length())) {
|
if (runde == -(6 * (int)message.length())) {
|
||||||
runde = 120;
|
runde = 120;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
int padding = (120 - (6 * (int)message.length())) / 2;
|
||||||
|
|
||||||
|
letters(padding);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
receive_serial();
|
receive_serial();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue