Skip to content

Commit

Permalink
jungle: more robust CAN generation mode
Browse files Browse the repository at this point in the history
  • Loading branch information
adeebshihadeh committed Jun 4, 2024
1 parent 4df996c commit e2c9a81
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions board/jungle/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ void tick_handler(void) {

can_send(&to_send, to_send.bus, true);
}

for (int i = 0; i < 3; i++) {
if (can_health[i].transmit_error_cnt >= 128) {
(void)llcan_init(CANIF_FROM_CAN_NUM(i));
}
}
}

// tick drivers at 8Hz
Expand Down
2 changes: 1 addition & 1 deletion board/jungle/main_comms.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ int comms_control_handler(ControlPacket_t *req, uint8_t *resp) {
break;
// **** 0xa4: Enable generated CAN traffic.
case 0xa4:
generated_can_traffic = (req->param2 > 0U);
generated_can_traffic = (req->param1 > 0U);
break;
// **** 0xa8: get microsecond timer
case 0xa8:
Expand Down

0 comments on commit e2c9a81

Please sign in to comment.