Skip to content

Commit

Permalink
fix: never tested alignment failure case
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Vaiko committed Dec 15, 2024
1 parent 238b1d7 commit 2e3fae7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/ai/AIDriveStrategyFieldWorkCourse.lua
Original file line number Diff line number Diff line change
Expand Up @@ -580,8 +580,9 @@ function AIDriveStrategyFieldWorkCourse:startAlignmentTurn(fieldWorkCourse, star
self:startCourse(self.workStarter:getCourse(), 1)
else
self:debug('Could not create alignment course to first up/down row waypoint, continue without it')
self:startWaitingForLower()
self:lowerImplements()
self:startCourse(fieldWorkCourse, startIx)
self.state = self.states.INITIAL
self:prepareForFieldWork()
end
end

Expand Down
1 change: 1 addition & 0 deletions scripts/field/CpFieldUtil.lua
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ function CpFieldUtil.detectFieldBoundary(x, z, detect, useGiantsDetector)
local _, _, _, riceField = PlaceableRiceField.getRiceFieldAtPosition(x, y, z)
if riceField then
-- rice fields are somewhat special, so always use the Giants method
CpUtil.info('Rice field found')
return CpFieldUtil.getRiceFieldPolygon(riceField)
else
local valid, points = g_fieldScanner:findContour(x, z)
Expand Down

0 comments on commit 2e3fae7

Please sign in to comment.