Skip to content

Commit ea6edb4

Browse files
authored
Merge pull request #3 from zathras777/master
Allow setConfiguration to return correctly
2 parents 566dcef + abbdf21 commit ea6edb4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

LoRa_E220.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,8 +435,6 @@ Status LoRa_E220::sendStruct(void *structureManaged, uint16_t size_) {
435435

436436
result = this->waitCompleteResponse(5000, 5000);
437437
if (result != E220_SUCCESS) return result;
438-
DEBUG_PRINT(F("Clear buffer..."))
439-
this->cleanUARTBuffer();
440438

441439
DEBUG_PRINTLN(F("ok!"))
442440

@@ -642,6 +640,9 @@ ResponseStatus LoRa_E220::setConfiguration(Configuration configuration, PROGRAM_
642640
rc.code = ERR_E220_HEAD_NOT_RECOGNIZED;
643641
}
644642

643+
DEBUG_PRINT(F("Clear buffer..."))
644+
this->cleanUARTBuffer();
645+
645646
return rc;
646647
}
647648

0 commit comments

Comments
 (0)