Repository navigation
Conversation
…ction 1 For implements that declare several sections that really are one, such as an RDS Artemis with three dispensers on one working width. With the setting on, every implement section follows AOG's section 1, and the heartbeat reports a single section to AOG (on while any implement section is on). Default off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reviewer's GuideData structuresAdd the default and stored setting that the rest of the system uses to determine whether all implement sections follow AOG section 1.
APIExpose methods for reading and changing the all-sections-follow-first setting.
ImplementationApply AOG section 1 to every implement section, report one combined section to AOG, and use only section 1 for demand checks.
ConfigurationLoad and save the new setting in settings.json, defaulting it to false when it is absent.
DocumentationDocument the setting, its intended use, and its behavior across connected implements.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 3 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="src/app.cpp" line_range="510-513" />
<code_context>
sectionDemand = sectionStates;
sectionDemandChangesSinceLog++;
}
+ if (settings->is_all_sections_follow_first())
+ {
+ // The implement's sections are really one: all follow AOG's section 1 (sectionDemand above stays as AOG sent it)
+ std::fill(sectionStates.begin(), sectionStates.end(), sectionStates.front());
+ }
tcServer->update_section_states(sectionStates);
</code_context>
<issue_to_address>
**Override affects every implement**
When more than one section-bearing implement is connected to the TC, the PGN handler replaces AOG's first section bit before `update_section_states`, which applies that state to every connected client; the heartbeat also reports one section for each client. A separate section-bearing implement is therefore controlled by section 1 too, and AOG receives multiple one-section statuses.
Scope the override to the intended implement, or explicitly combine the connected clients' section states and send one unambiguous heartbeat if the mode is intended to cover them all.
Also at `src/app.cpp:748-758`.
</issue_to_address>
### Comment 2
<location path="src/app.cpp" line_range="756" />
<code_context>
+ {
+ anyOn = anyOn || (state.get_section_actual_state(i) == SectionState::ON);
+ }
+ std::vector<uint8_t> oneSection = { state.is_section_control_enabled(), 1, static_cast<std::uint8_t>(anyOn ? 1 : 0) };
+ udpConnections->send(0x80, 0xF0, oneSection);
+ continue;
</code_context>
<issue_to_address>
**Heartbeat can report the wrong aggregate state**
When more than one sectioned implement client is connected and their actual states differ, `Application::update()` sends a separate one-section heartbeat for each sectioned client, with `anyOn` computed only from that client. With multiple implement clients, AOG receives conflicting reports instead of one report that is on whenever any implement section is on.
Aggregate the actual section states across clients and send one consolidated heartbeat per interval.
</issue_to_address>
### Comment 3
<location path="src/app.cpp" line_range="513" />
<code_context>
+ if (settings->is_all_sections_follow_first())
+ {
+ // The implement's sections are really one: all follow AOG's section 1 (sectionDemand above stays as AOG sent it)
+ std::fill(sectionStates.begin(), sectionStates.end(), sectionStates.front());
+ }
tcServer->update_section_states(sectionStates);
</code_context>
<issue_to_address>
**Sections beyond 64 ignore the override**
When an implement declares more than 64 sections, `sectionStates` contains only the 64 bits in PGN 229, so `update_section_states()` skips implement sections whose indices are 64 or greater. Those sections do not follow AOG section 1, contrary to the every-section claim.
In this mode, extend the replicated state vector to cover the largest active implement section count before updating the TC server.
</issue_to_address>
This was referenced Nov 11, 2026
…t, demand from bit 1 only PGN 229 has 64 bits, so sections 65-255 kept their old setpoint; the follow-first vector now covers every section a DDOP can declare. With several section-controlled implements the heartbeat sent one one-section report per implement. It now sends a single report: auto while any implement is in auto, on while any implement section is on. check_section_demand looked at AOG's bit for each implement section; in follow-first mode only AOG's section 1 is demand, so a stray bit can no longer hide the working-without-demand warning. Addresses Sourcery's review of #130. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gunicsba
added a commit
that referenced
this pull request
Nov 11, 2026
…o feature/per-boom-section-control Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Superseded by #131: groupOverlappingSections covers this, including implements with two halves. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
settings.jsonoption,allSectionsFollowFirst(defaultfalse). With it on, every implement section follows AOG's section 1, and the TC tells AOG the implement has one section.It's for implements that declare several sections which are really one. For example, an RDS Artemis seeder controller with three dispensers on one working width uploads three sections, while AOG should drive them as one.
It's a manual override for one machine at a time. The stacked PR builds automatic grouping from the section geometry on top of it, and keeps this option as a fallback for implements whose geometry can't be relied on.
Testing
🤖 Generated with Claude Code
Summary by Sourcery
Add an optional single-section override for implements whose declared sections represent one physical working width.
New Features:
allSectionsFollowFirstsetting to make all connected implement sections follow AOG section 1 and present as a single section.Enhancements:
Documentation: