Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasBaecker committed Sep 10, 2024
1 parent 205d0fc commit db896e7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion field_friend/automations/navigation/navigation.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import rosys
from nicegui import ui

from ... import localization
from ..implements import Implement

if TYPE_CHECKING:
Expand Down
2 changes: 1 addition & 1 deletion field_friend/localization/gnss.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def reference_warning_dialog(self) -> None:
ui.button('Cancel', on_click=self.reference_alert_dialog.close)

def check_distance_to_reference(self) -> bool:
if self.current.location.distance(localization.reference) > 2000.0:
if self.current is not None and self.current.location.distance(localization.reference) > 2000.0:
self.reference_alert_dialog.open()
return True
return False

0 comments on commit db896e7

Please sign in to comment.