only print current screen if it is active

This commit is contained in:
Wolfgang Hottgenroth 2020-11-20 12:39:06 +01:00
parent 63f993c130
commit aff85b6d3e
Signed by: wn
GPG Key ID: 6C1E5E531E0D5D7F

View File

@ -427,8 +427,10 @@ void oledPrint(oledScreen_t screen, char msg[]) {
lines[screen][MAX_LINES - 1][MAX_CHARS - 1] = 0;
}
for (uint8_t line = 0; line < MAX_LINES; line++) {
oled_P6x8Str(1, line, lines[activeScreen][line]);
if (screen == activeScreen) {
for (uint8_t line = 0; line < MAX_LINES; line++) {
oled_P6x8Str(1, line, lines[activeScreen][line]);
}
}
}