From ffa637eb8ee0d9edbd911cb0cbc7fa6fb626e41c Mon Sep 17 00:00:00 2001 From: ole00 Date: Tue, 21 Mar 2023 23:23:24 +0000 Subject: [PATCH] PC app: lunx serial port read tweak This change seems to fix a weird issue where some of the lines were split in two lines. This could be reproduced when using 'i' command with ATF22V10C or ATF16V8B repeatedly. --- src_pc/afterburner.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src_pc/afterburner.c b/src_pc/afterburner.c index d8b241f..379fac8 100644 --- a/src_pc/afterburner.c +++ b/src_pc/afterburner.c @@ -51,7 +51,7 @@ To compile: gcc -g3 -O0 afterburner afterburner.c #include "serial_port.h" -#define VERSION "v.0.4" +#define VERSION "v.0.4.1" #define MAX_LINE 200 @@ -598,8 +598,8 @@ static int waitForSerialPrompt(char* buf, int bufSize, int maxDelay) { if (maxDelay > 0) { /* WIN_API handles timeout itself */ #ifndef _USE_WIN_API_ - usleep(3 * 1000); - maxDelay -= 3; + usleep(10 * 1000); + maxDelay -= 10; #else maxDelay -= 30; #endif