|
|
@ -21,7 +21,7 @@ from openpilot.selfdrive.car.car_helpers import FRAME_FINGERPRINT, interfaces |
|
|
|
from openpilot.selfdrive.car.honda.values import CAR as HONDA, HondaFlags |
|
|
|
from openpilot.selfdrive.car.honda.values import CAR as HONDA, HondaFlags |
|
|
|
from openpilot.selfdrive.car.tests.routes import non_tested_cars, routes, CarTestRoute |
|
|
|
from openpilot.selfdrive.car.tests.routes import non_tested_cars, routes, CarTestRoute |
|
|
|
from openpilot.selfdrive.car.values import Platform |
|
|
|
from openpilot.selfdrive.car.values import Platform |
|
|
|
from openpilot.selfdrive.car.card import Car |
|
|
|
from openpilot.selfdrive.car.card import Car, convert_carControl |
|
|
|
from openpilot.selfdrive.pandad import can_capnp_to_list |
|
|
|
from openpilot.selfdrive.pandad import can_capnp_to_list |
|
|
|
from openpilot.selfdrive.test.helpers import read_segment_list |
|
|
|
from openpilot.selfdrive.test.helpers import read_segment_list |
|
|
|
from openpilot.system.hardware.hw import DEFAULT_DOWNLOAD_CACHE_ROOT |
|
|
|
from openpilot.system.hardware.hw import DEFAULT_DOWNLOAD_CACHE_ROOT |
|
|
@ -310,17 +310,17 @@ class TestCarModelBase(unittest.TestCase): |
|
|
|
|
|
|
|
|
|
|
|
# Make sure we can send all messages while inactive |
|
|
|
# Make sure we can send all messages while inactive |
|
|
|
CC = car.CarControl.new_message() |
|
|
|
CC = car.CarControl.new_message() |
|
|
|
test_car_controller(CC.as_reader()) |
|
|
|
test_car_controller(convert_carControl(CC.as_reader())) |
|
|
|
|
|
|
|
|
|
|
|
# Test cancel + general messages (controls_allowed=False & cruise_engaged=True) |
|
|
|
# Test cancel + general messages (controls_allowed=False & cruise_engaged=True) |
|
|
|
self.safety.set_cruise_engaged_prev(True) |
|
|
|
self.safety.set_cruise_engaged_prev(True) |
|
|
|
CC = car.CarControl.new_message(cruiseControl={'cancel': True}) |
|
|
|
CC = car.CarControl.new_message(cruiseControl={'cancel': True}) |
|
|
|
test_car_controller(CC.as_reader()) |
|
|
|
test_car_controller(convert_carControl(CC.as_reader())) |
|
|
|
|
|
|
|
|
|
|
|
# Test resume + general messages (controls_allowed=True & cruise_engaged=True) |
|
|
|
# Test resume + general messages (controls_allowed=True & cruise_engaged=True) |
|
|
|
self.safety.set_controls_allowed(True) |
|
|
|
self.safety.set_controls_allowed(True) |
|
|
|
CC = car.CarControl.new_message(cruiseControl={'resume': True}) |
|
|
|
CC = car.CarControl.new_message(cruiseControl={'resume': True}) |
|
|
|
test_car_controller(CC.as_reader()) |
|
|
|
test_car_controller(convert_carControl(CC.as_reader())) |
|
|
|
|
|
|
|
|
|
|
|
# Skip stdout/stderr capture with pytest, causes elevated memory usage |
|
|
|
# Skip stdout/stderr capture with pytest, causes elevated memory usage |
|
|
|
@pytest.mark.nocapture |
|
|
|
@pytest.mark.nocapture |
|
|
|