diff --git a/tests/libpanda/safety_helpers.h b/tests/libpanda/safety_helpers.h index 2126b06a1..c33d593c6 100644 --- a/tests/libpanda/safety_helpers.h +++ b/tests/libpanda/safety_helpers.h @@ -158,11 +158,10 @@ int get_angle_meas_max(void){ return angle_meas.max; } -int get_angle_meas(int pos){ - return angle_meas.values[pos]; +int get_angle_meas_last(void){ + return angle_meas.values[0]; } - // ***** car specific helpers ***** void set_honda_alt_brake_msg(bool c){ diff --git a/tests/libpanda/safety_helpers.py b/tests/libpanda/safety_helpers.py index 3ce919253..c1ae88008 100644 --- a/tests/libpanda/safety_helpers.py +++ b/tests/libpanda/safety_helpers.py @@ -34,7 +34,7 @@ def setup_safety_helpers(ffi): void set_angle_meas(int min, int max); int get_angle_meas_min(void); int get_angle_meas_max(void); - int get_angle_meas(int pos); + int get_angle_meas_last(void); bool get_cruise_engaged_prev(void); void set_cruise_engaged_prev(bool engaged); diff --git a/tests/safety/test_subaru.py b/tests/safety/test_subaru.py index ac42bf9df..6839f661d 100755 --- a/tests/safety/test_subaru.py +++ b/tests/safety/test_subaru.py @@ -108,10 +108,10 @@ class TestSubaruSafetyBase(common.PandaCarSafetyTest): def test_angle_meas(self): self.assertTrue(self._rx(self._angle_meas_msg(0))) - self.assertEqual(self.safety.get_angle_meas(0), 0) + self.assertEqual(self.safety.get_angle_meas_last(), 0) self.assertTrue(self._rx(self._angle_meas_msg(1))) - self.assertEqual(self.safety.get_angle_meas(0), 100) + self.assertEqual(self.safety.get_angle_meas_last(), 100) def test_vehicle_speed(self): self.assertTrue(self._rx(self._speed_msg(0)))