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

Issue 480 #1465

Merged
merged 9 commits into from
Apr 30, 2022
Merged

Issue 480 #1465

merged 9 commits into from
Apr 30, 2022

Conversation

pvaiko
Copy link
Contributor

@pvaiko pvaiko commented Apr 24, 2022

Work/width offset fix

Auto work width/offset calculation reworked. Now using the left and right distances over all implements (instead of just the width) and calculate final working width/offset from that.

Configured width/offset always takes precedence over automatically detected values.

@pvaiko pvaiko self-assigned this Apr 24, 2022
@@ -174,11 +164,6 @@ function CpCourseGeneratorSettings:raiseCallback(callbackStr, setting, ...)
SpecializationUtil.raiseEvent(self, callbackStr, setting, ...)
end

function CpCourseGeneratorSettings:setAutomaticWorkWidth()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function was also use for the hud setting: <Setting classType="AIParameterSettingList" name="workWidth" min="1" max="50" incremental="0.1" unit="2" setDefault="setAutomaticWorkWidth" onChangeCallback="cpShowWorkWidth"/>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be a good idea to move these code parts into this function and use that for automatic work width:
local spec = self.spec_cpCourseGeneratorSettings local width, offset = WorkWidthUtil.getAutomaticWorkWidthAndOffset(self) spec.workWidth:setFloatValue(width)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still on TODO, or can it be merged like it is ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was the fix for clicking width/offset in the HUD, should now be working fine.

Get the left/right distances of work areas or AI markers for
each implement (instead of just the width) and use those to
determine the total working width.

Also, do the unfold/fold trick before getting the width so if
work areas and markers fold with the implement are in their
working position when we measure the distances.

This commit has only the width fix, offset comes next.
This should now correctly detect the offset, except
for combines where the chaff swath is wider than the
header. Will fix that in the next commit.
Ridge marker and combine swath are ignored in all
width/offset calculations.
Now also when clicking on the offset.
- don't recalculate width/offset when starting, no need
for it anymore, and it seems to interfere with unfold,
preventing some implements from unfolding.
- soil sampler, variable working width fixed
- use configured offset when there's no width (for some vine tools)
Soil sampler working width fixed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG_SP] Falsche Arbeitsbreitenerkennung und fehlender Versatz bei Balkenmäher
3 participants