[XBee] Added assert macro

This commit is contained in:
jgromes 2020-01-13 16:37:37 +01:00
parent acd78cb6bb
commit 016fb0d462

View file

@ -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);
} }