Updated for checksum
Diff: main.cpp
- Revision:
- 11:40d5d9b5d2ba
- Parent:
- 10:42438194e82b
- Child:
- 12:5f97bcab6c50
--- a/main.cpp Tue Apr 13 19:11:12 2021 +0000 +++ b/main.cpp Wed May 26 18:14:09 2021 +0000 @@ -14,7 +14,7 @@ #define TX_LEN 98 //CHECK THESE BUFFER LENGHTS // length of outgoing/incoming messages -#define DATA_LEN 44 //CHECK THESE BUFFER LENGHTS +#define DATA_LEN 62 //CHECK THESE BUFFER LENGHTS #define CMD_LEN 98 //CHECK THESE BUFFER LENGHTS // Master CAN ID /// @@ -727,7 +727,7 @@ //PackAll(); //WriteAll(); } - spi_data.checksum = xor_checksum((uint32_t*)&spi_data,14); + spi_data.checksum = xor_checksum((uint32_t*)&spi_data,14); //OK THIS LINE ISN'T SETTING THE CHECKSUM B/C SETTINNG IT TO 10 DID NOTHIGN for(int i = 0; i < DATA_LEN; i++){ tx_buff[i] = ((uint16_t*)(&spi_data))[i];}