diff --git a/panda b/panda index 998a63936087a3..2fbf0c5ff86f2e 160000 --- a/panda +++ b/panda @@ -1 +1 @@ -Subproject commit 998a63936087a3d90cd29df88375d786491a78f8 +Subproject commit 2fbf0c5ff86f2e94021d7c937b9f8eb6839af484 diff --git a/selfdrive/pandad/panda.cc b/selfdrive/pandad/panda.cc index 5372e54aef8774..7b5fc9a9991bc5 100644 --- a/selfdrive/pandad/panda.cc +++ b/selfdrive/pandad/panda.cc @@ -145,6 +145,10 @@ void Panda::set_can_speed_kbps(uint16_t bus, uint16_t speed) { handle->control_write(0xde, bus, (speed * 10)); } +void Panda::set_can_fd_auto(uint16_t bus, bool enabled) { + handle->control_write(0xe8, bus, enabled); +} + void Panda::set_data_speed_kbps(uint16_t bus, uint16_t speed) { handle->control_write(0xf9, bus, (speed * 10)); } diff --git a/selfdrive/pandad/panda.h b/selfdrive/pandad/panda.h index 2491f2eb74b96c..6ae2c77755977a 100644 --- a/selfdrive/pandad/panda.h +++ b/selfdrive/pandad/panda.h @@ -77,6 +77,7 @@ class Panda { void enable_deepsleep(); void send_heartbeat(bool engaged); void set_can_speed_kbps(uint16_t bus, uint16_t speed); + void set_can_fd_auto(uint16_t bus, bool enabled); void set_data_speed_kbps(uint16_t bus, uint16_t speed); void set_canfd_non_iso(uint16_t bus, bool non_iso); void can_send(const capnp::List::Reader &can_data_list); diff --git a/selfdrive/pandad/pandad.cc b/selfdrive/pandad/pandad.cc index a85159f33a818b..dd970dd16ce09d 100644 --- a/selfdrive/pandad/pandad.cc +++ b/selfdrive/pandad/pandad.cc @@ -67,6 +67,10 @@ Panda *connect(std::string serial="", uint32_t index=0) { } //panda->enable_deepsleep(); + for (int i = 0; i < PANDA_BUS_CNT; i++) { + panda->set_can_fd_auto(i, true); + } + if (!panda->up_to_date() && !getenv("BOARDD_SKIP_FW_CHECK")) { throw std::runtime_error("Panda firmware out of date. Run pandad.py to update."); }