Skip to content

Commit

Permalink
add set_gas_pressed_prev() helper (commaai#1986)
Browse files Browse the repository at this point in the history
add set_gas_pressed_prev helper
  • Loading branch information
bongbui321 authored Jul 18, 2024
1 parent 5ee262f commit f637584
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/libpanda/safety_helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ bool get_gas_pressed_prev(void){
return gas_pressed_prev;
}

void set_gas_pressed_prev(bool c){
gas_pressed_prev = c;
}

bool get_brake_pressed_prev(void){
return brake_pressed_prev;
}
Expand Down
2 changes: 2 additions & 0 deletions tests/libpanda/safety_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def setup_safety_helpers(ffi):
void set_relay_malfunction(bool c);
bool get_relay_malfunction(void);
bool get_gas_pressed_prev(void);
void set_gas_pressed_prev(bool);
bool get_brake_pressed_prev(void);
bool get_regen_braking_prev(void);
bool get_acc_main_on(void);
Expand Down Expand Up @@ -61,6 +62,7 @@ def get_alternative_experience(self) -> int: ...
def set_relay_malfunction(self, c: bool) -> None: ...
def get_relay_malfunction(self) -> bool: ...
def get_gas_pressed_prev(self) -> bool: ...
def set_gas_pressed_prev(self, c: bool) -> None: ...
def get_brake_pressed_prev(self) -> bool: ...
def get_regen_braking_prev(self) -> bool: ...
def get_acc_main_on(self) -> bool: ...
Expand Down

0 comments on commit f637584

Please sign in to comment.