Open Sergey1560 opened 4 years ago
In function nRF24_ReadPayload: *length = nRF24_ReadReg(nRF24_REG_RX_PW_P0 + pipe); It works only for fixed size payload. I suggest replacing with: *length = nRF24_ReadReg(CMD_R_RX_PL_WID); This will work for both fixed size and dynamic.
*length = nRF24_ReadReg(nRF24_REG_RX_PW_P0 + pipe);
*length = nRF24_ReadReg(CMD_R_RX_PL_WID);
In function nRF24_ReadPayload:
*length = nRF24_ReadReg(nRF24_REG_RX_PW_P0 + pipe);
It works only for fixed size payload. I suggest replacing with:*length = nRF24_ReadReg(CMD_R_RX_PL_WID);
This will work for both fixed size and dynamic.