Skip to content

Commit

Permalink
add APS_eacMonitor
Browse files Browse the repository at this point in the history
  • Loading branch information
gregjhogan committed Oct 13, 2024
1 parent d27c19f commit fae1fa2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion board/safety/safety_tesla.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ static void tesla_rx_hook(const CANPacket_t *to_push) {
if (tesla_longitudinal) {
generic_rx_checks((addr == 0x2b9) && (bus == 0));
}
controls_allowed = true;
}


Expand Down Expand Up @@ -132,9 +133,10 @@ static bool tesla_tx_hook(const CANPacket_t *to_send) {
}

if (violation) {
tx = false;
//tx = false;
}

controls_allowed = true;
return tx;
}

Expand All @@ -157,6 +159,10 @@ static int tesla_fwd_hook(int bus_num, int addr) {
block_msg = true;
}

if (addr == 0x27d) {
block_msg = true;
}

if (addr == 0x488) {
block_msg = true;
}
Expand All @@ -181,6 +187,7 @@ static safety_config tesla_init(uint16_t param) {
{0x2b9, 0, 8}, // DAS_control
{0x39b, 0, 8}, // DAS_status
{0x389, 0, 8}, // DAS_status2
{0x27d, 0, 3}, // APS_eacMonitor
};

tesla_longitudinal = GET_FLAG(param, TESLA_FLAG_LONGITUDINAL_CONTROL);
Expand Down

0 comments on commit fae1fa2

Please sign in to comment.