Send Implement Hardware messages towards AgOpenGPS - #71
Open
sujandumaru wants to merge 2 commits into
Open
Conversation
…40/247) they are compared against
…N 221 hardware messages
Collaborator
Author
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.


Describe your changes
Sends the states which #42 lists to AgOpenGPS on PGN
0xDD(221), so they reach the operator screen and not only the console log. Newsend_hardware_message()onApplicationgoes out through the existingUdpConnections::send(), so there is no new socket and no new thread.Implement: <name> (<n> sections, <w> m)andImplement lost: <name>. The update loop diffs the client list once per second against a snapshot from the previous pass. I keep the snapshot because on disconnect the client is already gone, so the name and the section count have to come from somewhere.TC address conflict: preferred address in useandTC address conflict resolved, from the 15 s check which so far only wrote a console warning.TECU failed to claim address 240, deferred into the update loop because the address claim happens before UDP is up.AOGDissector.luadecodes0xDD, anddocs/PROTOCOL.mdgets the wire format and a table of every message.Two things surprised me and both are in the doc now.
durationis not seconds, AOG storesduration * 10and decrements it once per render tick, so a condition which persists has to be re-sent. And AOG drops these frames unless Config -> Data -> Hardware Messages is on, which is off by default. That one cost me some time, the wire looked correct and nothing appeared.The second commit is not part of the issue. The TECU log strings said address 128 and the doc said 128 and 233, but
create_internal_control_function()has always been called with thepreferred_addresses::IndustryGroup2enums, 240 and 247. Only the printed numbers were wrong. They interpolate the enum now so they can not drift again. It is separate so you can take or drop it on its own.How has this been tested?
On
vcan0with the AgIsoStackSeederExample. I checked the frame in Wireshark with the updated dissector and confirmed the discovery message fires once and does not repeat. Loss, conflict and TECU are reviewed but not driven on a rig yet.