Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: recovery turn #3517

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions scripts/ai/turns/AITurn.lua
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ end
function AITurn:onBlocked()
-- unregister here before the AITurn object is destructed
self.proximityController:unregisterBlockingObjectListener()
-- restore onWaypoint* listeners before giving back control to the drive strategy, otherwise they'll be lost
-- when the recovery turn is instantiated and registers its own listeners
self.ppc:restorePreviouslyRegisteredListeners()
self.driveStrategy:startRecoveryTurn(1 * self.turningRadius)
end

Expand Down
2 changes: 1 addition & 1 deletion scripts/field/FieldScanner.lua
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ function FieldScanner:findContour(x, z)
else
if not done and not lost then
self:debug('%d. try, edge not found, we may have hit an island or corner, reset/rotate the probe a bit and retry', i)
setRotation(probe, 0, i * math.pi / 7, 0)
setRotation(probe, 0, i * math.pi / 6, 0)
elseif lost then
self:info('Could not trace field edge, limit search to field %d and retry', fieldId)
limitToFieldId = fieldId
Expand Down
Loading