Skip to content

VT Config page: checkboxes for the new section-control settings #135

Open

Description

@gunicsba

Problem

Several new section-control options can only be set in settings.json. On the tractor, the operator has to quit the TC, edit the file and restart it, which isn't practical in the field. The VT Config page already handles on/off settings (NMEA send, TECU enabled), so these options should be added there.

Settings to add

Setting From Default When a change takes effect
sectionControlOnConnect #102 on next implement connect
allSectionsFollowFirst #130 off immediately (read on every PGN 229 demand)
groupOverlappingSections #131 off immediately, once the AOG section map is recalculated for connected clients (update_aog_section_map); AOG then gets a new section count in 0xF0
sectionMismatchAlert #134 on immediately

How

Follow the pattern already in use for ConfigNmeaSend / ConfigTecuEnabled in src/app.cpp:

  • an InputBoolean in resources/AOG_TC.iop, with its ID in AOG_TC.iop.h;
  • a tracked numeric value in vtUpdateHelper;
  • a case in the change-numeric-value listener that calls the settings setter, sends the stored value back if saving fails, and logs Saved configuration object …;
  • the initial value sent on VT connect, next to the existing send_change_numeric_value calls.

groupOverlappingSections also needs a live hook into MyTCServer (set_group_overlapping_sections, which then recalculates the map for every connected client). Today it is only set once, after initialize().

Layout

The Config page (DataMask_Config, 1001) has the four existing fields (Hydlift aux-N, NMEA read, NMEA send, TECU) and a hint. The four new rows should fit on the same page if the existing objects are rearranged, e.g. tighter row spacing or a shorter hint. Fall back to a second "Section control" page only if they don't fit on the 480 px mask. Check the result with iop_validator and on a real VT. Remember to clear the VT's cached pool: the hash changes anyway.

Timing

Do this as one PR after #102, #130, #131 and #134 are merged. The settings live on different branches, and the .iop is a binary file that can't be merged when branches conflict.

Acceptance

  • All four settings can be toggled on the VT Config page and persist across restarts.
  • The VT shows the stored value on connect and after a failed save.
  • Toggling groupOverlappingSections with the Artemis connected changes AOG's section count without reconnecting the implement.
  • The readme notes that the settings can also be changed from the VT.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions