How to print information to MAVProxy (on Windows) from the PX4?

285 views
Skip to first unread message

Sj

unread,
Sep 15, 2015, 5:14:15 PM9/15/15
to drones-discuss
Hello,

I am working with the ardupilot/arducopter open source project. I am trying to read information from the different PX4 channels and have them print out somewhere like on the MAVProxy console (not save it as a log). Earlier I tried to read that information from the UART using a BEaglebone but everything that I tried didn't work (and no forum helped me out at the moment)

So now I am looking into MAVProxy. I am trying to print directly to the hal.console, but I don't think it's as simple as that. I came across http://dev.ardupilot.com/wiki/code-overview-adding-a-new-mavlink-message/ but that is only Linux based and says the code won't do for Windows. 

Has anyone tried something like this using MAVProxy? Could you point me towards appropriate resources or help me figure this one out?

Andrew Tridgell

unread,
Sep 16, 2015, 3:46:51 AM9/16/15
to Sj, drones-discuss
Hi Sj,

> So now I am looking into MAVProxy. I am trying to print directly to the
> hal.console

things printed to hal.console will get displayed as "noise" as they
won't be MAVLink packets. If MAVProxy is setup with shownoise=1 (try
"set" to see all settings) then it will show it.

It is probably better to use a MAVLink STATUSTEST message. If you are
using master the easiest way is to use
GCS_MAVLINK::send_statustext_all() which sends a STATUSTEXT to all
connected ground stations.

See this for an example:

https://github.com/diydrones/ardupilot/blob/master/libraries/AP_Arming/AP_Arming.cpp#L99

you can use printf style formatting in that function.

Cheers, Tridge

Sj

unread,
Sep 18, 2015, 12:29:59 PM9/18/15
to drones-discuss
Hi ANdrew,

Thank you for the reply! I will test that out soon. I have currently stopped working with the MAVProxy but I will still try to try your suggestion and update soon. Thanks again!
Reply all
Reply to author
Forward
0 new messages