[XBee] Added assert macro
This commit is contained in:
parent
acd78cb6bb
commit
016fb0d462
1 changed files with 2 additions and 9 deletions
|
@ -173,9 +173,7 @@ int16_t XBee::setPanId(uint8_t* panId) {
|
||||||
|
|
||||||
// get response code
|
// get response code
|
||||||
int16_t state = readApiFrame(frameID, 4);
|
int16_t state = readApiFrame(frameID, 4);
|
||||||
if(state != ERR_NONE) {
|
RADIOLIB_ASSERT(state);
|
||||||
return(state);
|
|
||||||
}
|
|
||||||
|
|
||||||
// confirm changes
|
// confirm changes
|
||||||
return(confirmChanges());
|
return(confirmChanges());
|
||||||
|
@ -343,9 +341,7 @@ int16_t XBee::confirmChanges() {
|
||||||
|
|
||||||
// get response code
|
// get response code
|
||||||
int16_t state = readApiFrame(frameID, 4);
|
int16_t state = readApiFrame(frameID, 4);
|
||||||
if(state != ERR_NONE) {
|
RADIOLIB_ASSERT(state);
|
||||||
return(state);
|
|
||||||
}
|
|
||||||
|
|
||||||
// apply changes
|
// apply changes
|
||||||
frameID = _frameID++;
|
frameID = _frameID++;
|
||||||
|
@ -353,9 +349,6 @@ int16_t XBee::confirmChanges() {
|
||||||
|
|
||||||
// get response code
|
// get response code
|
||||||
state = readApiFrame(frameID, 4);
|
state = readApiFrame(frameID, 4);
|
||||||
if(state != ERR_NONE) {
|
|
||||||
return(state);
|
|
||||||
}
|
|
||||||
|
|
||||||
return(state);
|
return(state);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue