[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
|
||||
int16_t state = readApiFrame(frameID, 4);
|
||||
if(state != ERR_NONE) {
|
||||
return(state);
|
||||
}
|
||||
RADIOLIB_ASSERT(state);
|
||||
|
||||
// confirm changes
|
||||
return(confirmChanges());
|
||||
|
@ -343,9 +341,7 @@ int16_t XBee::confirmChanges() {
|
|||
|
||||
// get response code
|
||||
int16_t state = readApiFrame(frameID, 4);
|
||||
if(state != ERR_NONE) {
|
||||
return(state);
|
||||
}
|
||||
RADIOLIB_ASSERT(state);
|
||||
|
||||
// apply changes
|
||||
frameID = _frameID++;
|
||||
|
@ -353,9 +349,6 @@ int16_t XBee::confirmChanges() {
|
|||
|
||||
// get response code
|
||||
state = readApiFrame(frameID, 4);
|
||||
if(state != ERR_NONE) {
|
||||
return(state);
|
||||
}
|
||||
|
||||
return(state);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue