From 27c76372e9c407e006dfe9f7cde594234ffbc11a Mon Sep 17 00:00:00 2001 From: George Hotz Date: Mon, 12 Mar 2018 17:55:24 -0700 Subject: [PATCH] forgot the counter --- board/pedal/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/pedal/main.c b/board/pedal/main.c index f57c5d498f6832..5b0ce4cc0701ec 100644 --- a/board/pedal/main.c +++ b/board/pedal/main.c @@ -196,7 +196,7 @@ void TIM3_IRQHandler() { dat[2] = (pdl1>>8)&0xFF; dat[3] = (pdl1>>0)&0xFF; dat[4] = state; - dat[5] = can_cksum(dat, 5, CAN_GAS_OUTPUT, pkt_idx); + dat[5] = can_cksum(dat, 5, CAN_GAS_OUTPUT, pkt_idx) | (pkt_idx<<4); CAN->sTxMailBox[0].TDLR = dat[0] | (dat[1]<<8) | (dat[2]<<16) | (dat[3]<<24); CAN->sTxMailBox[0].TDHR = dat[4] | (dat[5]<<8); CAN->sTxMailBox[0].TDTR = 6; // len of packet is 5