-
-
Notifications
You must be signed in to change notification settings - Fork 504
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
Added transponder plugin #1390
Added transponder plugin #1390
Conversation
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.
Good start! Do you have a way to test that the conversions are correct? Like do you have a mavlink component that emits ADS-B messages?
src/plugins/transponder/include/plugins/transponder/transponder.h
Outdated
Show resolved
Hide resolved
One more thing: you need to fix the style, we have a script for that: |
Co-authored-by: Jonas Vautherin <jonas.vautherin@protonmail.ch>
Co-authored-by: Jonas Vautherin <jonas.vautherin@protonmail.ch>
Co-authored-by: Jonas Vautherin <jonas.vautherin@protonmail.ch>
Co-authored-by: Jonas Vautherin <jonas.vautherin@protonmail.ch>
I thought I had already run the style script. I'll make sure to run it. I have an ADSB module ordered and it suppose to be delivered today. |
Style should be correct now. |
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.
Somehow all the conversions got lost in the process (i.e. all my suggestions). Did you revert them? 🤔
I uploaded the files with the style changes. Not sure if that removes comments? |
I think I know what happened. I'll go through and reimplement your recommendations tomorrow. |
Also you get some unrelated CI issues, please rebase once #1392 is merged and that should solve them 👍 |
@JonasVautherin: I've re-implemented your commits that were lost. |
Starting to look good! Should we now wait until you can actually test it, and then move forward to merge it? |
Sounds good to me. My expected receive date has gone to pending so most likely won't have the test results until sometime next week. Thanks for you help with this! |
_parent->unregister_statustext_handler(this); | ||
_parent->unregister_param_changed_handler(this); |
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.
Why are those needed? They are not registered in the init
, are they? 🤔
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.
Ahh yeah you're right. I'll remove them. I was using the telemetry_imp.cpp as a guide and might have gotten carried away with what I was bring over. I've received the sensor however my test code seems to have issues. My subscription that I create should output text at 1 Hz however I never get any output from the function.
Is there another tie in somewhere that I need to get mavsdk to register my subscription?
@JonasVautherin: If I register for the subscription updates in the test program for the transponder API should I expect to get the values reported even if the transponder if not communicating? I get no errors when I set the update rate and subscription but it does not appear that the callback is ever executed. |
When you subscribe, you will receive an update everytime the MAVLink message is sent. If your transponder does not send the MAVLink message, then nothing will happen. I'm expecting that the receiver is onboard the drone, receives ADS-B data and sends them as MAVLink messages on the sysid of the drone. Is that correct? |
The receiver is onboard and I configured according to the PX4 Air Traffic Setup. I'm assuming this would be the same configuration to be able to access the MAVLINK messages for the ADS-B. The only difference in hardware is I'm using the NXP-FMU with a PingRX versus the mRO Pixhawk mentioned in the page. |
@JonasVautherin : It does not appear that I have the ability to change the ADS-B module to use the drones sysid. Is there a way to have MAVSDK report messages of a certain type regardless of the sysid or do I need to find a way to grab the broadcast messages from the telemetry port that is communicating with offboard program? |
@DoppleGangster did you check if the firmware at runtime enters this loop: https://github.com/PX4/PX4-Autopilot/blob/master/src/modules/mavlink/streams/ADSB_VEHICLE.hpp#L69. Have you tried accessing the nsh shell (can be done through the MAVLink shell in QGC) and type |
@TSC21 thanks for the comment. I confirmed that the data was never published. I've corrected the setup and now I am getting data from the transponder over MAVSDK. @JonasVautherin and @TSC21 thank you both for your help with debugging this. |
The plugin seems to be fully operation from my testing. Assuming no more changes are requested should be ready to merge with the proto fork update I would think? |
@DoppleGangster for both being ready for merge, you need to first squash the commits. |
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.
Good to read that it works!
I merged the MAVSDK-Proto PR. @DoppleGangster now you need to update the proto submodule such that it points to main on mavsdk-proto, and fix the style in this PR. Then we can merge it 👍 🚀
Proto module update is in and style updated. Thanks again! |
Depends on mavlink/MAVSDK-Proto#222