If the S (set) command fails it should be reported as an error.

r2920 | ffr | 2010-05-12 17:35:17 +1000 (Wed, 12 May 2010) | 2 lines
This commit is contained in:
Ferdi Franceschini
2010-05-12 17:35:17 +10:00
committed by Douglas Clowes
parent b0fd7636b4
commit bc3471bb98

View File

@@ -228,9 +228,12 @@ int RFAmpReading (Ascon *a)
if( (atoi(curr) != atoi(tmpCurr)) || if( (atoi(curr) != atoi(tmpCurr)) ||
(atoi(freq) != atoi(tmpFreq)) || (atoi(freq) != atoi(tmpFreq)) ||
((switches & 0x7F) != (tmpSwitchs & 0x7F)) ) { ((switches & 0x7F) != (tmpSwitchs & 0x7F)) ) {
DynStringReplace(a->rdBuffer, "Warning: Writting Device Error!", 0); strcpy(errMsg, "ANSRFAMP: the (S)ET command failed");
}else GetReplyFailed = 1;
break;
} else {
DynStringReplace(a->rdBuffer, "OK", 0); DynStringReplace(a->rdBuffer, "OK", 0);
}
a->state = AsconReadDone; a->state = AsconReadDone;
data->transactInProg = txNormalRead; data->transactInProg = txNormalRead;