Skip to content

Log AOG's section demand and warn when an implement works without it - #108

Open
gunicsba wants to merge 1 commit into
developfrom
feature/section-demand-diagnostics
Open

gunicsba wants to merge 1 commit into
developfrom
feature/section-demand-diagnostics

Conversation

@gunicsba

Copy link
Copy Markdown
Contributor

Summary

In a field log from 2026-10-13, a spreader in automatic spread full width for 47 minutes without receiving a setpoint. The log couldn't tell whether AOG sent all-off section states or none at all, because PGN 229 was never logged. This adds the missing diagnostics, plus a live warning for the operator.

Changes

  • Demand log: AOG's section demand (PGN 229) is logged when it changes, as on-ranges, at most every 200 ms. Changes in between are counted:

    [AOG] Section demand (PGN 229): 4 on: 3-6 (2 intermediate changes not logged)
    
  • Presence: the TC logs when PGN 229 starts and stops arriving. AOG only sends it while a field is open, so this marks field open/close in the TC log.

  • Warning: when an implement is in automatic with sections on, but AOG has asked for no section for 10 s, the TC logs a warning and shows it in AOG as a hardware message. The text depends on the cause:

    • PGN 229 arriving but all off: "Implement working but AOG sections are off: turn on AOG's section Auto". AOG turns its own Auto button off on every field open/close, which is the field case.
    • no PGN 229: "Implement working but no field is open in AOG".

    It logs again once the sections follow AOG.

Notes

  • With the section setpoint PR the TC commands an implement off in this situation, so the warning then mostly catches implements that ignore setpoints, such as an operator override on the implement terminal.
  • Field open/close by name (PGN 0xF3) is handled in Announce guidance track data (DDI 507-511, 513) to implements #84, so it isn't duplicated here.
  • Conflicts with the TC restart recovery PR in include/app.hpp and src/app.cpp; both sides only add code. The resolution is in test/szello-debug.

Testing

  • Release build passes on Windows (MSVC). The range formatting was checked separately against a few patterns.
  • Not yet run with AOG. A debug build is going to the field machine.

🤖 Generated with Claude Code

When a spreader in automatic ran full width without receiving any section
setpoint, the log could not tell whether AOG sent all-off section states
or none at all, because PGN 229 was never logged.

- Log AOG's section demand (PGN 229) when it changes, as on-ranges
  ("4 on: 3-6"), at most every 200 ms, counting changes in between.
- Log when PGN 229 starts and stops arriving; AOG sends it only while a
  field is open.
- When an implement is in automatic with sections on, but AOG has asked
  for no section for 10 s, log a warning and show it in AOG: either AOG's
  section Auto button is off (AOG turns it off on every field open/close)
  or no field is open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant