desire_helper.py:修改通过命令变道的维持时间为2秒

This commit is contained in:
openpilot
2026-05-17 22:35:59 +08:00
parent 335dd7698a
commit 24834a07ab
+1 -1
View File
@@ -497,7 +497,7 @@ class DesireHelper:
# self.carrot_cmd_index_last = carrotMan.carrotCmdIndex
elif carrotMan.carrotCmdIndex != self.carrot_cmd_index_last and (carrotMan.carrotCmd == "LANECHANGE" or carrotMan.carrotCmd == "OVERTAKE"): #来自app的变道命令
self.carrot_cmd_index_last = carrotMan.carrotCmdIndex
self.carrot_lane_change_count = int(0.2 / DT_MDL)
self.carrot_lane_change_count = int(2.0 / DT_MDL)
self.carrot_blinker_state = BLINKER_LEFT if carrotMan.carrotArg == "LEFT" else BLINKER_RIGHT
print(f"---[{time.strftime('%H:%M:%S')}]Desire lanechange: {carrotMan.carrotArg},counter={self.carrot_lane_change_count},blinker={self.carrot_blinker_state},"
f"state={self.lane_change_state},prev_desire_enabled={self.prev_desire_enabled},"