From 2e80d0304adc9196589ccb3fbdb5c7eeeb7966a6 Mon Sep 17 00:00:00 2001 From: Mattia Maldini Date: Wed, 14 Jul 2021 19:19:28 +0200 Subject: [PATCH] Fixed bug with CANrxData buffer indexing --- 301/CO_PDO.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/301/CO_PDO.c b/301/CO_PDO.c index bfed5e1..f0297dd 100644 --- a/301/CO_PDO.c +++ b/301/CO_PDO.c @@ -811,7 +811,7 @@ void CO_RPDO_process(CO_RPDO_t *RPDO, bool_t rpdoReceived = false; while (CO_FLAG_READ(RPDO->CANrxNew[bufNo])) { rpdoReceived = true; - uint8_t *dataRPDO = &RPDO->CANrxData[0][bufNo]; + uint8_t *dataRPDO = RPDO->CANrxData[bufNo]; /* Clear the flag. If between the copy operation CANrxNew is set * by receive thread, then copy the latest data again. */