From af98f5def702053f0ed9927cd84a34d28772c51a Mon Sep 17 00:00:00 2001 From: davidsastresas Date: Tue, 19 Mar 2024 02:54:56 +0100 Subject: [PATCH] Vehicle: add roiCoordChanged signal: this allows for ROI commanded elsewhere than clicking on map ( like gimbal panel point home action ) to show the ROI indicator on map --- src/Vehicle/Vehicle.cc | 2 ++ src/Vehicle/Vehicle.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/Vehicle/Vehicle.cc b/src/Vehicle/Vehicle.cc index a7e0b673f6ae..6e9dca3e7fd9 100644 --- a/src/Vehicle/Vehicle.cc +++ b/src/Vehicle/Vehicle.cc @@ -2887,6 +2887,8 @@ void Vehicle::guidedModeROI(const QGeoCoordinate& centerCoord) static_cast(centerCoord.longitude()), static_cast(centerCoord.altitude())); } + // This is picked by qml to display coordinate over map + emit roiCoordChanged(centerCoord); } void Vehicle::stopGuidedModeROI() diff --git a/src/Vehicle/Vehicle.h b/src/Vehicle/Vehicle.h index 681495d8accd..72e0528f1e5c 100644 --- a/src/Vehicle/Vehicle.h +++ b/src/Vehicle/Vehicle.h @@ -1012,6 +1012,7 @@ public slots: void mavlinkStatusChanged (); void isROIEnabledChanged (); + void roiCoordChanged (const QGeoCoordinate& centerCoord); void initialConnectComplete (); void sensorsParametersResetAck (bool success);