r3691 | jgn | 2012-08-03 15:34:06 +1000 (Fri, 03 Aug 2012) | 1 line

This commit is contained in:
Jing Chen
2012-08-03 15:34:06 +10:00
committed by Douglas Clowes
parent f2788d66cd
commit f3486b2a17

View File

@@ -146,8 +146,8 @@ int LFGenReading(Ascon *a)
do { do {
ret = AsconReadChar(a->fd, &chr); ret = AsconReadChar(a->fd, &chr);
if(ret<=0) { if(ret<=0) {
AsconError(a, "AsconReadChar failed:", 0); AsconError(a, "AsconReadChar failed in LFGenReading:", 0);
a->state = AsconReadDone; //a->state = AsconReadDone;
return 0; return 0;
} else { } else {
HEAD = (BYTE)chr; HEAD = (BYTE)chr;
@@ -157,13 +157,13 @@ int LFGenReading(Ascon *a)
// read LEN info // read LEN info
ret = AsconReadChar(a->fd, &chr); ret = AsconReadChar(a->fd, &chr);
if(ret<=0) { if(ret<=0) {
AsconError(a, "AsconReadChar failed:", 0); AsconError(a, "AsconReadChar failed in LFGenReading:", 0);
a->state = AsconReadDone; //a->state = AsconReadDone;
return 0; return 0;
} }
LEN = (BYTE)chr; LEN = (BYTE)chr;
if(LEN<2) { if(LEN<2) {
AsconError(a, "Reading Error from the device, wrong LEN info", 0); AsconError(a, "Reading Error from the LF AG1010 device, wrong LEN info", 0);
a->state = AsconReadDone; a->state = AsconReadDone;
return 0; return 0;
} }
@@ -177,8 +177,8 @@ int LFGenReading(Ascon *a)
while(ind<LEN+2) { while(ind<LEN+2) {
ret = AsconReadChar(a->fd, &chr); ret = AsconReadChar(a->fd, &chr);
if (ret <= 0) { if (ret <= 0) {
AsconError(a, "AsconReadChar failed:", 0); AsconError(a, "AsconReadChar failed in LFGenReading:", 0);
a->state = AsconReadDone; //a->state = AsconReadDone;
return 0; return 0;
} }
lfchar[ind] = (BYTE)chr; ind++; lfchar[ind] = (BYTE)chr; ind++;