mirror of
https://github.com/infiniteCable2/panda.git
synced 2026-02-18 17:23:52 +08:00
jungle: more robust CAN generation mode
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user