mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-08-06 11:05:42 +08:00
Merge branch 'navigationd-init' into navigationd-service
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user