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,10 +51,12 @@ void receive_serial() {
|
||||||
if (Serial.available() > 0) {
|
if (Serial.available() > 0) {
|
||||||
char receivedChar = Serial.read();
|
char receivedChar = Serial.read();
|
||||||
if (receivedChar == '\n') {
|
if (receivedChar == '\n') {
|
||||||
message = newMessage;
|
if (message != newMessage) {
|
||||||
|
message = newMessage;
|
||||||
|
ticks = 0;
|
||||||
|
runde = 120;
|
||||||
|
}
|
||||||
newMessage = "";
|
newMessage = "";
|
||||||
ticks = 0;
|
|
||||||
runde = 120;
|
|
||||||
}
|
}
|
||||||
else if (receivedChar != '\r') {
|
else if (receivedChar != '\r') {
|
||||||
newMessage += receivedChar;
|
newMessage += receivedChar;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue