Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added message when trying to sync transmit

  • Loading branch information...
commit 95ffe7ef8b7a768410987b5630656a50ac0b9e10 1 parent b80f2a8
@tz1 authored
Showing with 15 additions and 8 deletions.
  1. +15 −8 v1test.c
View
23 v1test.c
@@ -305,16 +305,23 @@ static unsigned int maxswp = 5;
// make sure the buffer is clear by getting an echo.
// FIXME - should have long timeout and return status.
static void syncresp() {
- int iy;
+ int iy, ix;
// send one request version to clear out the incoming packet respgetfer
- makecmd(cmdsend, cmdslice, 0xa, REQVERSION, 0, NULL);
- sendcmd(cmdsend, NORESPONSE, respget);
for (;;) {
- iy = readpkt(respget);
- if (iy < 6)
- continue;
- if (respget[3] == RESPVERSION)
- break;
+ makecmd(cmdsend, cmdslice, 0xa, REQVERSION, 0, NULL);
+ sendcmd(cmdsend, NORESPONSE, respget);
+ ix = 20;
+ while( --ix ) {
+ iy = readpkt(respget);
+ if (iy < 6)
+ continue;
+ if (respget[3] == RESPVERSION)
+ break;
+ }
+ if( ix )
+ break;
+ else
+ printser(pullp(PSTR("syncing...\r\n")));
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.