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>
This commit is contained in:
parent
3359907fa5
commit
e88cf386d6
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue