- bug fixes and improvements
This commit is contained in:
@@ -49,7 +49,7 @@ char *LscCmd(SerChannel *ser, const char *cmds) {
|
||||
char cmd[SER_BUF_LEN];
|
||||
char varname[32];
|
||||
DeclStrBuf(sbuf, SER_BUF_LEN);
|
||||
int nres, i, response;
|
||||
int nres, i, response, try;
|
||||
|
||||
nres=0;
|
||||
response=0;
|
||||
@@ -111,8 +111,18 @@ char *LscCmd(SerChannel *ser, const char *cmds) {
|
||||
} else {
|
||||
sbuf.buf[sbuf.wrpos-1]='\0'; /* strip off trailing ";" */
|
||||
}
|
||||
ERR_P(res=SerCmd(ser, sbuf.buf));
|
||||
if (0==strncmp("?TMO", res, 4)) ERR_MSG("timeout");
|
||||
|
||||
try = 3;
|
||||
while (1) {
|
||||
ERR_P(res=SerCmd(ser, sbuf.buf));
|
||||
if (0!=strncmp("?TMO", res, 4)) {
|
||||
break;
|
||||
}
|
||||
try--;
|
||||
if (try <= 0) {
|
||||
ERR_MSG("timeout");
|
||||
}
|
||||
}
|
||||
/*
|
||||
list[0..nres-1] contains a now:
|
||||
for a command with return request:
|
||||
|
||||
Reference in New Issue
Block a user