pc app: fixed detection of serial prompt

This commit is contained in:
ole00 2022-04-01 17:48:20 +01:00
parent 772181f20b
commit 443072e423

View File

@ -51,7 +51,7 @@ To compile: gcc -g3 -O0 afterburner afterburner.c
#include "serial_port.h" #include "serial_port.h"
#define VERSION "v.0.3" #define VERSION "v.0.3.1"
#define MAX_LINE 200 #define MAX_LINE 200
@ -589,7 +589,7 @@ static int waitForSerialPrompt(char* buf, int bufSize, int maxDelay) {
if (readSize > 0) { if (readSize > 0) {
bufPos += readSize; bufPos += readSize;
if (checkPromptExists(bufStart, bufTotal) >= 0) { if (checkPromptExists(bufStart, bufTotal) >= 0) {
maxDelay = 0; //force exit maxDelay = 4; //force exit, but read the rest of the line
} else { } else {
buf += readSize; buf += readSize;
bufSize -= readSize; bufSize -= readSize;