Skip to content

Commit

Permalink
f15 wip: disable flashlight
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalzauberzeug committed Sep 6, 2024
1 parent 74e7909 commit 4adc702
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions field_friend/automations/implements/weeding_implement.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ async def finish(self) -> None:
await super().finish()

async def activate(self):
await self.system.field_friend.flashlight.turn_on()
# await self.system.field_friend.flashlight.turn_on()
await self.puncher.clear_view()
await rosys.sleep(3)
self.system.plant_locator.resume()
Expand All @@ -79,7 +79,7 @@ async def activate(self):
async def deactivate(self):
await super().deactivate()
self.system.timelapse_recorder.camera = None
await self.system.field_friend.flashlight.turn_off()
# await self.system.field_friend.flashlight.turn_off()
self.system.plant_locator.pause()
self.kpi_provider.increment_weeding_kpi('rows_weeded')

Expand Down Expand Up @@ -154,8 +154,8 @@ def _has_plants_to_handle(self) -> bool:
safe_weed_position = Point3d.from_point(Point3d.projection(weed_position).polar(
offset, Point3d.projection(crop_position).direction(weed_position)))
upcoming_weed_positions[weed] = safe_weed_position
self.log.info(f'Moved weed {weed} from {weed_position} to {safe_weed_position} ' +
f'by {offset} to safe {crop} at {crop_position}')
# self.log.info(f'Moved weed {weed} from {weed_position} to {safe_weed_position} ' +
# f'by {offset} to safe {crop} at {crop_position}')

# Sort the upcoming positions so nearest comes first
sorted_weeds = dict(sorted(upcoming_weed_positions.items(), key=lambda item: item[1].x))
Expand Down

0 comments on commit 4adc702

Please sign in to comment.