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.
This commit is contained in:
ole00 2023-03-21 23:23:24 +00:00
parent f48513f05b
commit ffa637eb8e
1 changed files with 3 additions and 3 deletions

View File

@ -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