Skip to content

Commit

Permalink
fixing field_creator
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasBaecker committed Nov 25, 2024
1 parent 4589897 commit 171474f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions field_friend/interface/components/field_creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def field_infos(self) -> None:
assert self.first_row_end is not None
self.view_column.clear()
with self.view_column:
self.map = self.ab_line_map()
self.ab_line_map()
self.headline.text = 'Field Parameters'
self.row_sight.content = ''
self.content.clear()
Expand Down Expand Up @@ -230,10 +230,12 @@ def update_back_cam(self) -> None:
self.row_sight.set_source(self.back_cam.get_latest_image_url())

def ab_line_map(self) -> None:
self.m = ui.leaflet(self.system, False).classes('w-full min-h-[500px]')
self.m.generic_layer(name='polyline', args=[
(self.first_row_start.tuple, self.first_row_end.tuple), {'color': '#F44336'}])
self.m.set_center(self.gnss.current.location.tuple)
if self.gnss.current is None:
return
self.m = ui.leaflet(self.gnss.current.location.tuple).classes('w-full min-h-[500px]')
if self.first_row_start is not None and self.first_row_end is not None:
self.m.generic_layer(name='polyline', args=[
(self.first_row_start.tuple, self.first_row_end.tuple), {'color': '#F44336'}])
self.m.set_zoom(18)

def update_robot_position(self, position: GeoPoint, dialog=None) -> None:
Expand Down

0 comments on commit 171474f

Please sign in to comment.