mirror of https://github.com/commaai/panda.git
better
This commit is contained in:
parent
4355934ff0
commit
3c7672c31a
|
@ -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){
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)))
|
||||
|
|
Loading…
Reference in New Issue