Skip to content

Commit 782d02c

Browse files
authored
Merge pull request #927 from Courseplay/fixes-before-modhub
Fixes before modhub
2 parents 773c3b8 + 6b18323 commit 782d02c

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

scripts/Course.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1586,7 +1586,7 @@ function Course.createFromXml(vehicle, courseXml, courseKey)
15861586
course.nVehicles = courseXml:getValue(courseKey .. '#nVehicles', 1)
15871587
course.headlandClockwise = courseXml:getValue(courseKey .. '#headlandClockwise')
15881588
course.islandHeadlandClockwise = courseXml:getValue(courseKey .. '#islandHeadlandClockwise')
1589-
course.editedByCourseEditor = courseXml:getValue(courseKey .. '#compacted', false)
1589+
course.editedByCourseEditor = courseXml:getValue(courseKey .. '#wasEdited', false)
15901590
course.compacted = courseXml:getValue(courseKey .. '#compacted', false)
15911591
if course.nVehicles == 1 then
15921592
-- for multi-vehicle courses, we load the multi-vehicle data and restore the current course

scripts/ai/strategies/AIDriveStrategyCombineCourse.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2210,8 +2210,9 @@ function AIDriveStrategyCombineCourse:startFieldBoundaryDetection()
22102210
-- in some rare cases, for instance when using field margin, the start waypoint may be outside
22112211
-- of the field, and thus the detection won't work.
22122212
local x, _, z = self.fieldWorkCourse:getWaypointPosition(self.fieldWorkCourse:getCurrentWaypointIx())
2213-
-- no callback, waitForFieldBoundary() will take care of the result
2214-
self.vehicle:cpDetectFieldBoundary(x, z)
2213+
self.vehicle:cpDetectFieldBoundary(x, z, self, function(self)
2214+
self:clearInfoText(InfoTextManager.WAITING_FOR_FIELD_BOUNDARY_DETECTION)
2215+
end)
22152216
else
22162217
self:debug("Field boundary detection already running.")
22172218
end

0 commit comments

Comments
 (0)