pull/177/head
alanbjohnston 3 years ago committed by GitHub
parent 7603e30bdb
commit 8d02c152dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -3731,7 +3731,7 @@ void prompt_for_input() {
print_string(serial_string); print_string(serial_string);
if (strlen(callsign) > 0) { if (strlen(serial_string) > 0) {
strcpy(callsign, serial_string); strcpy(callsign, serial_string);
Serial.println("Callsign updated!"); Serial.println("Callsign updated!");
} else } else
@ -3797,7 +3797,8 @@ void prompt_for_input() {
void get_serial_string() { void get_serial_string() {
int input = 0; int input = 0;
int i = 0; int i = 0;
while ((input != '\n') && (input!= '\r') && (i < 128)) { unsigned int elapsed_time = (unsigned int) millis();
while ((input != '\n') && (input!= '\r') && (i < 128) && ((millis() - elapsed_time) < 10000)) {
if (Serial.available() > 0) { if (Serial.available() > 0) {
input = Serial.read(); input = Serial.read();
serial_string[i++] = input; serial_string[i++] = input;

Loading…
Cancel
Save

Powered by TurnKey Linux.