mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-09-29 21:33:42 +08:00
MSPA: Lat plan deprecation prerequisites (#276)
* MSPA: Lat plan deprecation prerequisites * bump cereal
This commit is contained in:
+1
-1
Submodule cereal updated: e99eb7bdd4...d3d5b06703
@@ -81,7 +81,7 @@ class Controls:
|
||||
self.sm = messaging.SubMaster(['deviceState', 'pandaStates', 'peripheralState', 'modelV2', 'liveCalibration',
|
||||
'driverMonitoringState', 'longitudinalPlan', 'lateralPlan', 'liveLocationKalman',
|
||||
'managerState', 'liveParameters', 'radarState', 'liveTorqueParameters',
|
||||
'testJoystick', 'longitudinalPlanSP', 'lateralPlanSPDEPRECATED'] + self.camera_packets + self.sensor_packets,
|
||||
'testJoystick', 'longitudinalPlanSP', 'lateralPlanSPDEPRECATED', 'modelV2SP'] + self.camera_packets + self.sensor_packets,
|
||||
ignore_alive=ignore, ignore_avg_freq=['radarState', 'testJoystick'])
|
||||
|
||||
if CI is None:
|
||||
@@ -299,7 +299,7 @@ class Controls:
|
||||
lane_change_set_timer = int(self.params.get("AutoLaneChangeTimer", encoding="utf8"))
|
||||
if self.sm['lateralPlan'].laneChangeState == LaneChangeState.preLaneChange:
|
||||
direction = self.sm['lateralPlan'].laneChangeDirection
|
||||
lc_prev = self.sm['lateralPlanSPDEPRECATED'].laneChangePrev
|
||||
lc_prev = self.sm['lateralPlanSPDEPRECATED'].laneChangePrevDEPRECATED
|
||||
if (CS.leftBlindspot and direction == LaneChangeDirection.left) or \
|
||||
(CS.rightBlindspot and direction == LaneChangeDirection.right):
|
||||
self.events.add(EventName.laneChangeBlocked)
|
||||
|
||||
@@ -77,6 +77,6 @@ class LateralPlanner:
|
||||
plan_sp_send.valid = sm.all_checks(service_list=['carState', 'controlsState', 'modelV2'])
|
||||
|
||||
lateralPlanSPDEPRECATED = plan_sp_send.lateralPlanSPDEPRECATED
|
||||
lateralPlanSPDEPRECATED.laneChangePrev = self.DH.prev_lane_change
|
||||
lateralPlanSPDEPRECATED.laneChangePrevDEPRECATED = self.DH.prev_lane_change
|
||||
|
||||
pm.send('lateralPlanSPDEPRECATED', plan_sp_send)
|
||||
|
||||
@@ -272,12 +272,14 @@ def main():
|
||||
|
||||
if model_output is not None:
|
||||
modelv2_send = messaging.new_message('modelV2')
|
||||
modelv2_sp_send = messaging.new_message('modelV2SP')
|
||||
posenet_send = messaging.new_message('cameraOdometry')
|
||||
fill_model_msg(modelv2_send, model_output, publish_state, meta_main.frame_id, meta_extra.frame_id, frame_id, frame_drop_ratio,
|
||||
meta_main.timestamp_eof, timestamp_llk, model_execution_time, nav_enabled, live_calib_seen)
|
||||
|
||||
fill_pose_msg(posenet_send, model_output, meta_main.frame_id, vipc_dropped_frames, meta_main.timestamp_eof, live_calib_seen)
|
||||
pm.send('modelV2', modelv2_send)
|
||||
pm.send('modelV2SP', modelv2_sp_send)
|
||||
pm.send('cameraOdometry', posenet_send)
|
||||
|
||||
last_vipc_frame_id = meta_main.frame_id
|
||||
|
||||
Reference in New Issue
Block a user