oscarpilot:

- muted engage / disengage sounds in custom theme
- modified some defaults
- turned off lane change helper
- modified driver monitor for 30 second warn / 60 second fatal
This commit is contained in:
concordia
2024-01-29 11:08:12 -06:00
parent b0abb3e6e1
commit dd1d9de35a
7 changed files with 41 additions and 39 deletions

View File

@@ -328,19 +328,19 @@ class Controls:
self.events.add(EventName.calibrationInvalid)
# Handle lane change
if self.sm['lateralPlan'].laneChangeState == LaneChangeState.preLaneChange:
direction = self.sm['lateralPlan'].laneChangeDirection
if (CS.leftBlindspot and direction == LaneChangeDirection.left) or \
(CS.rightBlindspot and direction == LaneChangeDirection.right):
self.events.add(EventName.laneChangeBlocked)
else:
if direction == LaneChangeDirection.left:
self.events.add(EventName.preLaneChangeLeft)
else:
self.events.add(EventName.preLaneChangeRight)
elif self.sm['lateralPlan'].laneChangeState in (LaneChangeState.laneChangeStarting,
LaneChangeState.laneChangeFinishing):
self.events.add(EventName.laneChange)
# if self.sm['lateralPlan'].laneChangeState == LaneChangeState.preLaneChange:
# direction = self.sm['lateralPlan'].laneChangeDirection
# if (CS.leftBlindspot and direction == LaneChangeDirection.left) or \
# (CS.rightBlindspot and direction == LaneChangeDirection.right):
# self.events.add(EventName.laneChangeBlocked)
# else:
# if direction == LaneChangeDirection.left:
# self.events.add(EventName.preLaneChangeLeft)
# else:
# self.events.add(EventName.preLaneChangeRight)
# elif self.sm['lateralPlan'].laneChangeState in (LaneChangeState.laneChangeStarting,
# LaneChangeState.laneChangeFinishing):
# self.events.add(EventName.laneChange)
# Handle turning
if not CS.standstill:
@@ -659,7 +659,7 @@ class Controls:
self.lateral_allowed |= CS.cruiseState.enabled or (CS.cruiseState.available and self.always_on_lateral_main)
self.FPCC.alwaysOnLateral = self.lateral_allowed and driving_gear and signal_check
if self.FPCC.alwaysOnLateral:
if self.FPCC.alwaysOnLateral:/
self.current_alert_types.append(ET.WARNING)
# Check which actuators can be enabled
@@ -672,9 +672,9 @@ class Controls:
actuators.longControlState = self.LoC.long_control_state
# Enable blinkers while lane changing
if self.sm['lateralPlan'].laneChangeState != LaneChangeState.off:
CC.leftBlinker = self.sm['lateralPlan'].laneChangeDirection == LaneChangeDirection.left
CC.rightBlinker = self.sm['lateralPlan'].laneChangeDirection == LaneChangeDirection.right
# if self.sm['lateralPlan'].laneChangeState != LaneChangeState.off:
# CC.leftBlinker = self.sm['lateralPlan'].laneChangeDirection == LaneChangeDirection.left
# CC.rightBlinker = self.sm['lateralPlan'].laneChangeDirection == LaneChangeDirection.right
if CS.leftBlinker or CS.rightBlinker:
self.last_blinker_frame = self.sm.frame