kopia lustrzana https://github.com/jgromes/RadioLib
Module: Get status from first byte after the command
Instead of getting the status from the very first byte in the input buffer, which will be what we read when we send the first byte. Let's instead get the status from the first byte after the command. This provides a more accurate status value. Signed-off-by: Alistair Francis <alistair@alistair23.me>pull/781/head
rodzic
3359907fa5
commit
e88cf386d6
|
@ -328,7 +328,7 @@ int16_t Module::SPItransferStream(uint8_t* cmd, uint8_t cmdLen, bool write, uint
|
|||
// parse status
|
||||
int16_t state = RADIOLIB_ERR_NONE;
|
||||
if(this->SPIparseStatusCb != nullptr) {
|
||||
state = this->SPIparseStatusCb(buffIn[0]);
|
||||
state = this->SPIparseStatusCb(buffIn[cmdLen]);
|
||||
}
|
||||
|
||||
// copy the data
|
||||
|
|
Ładowanie…
Reference in New Issue