From 0ce307c55c8da783ad04af03b9844026bdf2113d Mon Sep 17 00:00:00 2001 From: muramura Date: Tue, 24 Sep 2024 20:43:37 +0900 Subject: [PATCH] AP_GPS: Suppress unnecessary telemetry transmission --- libraries/AP_GPS/AP_GPS.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/AP_GPS/AP_GPS.cpp b/libraries/AP_GPS/AP_GPS.cpp index 070276dd45c9f..a4ee179638995 100644 --- a/libraries/AP_GPS/AP_GPS.cpp +++ b/libraries/AP_GPS/AP_GPS.cpp @@ -1369,6 +1369,10 @@ uint16_t AP_GPS::gps_yaw_cdeg(uint8_t instance) const void AP_GPS::send_mavlink_gps_raw(mavlink_channel_t chan) { + if (params[0].type == GPS_TYPE_NONE) { // If none, do not send telemetry. + return; + } + const Location &loc = location(0); float hacc = 0.0f; float vacc = 0.0f;