diff --git a/Core/Src/ADBMS_Abstraction.c b/Core/Src/ADBMS_Abstraction.c index 2b57a64..d27d339 100644 --- a/Core/Src/ADBMS_Abstraction.c +++ b/Core/Src/ADBMS_Abstraction.c @@ -263,7 +263,7 @@ uint8_t amsWriteComm(uint8_t device, uint8_t addr, uint8_t data) { CHECK_RETURN(writeCMD(WRCOMM, txbuf, COMM_GROUP_SIZE)); uint8_t rxbuf[6] = {0,0,0,0,0,0}; readCMD(RDCOMM, rxbuf, COMM_GROUP_SIZE); - if (rxbuf[6] != txbuf[6]) { + if (rxbuf[5] != txbuf[5]) { // assert that the data was written correctly while(1){} } CHECK_RETURN(writeCMD_I2C(STCOMM, 72, NULL, 0));