Skip to content

Custom Widget & Mavlink #609

@AlexNester-QuadX

Description

@AlexNester-QuadX

I am creating a custom widget that will use data from mavlink.
So facing some problems:

  1. How connect to QopenHD using pymavlink via udp? (Pymavlink on companion computer)

I was try : (https://mavlink.io/en/mavgen_python/)

from pymavlink import mavutil

#Start a connection listening on a UDP port_
the_connection = mavutil.mavlink_connection('udpin:localhost:14550') 

#Wait for the first heartbeat_ 
#his sets the system and component ID of remote system for the link_
the_connection.wait_heartbeat()

was trying addresses but nothing
('udpout:0.0.0.0:14550') and ('udpin:0.0.0.0:14550')
('udpout:192.168.2.1:5760') and ('udpin:192.168.2.1:5760')

and this tutorial not helped me https://www.ardusub.com/developers/pymavlink.html

  1. How it possible send own messages? I noticed that all widgets use a class _fcMavlinkSystem

it will be great add to Class 2 objects for example

L_RO_PROP(int,detect_x,set_detect_x,0)
L_RO_PROP(int,detect_y,set_detect_y,0)

изображение

and then use in my widget

изображение

But hove I can send this from companion computer whith Pymavlink or dronekit?

May be better way use Define MAVLink Messages & Enums ? (https://mavlink.io/en/guide/define_xml_element.html)

please nudge me in the right direction

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions