Skip to content

Commit

Permalink
forgot the counter
Browse files Browse the repository at this point in the history
  • Loading branch information
geohot committed Mar 13, 2018
1 parent 3a6d7db commit 27c7637
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion board/pedal/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 27c7637

Please sign in to comment.