Home        Store        Learn        Blog

Print variable to QGC

Hi!

I have made a custom mode containing a state machine. During debugging, it would be highly advantageous to display the state to QGC. Is there an easy way of doing this. When simulating in SITL, I can use hal.console->printf() function, and I want something similar when simulating the ROV in real life.

In QGC there is something called MAVLink Console. Is it possible to use that?

I could add a MAVLink message, but since I would most likely need to print several variables, this can be a bit cumbersome.

Sverre

Hi Sverre, sounds like an interesting project :slight_smile:

QGC should pick up on any mavlink message you send (to the right place), so you shouldn’t need to add a new message type. I’ve previously used the statustext message as per @williangalvani’s comment here, which is likely as close as you can get to a print statement.

1 Like

The statustext message works great! Thanks! :slight_smile:

2 Likes

Glad to hear it :slight_smile:
Much easier to debug when you actually have some feedback from the system you’re working with :slight_smile: