fix serial rx flush in examples
This commit is contained in:
parent
aa14035c94
commit
ef2268ca22
|
@ -166,7 +166,7 @@ void loop() {
|
|||
} else {
|
||||
Serial.setTimeout(40);
|
||||
freq = Serial.parseInt();
|
||||
Serial.flush();
|
||||
while (Serial.available()) Serial.read();
|
||||
radio.frequency(freq);
|
||||
Serial.print("set frequency: ");
|
||||
Serial.println(freq);
|
||||
|
|
|
@ -135,7 +135,7 @@ void loop() {
|
|||
} else {
|
||||
Serial.setTimeout(40);
|
||||
freq = Serial.parseInt();
|
||||
Serial.flush();
|
||||
while (Serial.available()) Serial.read();
|
||||
radio.frequency(freq);
|
||||
Serial.print("set frequency: ");
|
||||
Serial.println(freq);
|
||||
|
|
Loading…
Reference in New Issue