-
Notifications
You must be signed in to change notification settings - Fork 17.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AP_ADSB: uAvionix Transponder Updates #28419
AP_ADSB: uAvionix Transponder Updates #28419
Conversation
@magicrub Your help is appreciated! |
@nicholas-inocencio I haven't looked through all the changes quite yet but a quick glance shows me that the whitespace needs some tweaking to follow our code style guide. Also, the commits need to get squashed. I suggest 2 commits: anything in your API AP_ADSB/GDL90_protocol/ (and maybe code in the driver that is specific to those API/struct changes) and then everything else in AP_ADSB. |
(Apologies, I accidentally closed the PR.) Thanks Tom, I'll take a good look at the style guide and commit guidelines. |
@magicrub The entirety of GDL90_Message_Structs.h (and hostGDL90Support.h) are using 2-space indents instead of 4 as the style guide prescribes. Should I correct this in this PR, or only fix the lines I changed? EDIT: I fixed all the style changes in a separate commit. |
e30cd7f
to
4171c94
Compare
for your own SDK type stuff we don't care about the style, just the stuff in the ArduPilot libraries that others would be looking at and/or potentially editing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this effect older Ping200X units that aren't using v3?
// We want to use the defaults stored on the ping200X, if possible. | ||
// Until we get the config message (or we've tried requesting it several times), | ||
// don't send the control message. | ||
if (run_state.last_packet_Transponder_Config_ms != 0 || run_state.request_Transponder_Config_tries >= 5) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will always be true. the _ms != 0
is always non-zero because you set it above so there's no change from previous behavior
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is checking _Config
, not _Control
; _Config
is only updated by handle_msg
case GDL90_ID_TRANSPONDER_CONFIG
.
const uint32_t now_ms = AP_HAL::millis(); | ||
run_state.last_gcs_send_message_Transponder_Status_ms = now_ms; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const uint32_t now_ms = AP_HAL::millis(); | |
run_state.last_gcs_send_message_Transponder_Status_ms = now_ms; | |
run_state.last_gcs_send_message_Transponder_Status_ms = AP_HAL::millis(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to cache the time, thats fine.. but do it above the millis() check a couple lines up so both take advantage of it
Using a tool available online, older ping200X units can be field configured to send v3. Even if it only got v1, ArduPilot would work fine. The important thing is that handle_msg uses different structs ( |
AP_ADSB: uAvionix Transponder Status V3 + Current version of ping200X sends the v1 status message periodically and the v3 status message in response to the transponder control message, so ardupilot needs to handle both gracefully; version 1 and version 3 are very different in structure and naively assuming one version over another will cause errors. AP_ADSB: Process additional xpdr status v3 fields AP_ADSB: Send GCS xpdr status at least every 10s AP_ADSB: Send ping200X estimated HPL + When AP sends the ping200X the GPS data GDL90 message, it needs to provide a valid HPL for the ping200X to report a valid NIC. AP_ADSB: Don't send unsolicited transponder status AP_ADSB: Better initialization of xpdr id/config AP_ADSB: Better initialization of frontend status AP_ADSB: Suggestions from review
4171c94
to
06faa20
Compare
@nicholas-inocencio I just did a bench test and it's looking good. I backported it to my 4.5 branch and it was a clean cherry-pick. In my particular test I didn't have GPS lock so I couldn't reliably transmit but I that's just my setup. Your code seems to be operating OK so far. I'll test again with a proper setup on Friday and if that goes well we can merge it |
Fully tested and merged, thanks @nicholas-inocencio ! |
Replaces #28411, which targeted the wrong branch.
This PR contains updates to the interface with the ping200X. Co-requisite with the MissionPlanner PR ArduPilot/MissionPlanner#3429
Changes:
UAVIONIX_ADSB_OUT_STATUS_FAULT_STATUS_MESSAGE_UNAVAIL
is now1
if the GDL90 ownship, transponder status, and heartbeat have been missed for 10 seconds, and is otherwise0
when one of those messages is received. See the co-requisite MissionPlanner PR for changes to how the GCS handles that field.ADSB_OPTIONS=1
, which forwarded the AP's GPS data to the transponder, would result in a NIC ofUNKNOWN
due to an invalid HPL