|
|
@ -85,10 +85,10 @@ class Controls: |
|
|
|
ignore = self.sensor_packets + ['testJoystick'] |
|
|
|
ignore = self.sensor_packets + ['testJoystick'] |
|
|
|
if SIMULATION: |
|
|
|
if SIMULATION: |
|
|
|
ignore += ['driverCameraState', 'managerState'] |
|
|
|
ignore += ['driverCameraState', 'managerState'] |
|
|
|
self.sm = messaging.SubMaster(['deviceState', 'pandaStates', 'peripheralState', 'modelV2', 'liveCalibration', |
|
|
|
self.sm = messaging.SubMaster(['carState', 'deviceState', 'pandaStates', 'peripheralState', 'modelV2', 'liveCalibration', |
|
|
|
'carOutput', 'driverMonitoringState', 'longitudinalPlan', 'liveLocationKalman', |
|
|
|
'carOutput', 'driverMonitoringState', 'longitudinalPlan', 'liveLocationKalman', |
|
|
|
'managerState', 'liveParameters', 'radarState', 'liveTorqueParameters', |
|
|
|
'managerState', 'liveParameters', 'radarState', 'liveTorqueParameters', |
|
|
|
'carState', 'testJoystick'] + self.camera_packets + self.sensor_packets, |
|
|
|
'testJoystick'] + self.camera_packets + self.sensor_packets, |
|
|
|
poll='carState', |
|
|
|
poll='carState', |
|
|
|
ignore_alive=ignore, ignore_avg_freq=ignore+['radarState', 'testJoystick'], ignore_valid=['testJoystick', ]) |
|
|
|
ignore_alive=ignore, ignore_avg_freq=ignore+['radarState', 'testJoystick'], ignore_valid=['testJoystick', ]) |
|
|
|
|
|
|
|
|
|
|
@ -110,7 +110,6 @@ class Controls: |
|
|
|
if not self.CP.openpilotLongitudinalControl: |
|
|
|
if not self.CP.openpilotLongitudinalControl: |
|
|
|
self.params.remove("ExperimentalMode") |
|
|
|
self.params.remove("ExperimentalMode") |
|
|
|
|
|
|
|
|
|
|
|
self.CC = car.CarControl.new_message() |
|
|
|
|
|
|
|
self.CS_prev = car.CarState.new_message() |
|
|
|
self.CS_prev = car.CarState.new_message() |
|
|
|
self.AM = AlertManager() |
|
|
|
self.AM = AlertManager() |
|
|
|
self.events = Events() |
|
|
|
self.events = Events() |
|
|
@ -806,9 +805,6 @@ class Controls: |
|
|
|
cc_send.carControl = CC |
|
|
|
cc_send.carControl = CC |
|
|
|
self.pm.send('carControl', cc_send) |
|
|
|
self.pm.send('carControl', cc_send) |
|
|
|
|
|
|
|
|
|
|
|
# copy CarControl to pass to CarInterface on the next iteration |
|
|
|
|
|
|
|
self.CC = CC |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def step(self): |
|
|
|
def step(self): |
|
|
|
start_time = time.monotonic() |
|
|
|
start_time = time.monotonic() |
|
|
|
|
|
|
|
|
|
|
|