summaryrefslogtreecommitdiff
path: root/hil-gps-id-yaw-compat.patch
blob: dc49eecc182ad3bcd742e56d12b62fdeb7d8f3ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--- a/mavros_extras/src/plugins/hil.cpp	2026-10-12 10:25:09.627053991 +0000
+++ b/mavros_extras/src/plugins/hil.cpp	2026-10-12 10:25:09.636054018 +0000
@@ -240,8 +240,12 @@
     gps.vd = req->vd;
     gps.cog = req->cog;
     gps.satellites_visible = req->satellites_visible;
-    gps.id = req->id;
-    gps.yaw = req->yaw;
+    // id and yaw fields were added to HilGPS.msg in mavros 2.16.0;
+    // the ROS SIG repo ships mavros_msgs 2.14.0 which lacks these fields.
+    // Leave gps.id/gps.yaw at default (0) - HIL_GPS still sent, just
+    // without optional id/yaw from the ROS message.
+    // gps.id = req->id;
+    // gps.yaw = req->yaw;
     // [[[end]]] (sum: 7jKMh3Vikx)
 
     uas->send_message(gps);