only reset scrolling if new message is different
This commit is contained in:
parent
959dc0dadf
commit
79b13cb100
1 changed files with 5 additions and 3 deletions
|
@ -51,11 +51,13 @@ void receive_serial() {
|
|||
if (Serial.available() > 0) {
|
||||
char receivedChar = Serial.read();
|
||||
if (receivedChar == '\n') {
|
||||
if (message != newMessage) {
|
||||
message = newMessage;
|
||||
newMessage = "";
|
||||
ticks = 0;
|
||||
runde = 120;
|
||||
}
|
||||
newMessage = "";
|
||||
}
|
||||
else if (receivedChar != '\r') {
|
||||
newMessage += receivedChar;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue