fix panda acc

This commit is contained in:
jakethesake420
2024-09-25 08:48:19 -05:00
committed by MoreTore
parent 6666333553
commit 2729902435
+2
View File
@@ -129,6 +129,7 @@ static void mazda_rx_hook(const CANPacket_t *to_push) {
// enter controls on rising edge of ACC, exit controls on ACC off
if (addr == MAZDA_CRZ_CTRL && !no_mrcc && !radar_interceptor) {
acc_main_on = GET_BIT(to_push, 17U);
bool cruise_engaged = GET_BYTE(to_push, 0) & 0x8U;
pcm_cruise_check(cruise_engaged);
}
@@ -140,6 +141,7 @@ static void mazda_rx_hook(const CANPacket_t *to_push) {
if (addr == MAZDA_PEDALS) {
brake_pressed = (GET_BYTE(to_push, 0) & 0x10U);
if (radar_interceptor || no_mrcc) {
// acc_main_on = GET_BIT(to_push, 17U); TODO
bool cruise_engaged = GET_BYTE(to_push, 0) & 0x8U;
pcm_cruise_check(cruise_engaged);
}