From 00799154efea6d71bd3930c7cf85e8bef8cd547d Mon Sep 17 00:00:00 2001 From: discountchubbs Date: Fri, 7 Nov 2025 07:47:16 -0800 Subject: [PATCH] merge origin/nav-desires into nav-commacon --- selfdrive/selfdrived/selfdrived.py | 8 ++++---- sunnypilot/navd/navigation_helpers/nav_instructions.py | 2 +- sunnypilot/navd/navigation_helpers/tests/test_mapbox.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/selfdrive/selfdrived/selfdrived.py b/selfdrive/selfdrived/selfdrived.py index dfa55dd01c..4e599d34ca 100755 --- a/selfdrive/selfdrived/selfdrived.py +++ b/selfdrive/selfdrived/selfdrived.py @@ -99,7 +99,7 @@ class SelfdriveD(CruiseHelper): 'managerState', 'liveParameters', 'radarState', 'liveTorqueParameters', 'controlsState', 'carControl', 'driverAssistance', 'alertDebug', 'userBookmark', 'audioFeedback', 'modelDataV2SP', 'longitudinalPlanSP', 'navigationd'] + \ - self.camera_packets + self.sensor_packets + self.gps_packets, + self.camera_packets + self.sensor_packets + self.gps_packets, ignore_alive=ignore, ignore_avg_freq=ignore, ignore_valid=ignore, frequency=int(1/DT_CTRL)) @@ -293,7 +293,7 @@ class SelfdriveD(CruiseHelper): if self.sm['modelV2'].meta.laneChangeState == LaneChangeState.preLaneChange: direction = self.sm['modelV2'].meta.laneChangeDirection if (CS.leftBlindspot and direction == LaneChangeDirection.left) or \ - (CS.rightBlindspot and direction == LaneChangeDirection.right): + (CS.rightBlindspot and direction == LaneChangeDirection.right): self.events.add(EventName.laneChangeBlocked) else: if direction == LaneChangeDirection.left: @@ -301,7 +301,7 @@ class SelfdriveD(CruiseHelper): else: self.events.add(EventName.preLaneChangeRight) elif self.sm['modelV2'].meta.laneChangeState in (LaneChangeState.laneChangeStarting, - LaneChangeState.laneChangeFinishing): + LaneChangeState.laneChangeFinishing): self.events.add(EventName.laneChange) # Handle lane turn @@ -496,7 +496,7 @@ class SelfdriveD(CruiseHelper): # All pandas not in silent mode must have controlsAllowed when openpilot is enabled if self.enabled and any(not ps.controlsAllowed for ps in self.sm['pandaStates'] - if ps.safetyModel not in IGNORED_SAFETY_MODES): + if ps.safetyModel not in IGNORED_SAFETY_MODES): self.mismatch_counter += 1 return CS diff --git a/sunnypilot/navd/navigation_helpers/nav_instructions.py b/sunnypilot/navd/navigation_helpers/nav_instructions.py index 6459c785cb..9d4ea000e9 100644 --- a/sunnypilot/navd/navigation_helpers/nav_instructions.py +++ b/sunnypilot/navd/navigation_helpers/nav_instructions.py @@ -114,7 +114,7 @@ class NavigationInstructions: self.coord.latitude = current_lat self.coord.longitude = current_lon distance = self.coord.distance_to(progress['next_turn']['location']) - if distance <= 100: + if distance <= 30.0: modifier = progress['next_turn']['modifier'] return str(modifier) return 'none' diff --git a/sunnypilot/navd/navigation_helpers/tests/test_mapbox.py b/sunnypilot/navd/navigation_helpers/tests/test_mapbox.py index 2c025bd407..1e477604ad 100644 --- a/sunnypilot/navd/navigation_helpers/tests/test_mapbox.py +++ b/sunnypilot/navd/navigation_helpers/tests/test_mapbox.py @@ -61,7 +61,7 @@ class TestMapbox: if self.route['steps']: turn_lat = self.route['steps'][1]['location'].latitude turn_lon = self.route['steps'][1]['location'].longitude - close_lat = turn_lat - 0.0008 # 80 ish meters before the turn + close_lat = turn_lat - 0.00025 # slightly before the turn if self.progress and self.progress.get('next_turn'): expected_turn = self.progress['next_turn']['modifier'] upcoming_close = self.nav.get_upcoming_turn_from_progress(self.progress, close_lat, turn_lon)