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:
committed by
Douglas Clowes
parent
b0fd7636b4
commit
bc3471bb98
@@ -225,12 +225,15 @@ int RFAmpReading (Ascon *a)
|
|||||||
strncpy(tmpFreq, &data->rfCmd[5], 3);
|
strncpy(tmpFreq, &data->rfCmd[5], 3);
|
||||||
tmpSwitchs = (unsigned char)data->rfCmd[8];
|
tmpSwitchs = (unsigned char)data->rfCmd[8];
|
||||||
|
|
||||||
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;
|
||||||
|
|||||||
Reference in New Issue
Block a user