diff --git a/tests/libpanda/safety_helpers.h b/tests/libpanda/safety_helpers.h index 36887c896..ab4db4757 100644 --- a/tests/libpanda/safety_helpers.h +++ b/tests/libpanda/safety_helpers.h @@ -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; } diff --git a/tests/libpanda/safety_helpers.py b/tests/libpanda/safety_helpers.py index ea41264ae..6b510da6a 100644 --- a/tests/libpanda/safety_helpers.py +++ b/tests/libpanda/safety_helpers.py @@ -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); @@ -61,6 +62,7 @@ class PandaSafety(Protocol): 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: ...