I’m currently trying to send an ultrasonic thickness gauge sensor reading as a Mavlink message through the companion computer up to the ground station (running QGC). The sensor outputs serial data which I’m parsing with Python into a float value with optional metadata, but I’m struggling to find where the companion computer sends its Mavlink messages from.
I’m imagining there’s some kind of event loop or similar that checks the existing sensors and reports their status to the ground station, but I haven’t been able to find that, and am thinking perhaps the companion computer just relays mavlink messages from the pixhawk without actually processing them or the sensor readings.
Is it possible for me to have a script sending mavlink messages without interfering with the existing setup, or is there an event loop I can add a sensor-reading thread to?
Also, I’m hoping that I’ll be able to just send a float message with the name of my sensor, and that QGC will pick that up and display it automatically. If that’s not the case, is there some convenient way to register an extra sensor in QGC?