mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-09 09:43:47 +08:00
Turn Desires
This commit is contained in:
@@ -3,6 +3,7 @@ import random
|
||||
|
||||
from openpilot.common.constants import ACCELERATION_DUE_TO_GRAVITY, CV
|
||||
from openpilot.common.realtime import DT_MDL
|
||||
from openpilot.selfdrive.controls.lib.desire_helper import TurnDirection
|
||||
from openpilot.selfdrive.selfdrived.events import ET, EVENT_NAME, FROGPILOT_EVENT_NAME, EventName, FrogPilotEventName, Events
|
||||
|
||||
from openpilot.frogpilot.common.frogpilot_variables import CRUISING_SPEED, NON_DRIVING_GEARS
|
||||
@@ -192,4 +193,9 @@ class FrogPilotEvents:
|
||||
|
||||
self.previous_traffic_mode = sm["frogpilotCarState"].trafficModeEnabled
|
||||
|
||||
if sm["frogpilotModelV2"].turnDirection == TurnDirection.turnLeft:
|
||||
self.events.add(FrogPilotEventName.turningLeft)
|
||||
elif sm["frogpilotModelV2"].turnDirection == TurnDirection.turnRight:
|
||||
self.events.add(FrogPilotEventName.turningRight)
|
||||
|
||||
self.played_events.update(FROGPILOT_EVENT_NAME[event] for event in self.events.names)
|
||||
|
||||
Reference in New Issue
Block a user