libpandasafety: add safety_tick

This commit is contained in:
Adeeb Shihadeh 2021-12-01 13:21:46 -08:00
parent c9992a80c0
commit 6bea710359
2 changed files with 8 additions and 0 deletions

View File

@ -57,6 +57,7 @@ int safety_rx_hook(CANPacket_t *to_send);
int safety_tx_hook(CANPacket_t *to_push);
int safety_fwd_hook(int bus_num, CANPacket_t *to_fwd);
int set_safety_hooks(uint16_t mode, int16_t param);
void safety_tick_current_rx_checks();
void init_tests(void);

View File

@ -66,6 +66,10 @@ uint32_t microsecond_timer_get(void) {
return MICROSECOND_TIMER->CNT;
}
void safety_tick_current_rx_checks() {
safety_tick(current_rx_checks);
}
void set_controls_allowed(bool c){
controls_allowed = c;
}
@ -168,6 +172,9 @@ void set_desired_angle_last(int t){
desired_angle_last = t;
}
// ***** car specific helpers *****
void set_honda_alt_brake_msg(bool c){
honda_alt_brake_msg = c;
}