Commit 82484b49 authored by Gus Grubba's avatar Gus Grubba

Merge branch 'Stable_V3.2' into cameraControl

* Stable_V3.2:
  Better handling a mission altitude default
  Change to fixed value is altitude when switching to Manual grid
  New coloring for child indicators
  Add new map indicator colors
  Correct hiding of heading on TAKEOFF command
  Home Position reset while in edit mode
parents 7c243a53 878d443c
......@@ -1372,7 +1372,7 @@ void MissionController::_initAllVisualItems(void)
_settingsItem->setIsCurrentItem(true);
}
if (!_editMode && _managerVehicle->homePosition().isValid()) {
if (_managerVehicle->homePosition().isValid()) {
_settingsItem->setCoordinate(_managerVehicle->homePosition());
}
......
......@@ -460,7 +460,7 @@ void SimpleMissionItem::_rebuildNaNFacts(void)
if (!firmwareVehicle) {
firmwareVehicle = _vehicle;
}
bool hideWaypointHeading = (command == MAV_CMD_NAV_WAYPOINT) && (i == 4) && firmwareVehicle->firmwarePlugin()->vehicleYawsToNextWaypointInMission(firmwareVehicle);
bool hideWaypointHeading = (command == MAV_CMD_NAV_WAYPOINT || command == MAV_CMD_NAV_TAKEOFF) && (i == 4) && firmwareVehicle->firmwarePlugin()->vehicleYawsToNextWaypointInMission(firmwareVehicle);
if (hideWaypointHeading) {
continue;
}
......
......@@ -14,6 +14,8 @@
#include "QGCGeo.h"
#include "QGroundControlQmlGlobal.h"
#include "QGCQGeoCoordinate.h"
#include "SettingsManager.h"
#include "AppSettings.h"
#include <QPolygonF>
......@@ -117,6 +119,11 @@ SurveyMissionItem::SurveyMissionItem(Vehicle* vehicle, QObject* parent)
_turnaroundDistFact.setRawValue(5);
}
// We override the grid altitude to the mission default
if (_manualGridFact.rawValue().toBool() || _fixedValueIsAltitudeFact.rawValue().toBool()) {
_gridAltitudeFact.setRawValue(qgcApp()->toolbox()->settingsManager()->appSettings()->defaultMissionItemAltitude()->rawValue());
}
connect(&_gridSpacingFact, &Fact::valueChanged, this, &SurveyMissionItem::_generateGrid);
connect(&_gridAngleFact, &Fact::valueChanged, this, &SurveyMissionItem::_generateGrid);
connect(&_gridEntryLocationFact, &Fact::valueChanged, this, &SurveyMissionItem::_generateGrid);
......@@ -1361,6 +1368,7 @@ double SurveyMissionItem::_turnaroundDistance(void) const
void SurveyMissionItem::applyNewAltitude(double newAltitude)
{
_fixedValueIsAltitudeFact.setRawValue(true);
_gridAltitudeFact.setRawValue(newAltitude);
}
......
......@@ -121,6 +121,7 @@ Item {
z: 2
label: object.abbreviation.length === 0 ? object.sequenceNumber : object.abbreviation.charAt(0)
checked: object.isCurrentItem
child: true
specifiesCoordinate: false
onClicked: _root.clicked(object.sequenceNumber)
......
......@@ -214,6 +214,7 @@ Rectangle {
onActivated: {
if (index == _gridTypeManual) {
missionItem.manualGrid.value = true
missionItem.fixedValueIsAltitude.value = true
} else if (index == _gridTypeCustomCamera) {
missionItem.manualGrid.value = false
missionItem.camera.value = gridTypeCombo.textAt(index)
......
......@@ -60,9 +60,11 @@ void QGCPalette::_buildMap(void)
DECLARE_QGC_COLOR(primaryButton, "#585858", "#8cb3be", "#585858", "#8cb3be")
DECLARE_QGC_COLOR(primaryButtonText, "#2c2c2c", "#000000", "#2c2c2c", "#000000")
DECLARE_QGC_COLOR(textField, "#ffffff", "#ffffff", "#585858", "#ffffff")
DECLARE_QGC_COLOR(textFieldText, "#dedede", "#000000", "#2c2c2c", "#000000")
DECLARE_QGC_COLOR(textFieldText, "#808080", "#000000", "#bfbfbf", "#000000")
DECLARE_QGC_COLOR(mapButton, "#585858", "#000000", "#585858", "#000000")
DECLARE_QGC_COLOR(mapButtonHighlight, "#585858", "#be781c", "#585858", "#be781c")
DECLARE_QGC_COLOR(mapIndicator, "#585858", "#be781c", "#585858", "#be781c")
DECLARE_QGC_COLOR(mapIndicatorChild, "#585858", "#766043", "#585858", "#766043")
DECLARE_QGC_COLOR(colorGreen, "#009431", "#009431", "#00e04b", "#00e04b")
DECLARE_QGC_COLOR(colorOrange, "#b95604", "#b95604", "#de8500", "#de8500")
DECLARE_QGC_COLOR(colorRed, "#ed3939", "#ed3939", "#f32836", "#f32836")
......
......@@ -89,6 +89,8 @@ public:
DEFINE_QGC_COLOR(textFieldText, setTextFieldText)
DEFINE_QGC_COLOR(mapButton, setMapButton)
DEFINE_QGC_COLOR(mapButtonHighlight, setMapButtonHighlight)
DEFINE_QGC_COLOR(mapIndicator, setMapIndicator)
DEFINE_QGC_COLOR(mapIndicatorChild, setMapIndicatorChild)
DEFINE_QGC_COLOR(mapWidgetBorderLight, setMapWidgetBorderLight)
DEFINE_QGC_COLOR(mapWidgetBorderDark, setMapWidgetBorderDark)
DEFINE_QGC_COLOR(brandingPurple, setBrandingPurple)
......
......@@ -12,11 +12,12 @@ Canvas {
signal clicked
property string label ///< Label to show to the side of the index indicator
property int index: 0 ///< Index to show in the indicator, 0 will show single char label instead, -1 first char of label in indicator full label to the side
property string label ///< Label to show to the side of the index indicator
property int index: 0 ///< Index to show in the indicator, 0 will show single char label instead, -1 first char of label in indicator full label to the side
property bool checked: false
property bool small: false
property var color: checked ? "green" : qgcPal.mapButtonHighlight
property bool child: false
property var color: checked ? "green" : (child ? qgcPal.mapIndicatorChild : qgcPal.mapIndicator)
property real anchorPointX: _height / 2
property real anchorPointY: _height / 2
property bool specifiesCoordinate: true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment