From 487b4ae61a51e12d12556e24c7c358d72af7b1ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Tue, 24 Oct 2017 14:06:51 -0200 Subject: [PATCH] PlanToolBar: Make heading and azimuth to range 0-359 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- src/PlanView/PlanToolBar.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PlanView/PlanToolBar.qml b/src/PlanView/PlanToolBar.qml index 2c6402088..c37b38257 100644 --- a/src/PlanView/PlanToolBar.qml +++ b/src/PlanView/PlanToolBar.qml @@ -64,8 +64,8 @@ Rectangle { property string _distanceText: isNaN(_distance) ? "-.-" : QGroundControl.metersToAppSettingsDistanceUnits(_distance).toFixed(1) + " " + QGroundControl.appSettingsDistanceUnitsString property string _altDifferenceText: isNaN(_altDifference) ? "-.-" : QGroundControl.metersToAppSettingsDistanceUnits(_altDifference).toFixed(1) + " " + QGroundControl.appSettingsDistanceUnitsString property string _gradientText: isNaN(_gradient) ? "-.-" : _gradientPercent.toFixed(0) + " %" - property string _azimuthText: isNaN(_azimuth) ? "-.-" : Math.round(_azimuth) - property string _headingText: isNaN(_azimuth) ? "-.-" : Math.round(_heading) + property string _azimuthText: isNaN(_azimuth) ? "-.-" : Math.round(_azimuth) % 360 + property string _headingText: isNaN(_azimuth) ? "-.-" : Math.round(_heading) % 360 property string _missionDistanceText: isNaN(_missionDistance) ? "-.-" : QGroundControl.metersToAppSettingsDistanceUnits(_missionDistance).toFixed(0) + " " + QGroundControl.appSettingsDistanceUnitsString property string _missionMaxTelemetryText: isNaN(_missionMaxTelemetry) ? "-.-" : QGroundControl.metersToAppSettingsDistanceUnits(_missionMaxTelemetry).toFixed(0) + " " + QGroundControl.appSettingsDistanceUnitsString property string _batteryChangePointText: _batteryChangePoint < 0 ? "N/A" : _batteryChangePoint -- 2.22.0