disable scrolling for short text

This commit is contained in:
Silentium 2019-01-13 13:41:31 +01:00
parent 7af71401b7
commit 959dc0dadf

View file

@ -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();