From 8ce340a57394fca8ab211c53e9357f0d31581bbf Mon Sep 17 00:00:00 2001 From: nicoboy Date: Sun, 21 Jun 2026 16:49:19 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20heartbeat=20GCS=20initial=20pour=20enreg?= =?UTF-8?q?istrer=20l'adresse=20pymavlink=20aupr=C3=A8s=20de=20mavp2p?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit En udpout, mavp2p (udps) ignore le client tant qu'aucun paquet n'a été émis depuis lui. L'envoi d'un heartbeat GCS dès la connexion force mavp2p à mémoriser l'adresse de retour et à relayer le flux H743 vers pymavlink. Co-Authored-By: Claude Sonnet 4.6 --- wireclaw_core.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wireclaw_core.py b/wireclaw_core.py index cc3237f..6f60952 100644 --- a/wireclaw_core.py +++ b/wireclaw_core.py @@ -42,6 +42,13 @@ def init_pymavlink(): global mav print("Connexion pymavlink sur 14552...") mav = mavutil.mavlink_connection(MAVLINK_PYMAV) + # Envoie un heartbeat pour signaler l'adresse de retour à mavp2p (udps ne connaît pas le client tant qu'il n'a pas émis) + mav.mav.heartbeat_send( + mavutil.mavlink.MAV_TYPE_GCS, + mavutil.mavlink.MAV_AUTOPILOT_INVALID, + 0, 0, 0 + ) + print("Heartbeat GCS envoyé à mavp2p (enregistrement adresse retour)") mav.wait_heartbeat() print("pymavlink connecte !")