Skip to content

TC: fix working width discovery#618

Open
gunicsba wants to merge 21 commits into
Open-Agriculture:mainfrom
gunicsba:tc-fix-working-width
Open

TC: fix working width discovery#618
gunicsba wants to merge 21 commits into
Open-Agriculture:mainfrom
gunicsba:tc-fix-working-width

Conversation

@gunicsba

Copy link
Copy Markdown
Contributor

I noticed that the Müller Elektronik sprayer working widths weren't correct.

Now it has fallbacks according to: https://www.isobus.net/isobus/attachments/345/ISO11783-11-DDI-290-SetpointWorkState-v1.pdf

Each Section Device Element shall at least provide one type of Working Width. If
more than one type of Working Width is provided, then the Section Controller shall be
capable to use the different Working Width types with the following priority:

  1. Actual Working Width (DDI 67)
  2. Maximum Working Width (DDI 70)
  3. Default Working Width (DDI 68)

GwnDaan and others added 7 commits March 15, 2025 21:36
Also adds extra measurement commands logging and clarifies some documentation
According to: https://www.isobus.net/isobus/attachments/345/ISO11783-11-DDI-290-SetpointWorkState-v1.pdf

Each Section Device Element shall at least provide one type of Working Width. If
more than one type of Working Width is provided, then the Section Controller shall be
capable to use the different Working Width types with the following priority:
1. Actual Working Width (DDI 67)
2. Maximum Working Width (DDI 70)
3. Default Working Width (DDI 68)
Comment thread isobus/src/isobus_device_descriptor_object_pool_helpers.cpp Outdated
@gunicsba

Copy link
Copy Markdown
Contributor Author

@GwnDaan I made the changes but not sure why the Build started to fail. It doesn't make sense. previous build only had clang-format error...

gunicsba added 4 commits April 3, 2026 20:43
…ssDDOP stated

dopLocalizationLabel is a std::array<std::uint8_t, 7>, so .empty() always returns false. This prevented process_labels_from_ddop() from ever being called for user-provided binary DDOPs, causing the state machine to proceed with uninitialized label data. Replaced with a comparison against a zero-initialized array to correctly detect the sentinel "not yet populated" state.
@gunicsba

gunicsba commented Apr 5, 2026

Copy link
Copy Markdown
Contributor Author

@ad3154 @martonmiklos something isn't right with our tests .. for me they seem to fail randomly...
and not just for this PR but for other PRs too.

@ad3154

ad3154 commented Apr 6, 2026

Copy link
Copy Markdown
Member

@ad3154 @martonmiklos something isn't right with our tests .. for me they seem to fail randomly... and not just for this PR but for other PRs too.

Yeah, it's the timing related stuff... the tests do actual thread delays and read actual system time everywhere, which is prone to unpredictability. Ideally we just need to add an abstraction to our timing interface to allow overriding it from a test environment. Adding this abstraction would also greatly speed up the tests....

@ad3154

ad3154 commented Apr 7, 2026

Copy link
Copy Markdown
Member

@ad3154 @martonmiklos something isn't right with our tests .. for me they seem to fail randomly... and not just for this PR but for other PRs too.

I have opened a PR that should finally completely fix the random test failures. It was not fun, but it needed to happen, haha.

#682

@gunicsba gunicsba requested a review from GwnDaan May 25, 2026 16:45
gunicsba added 3 commits May 31, 2026 20:36
Add width priority logic (Actual > Maximum > Default) to SubBoom class
to match Section class implementation. Previously, SubBoom only parsed
ActualWorkingWidth and ignored MaximumWorkingWidth and DefaultWorkingWidth.

Changes:
- Add actualWorkingWidth_mm, maximumWorkingWidth_mm, and
  defaultWorkingWidth_mm fields to SubBoom class
- Implement SubBoom::get_width_with_priority() method
- Update parse_sub_boom() to parse all three width DDIs
- Add comprehensive unit tests for width priority with DeviceProperty
  and DeviceProcessData objects
- Apply clang-format to all modified files

This ensures consistent width discovery behavior across all element
levels (Section, SubBoom, Boom) as per ISO 11783-10 specification.
@gunicsba

Copy link
Copy Markdown
Contributor Author

Added a few more tests and implemented the same for the booms.

@gunicsba gunicsba changed the title Tc fix working width TC: fix working width discovery Jun 1, 2026
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.

4 participants