Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
e8ec1f3c
Unverified
Commit
e8ec1f3c
authored
Jun 01, 2018
by
Don Gagne
Committed by
GitHub
Jun 01, 2018
Browse files
Merge pull request #6543 from DonLakeFlyer/SimpleMissionStart
Support for simple MissionStart item
parents
70c5153b
acfc45df
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/PlanView/MissionSettingsEditor.qml
View file @
e8ec1f3c
...
...
@@ -37,6 +37,7 @@ Rectangle {
property
var
_appSettings
:
QGroundControl
.
settingsManager
.
appSettings
property
bool
_waypointsOnlyMode
:
QGroundControl
.
corePlugin
.
options
.
missionWaypointsOnly
property
bool
_showCameraSection
:
!
_waypointsOnlyMode
||
QGroundControl
.
corePlugin
.
showAdvancedUI
property
bool
_simpleMissionStart
:
QGroundControl
.
corePlugin
.
options
.
showSimpleMissionStart
readonly
property
string
_firmwareLabel
:
qsTr
(
"
Firmware
"
)
readonly
property
string
_vehicleLabel
:
qsTr
(
"
Vehicle
"
)
...
...
@@ -53,154 +54,84 @@ Rectangle {
anchors.top
:
parent
.
top
spacing
:
_margin
Column
{
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
spacing
:
_margin
GridLayout
{
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
columnSpacing
:
ScreenTools
.
defaultFontPixelWidth
rowSpacing
:
columnSpacing
columns
:
2
QGCLabel
{
text
:
qsTr
(
"
Waypoint alt
"
)
}
FactTextField
{
fact
:
QGroundControl
.
settingsManager
.
appSettings
.
defaultMissionItemAltitude
Layout.fillWidth
:
true
}
QGCCheckBox
{
id
:
flightSpeedCheckBox
text
:
qsTr
(
"
Flight speed
"
)
visible
:
!
_missionVehicle
.
vtol
checked
:
missionItem
.
speedSection
.
specifyFlightSpeed
onClicked
:
missionItem
.
speedSection
.
specifyFlightSpeed
=
checked
}
FactTextField
{
Layout.fillWidth
:
true
fact
:
missionItem
.
speedSection
.
flightSpeed
visible
:
flightSpeedCheckBox
.
visible
enabled
:
flightSpeedCheckBox
.
checked
}
}
// GridLayout
}
CameraSection
{
id
:
cameraSection
checked
:
missionItem
.
cameraSection
.
settingsSpecified
visible
:
_showCameraSection
}
QGCLabel
{
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
text
:
qsTr
(
"
Above camera commands will take affect immediately upon mission start.
"
)
wrapMode
:
Text
.
WordWrap
horizontalAlignment
:
Text
.
AlignHCenter
font.pointSize
:
ScreenTools
.
smallFontPointSize
visible
:
_showCameraSection
&&
cameraSection
.
checked
}
SectionHeader
{
id
:
missionEndHeader
text
:
qsTr
(
"
Mission End
"
)
checked
:
true
}
Column
{
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
spacing
:
_margin
visible
:
missionEndHeader
.
checked
QGCCheckBox
{
text
:
qsTr
(
"
Return To Launch
"
)
checked
:
missionItem
.
missionEndRTL
onClicked
:
missionItem
.
missionEndRTL
=
checked
}
}
SectionHeader
{
id
:
vehicleInfoSectionHeader
text
:
qsTr
(
"
Vehicle Info
"
)
visible
:
_offlineEditing
&&
!
_waypointsOnlyMode
checked
:
false
}
GridLayout
{
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
columnSpacing
:
ScreenTools
.
defaultFontPixelWidth
rowSpacing
:
columnSpacing
columns
:
2
visible
:
vehicleInfoSectionHeader
.
visible
&&
vehicleInfoSectionHeader
.
checked
QGCLabel
{
text
:
_firmwareLabel
Layout.fillWidth
:
true
visible
:
_showOfflineVehicleCombos
}
FactComboBox
{
fact
:
QGroundControl
.
settingsManager
.
appSettings
.
offlineEditingFirmwareType
indexModel
:
false
Layout.preferredWidth
:
_fieldWidth
visible
:
_showOfflineVehicleCombos
enabled
:
_enableOfflineVehicleCombos
text
:
qsTr
(
"
Waypoint alt
"
)
}
QGCLabel
{
text
:
_vehicleLabel
FactTextField
{
fact
:
QGroundControl
.
settingsManager
.
appSettings
.
defaultMissionItemAltitude
Layout.fillWidth
:
true
visible
:
_showOfflineVehicleCombos
}
FactComboBox
{
fact
:
QGroundControl
.
settingsManager
.
appSettings
.
offlineEditingVehicleType
indexModel
:
false
Layout.preferredWidth
:
_fieldWidth
visible
:
_showOfflineVehicleCombos
enabled
:
_enableOfflineVehicleCombos
}
QGCLabel
{
text
:
qsTr
(
"
Cruise speed
"
)
visible
:
_showCruiseSpeed
Layout.fillWidth
:
true
QGCCheckBox
{
id
:
flightSpeedCheckBox
text
:
qsTr
(
"
Flight speed
"
)
visible
:
!
_missionVehicle
.
vtol
&&
!
_simpleMissionStart
checked
:
missionItem
.
speedSection
.
specifyFlightSpeed
onClicked
:
missionItem
.
speedSection
.
specifyFlightSpeed
=
checked
}
FactTextField
{
fact
:
QGroundControl
.
settingsManager
.
appSettings
.
offlineEditingCruiseSpeed
visible
:
_showCruiseSpeed
Layout.preferredWidth
:
_fieldWidth
}
QGCLabel
{
text
:
qsTr
(
"
Hover speed
"
)
visible
:
_showHoverSpeed
Layout.fillWidth
:
true
fact
:
missionItem
.
speedSection
.
flightSpeed
visible
:
flightSpeedCheckBox
.
visible
enabled
:
flightSpeedCheckBox
.
checked
}
FactTextField
{
fact
:
QGroundControl
.
settingsManager
.
appSettings
.
offlineEditingHoverSpeed
visible
:
_showHoverSpeed
Layout.preferredWidth
:
_fieldWidth
}
}
// GridLayout
SectionHeader
{
id
:
plannedHomePositionSection
text
:
qsTr
(
"
Planned Home Position
"
)
visible
:
!
_vehicleHasHomePosition
checked
:
false
}
Column
{
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
spacing
:
_margin
visible
:
plannedHomePositionSection
.
checked
&&
!
_vehicleHasHomePosition
visible
:
!
_simpleMissionStart
CameraSection
{
id
:
cameraSection
checked
:
missionItem
.
cameraSection
.
settingsSpecified
visible
:
_showCameraSection
}
QGCLabel
{
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
text
:
qsTr
(
"
Above camera commands will take affect immediately upon mission start.
"
)
wrapMode
:
Text
.
WordWrap
horizontalAlignment
:
Text
.
AlignHCenter
font.pointSize
:
ScreenTools
.
smallFontPointSize
visible
:
_showCameraSection
&&
cameraSection
.
checked
}
SectionHeader
{
id
:
missionEndHeader
text
:
qsTr
(
"
Mission End
"
)
checked
:
true
}
Column
{
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
spacing
:
_margin
visible
:
missionEndHeader
.
checked
QGCCheckBox
{
text
:
qsTr
(
"
Return To Launch
"
)
checked
:
missionItem
.
missionEndRTL
onClicked
:
missionItem
.
missionEndRTL
=
checked
}
}
SectionHeader
{
id
:
vehicleInfoSectionHeader
text
:
qsTr
(
"
Vehicle Info
"
)
visible
:
_offlineEditing
&&
!
_waypointsOnlyMode
checked
:
false
}
GridLayout
{
anchors.left
:
parent
.
left
...
...
@@ -208,29 +139,100 @@ Rectangle {
columnSpacing
:
ScreenTools
.
defaultFontPixelWidth
rowSpacing
:
columnSpacing
columns
:
2
visible
:
vehicleInfoSectionHeader
.
visible
&&
vehicleInfoSectionHeader
.
checked
QGCLabel
{
text
:
qsTr
(
"
Altitude
"
)
text
:
_firmwareLabel
Layout.fillWidth
:
true
visible
:
_showOfflineVehicleCombos
}
FactComboBox
{
fact
:
QGroundControl
.
settingsManager
.
appSettings
.
offlineEditingFirmwareType
indexModel
:
false
Layout.preferredWidth
:
_fieldWidth
visible
:
_showOfflineVehicleCombos
enabled
:
_enableOfflineVehicleCombos
}
QGCLabel
{
text
:
_vehicleLabel
Layout.fillWidth
:
true
visible
:
_showOfflineVehicleCombos
}
FactComboBox
{
fact
:
QGroundControl
.
settingsManager
.
appSettings
.
offlineEditingVehicleType
indexModel
:
false
Layout.preferredWidth
:
_fieldWidth
visible
:
_showOfflineVehicleCombos
enabled
:
_enableOfflineVehicleCombos
}
QGCLabel
{
text
:
qsTr
(
"
Cruise speed
"
)
visible
:
_showCruiseSpeed
Layout.fillWidth
:
true
}
FactTextField
{
fact
:
missionItem
.
plannedHomePositionAltitude
fact
:
QGroundControl
.
settingsManager
.
appSettings
.
offlineEditingCruiseSpeed
visible
:
_showCruiseSpeed
Layout.preferredWidth
:
_fieldWidth
}
QGCLabel
{
text
:
qsTr
(
"
Hover speed
"
)
visible
:
_showHoverSpeed
Layout.fillWidth
:
true
}
}
FactTextField
{
fact
:
QGroundControl
.
settingsManager
.
appSettings
.
offlineEditingHoverSpeed
visible
:
_showHoverSpeed
Layout.preferredWidth
:
_fieldWidth
}
}
// GridLayout
QGCLabel
{
width
:
parent
.
width
wrapMode
:
Text
.
WordWrap
font.pointSize
:
ScreenTools
.
smallFontPointSize
text
:
qsTr
(
"
Actual position set by vehicle at flight time.
"
)
horizontalAlignment
:
Text
.
AlignHCenter
SectionHeader
{
id
:
plannedHomePositionSection
text
:
qsTr
(
"
Planned Home Position
"
)
visible
:
!
_vehicleHasHomePosition
checked
:
false
}
QGCButton
{
text
:
qsTr
(
"
Set Home To Map Center
"
)
onClicked
:
missionItem
.
coordinate
=
map
.
center
anchors.horizontalCenter
:
parent
.
horizontalCenter
Column
{
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
spacing
:
_margin
visible
:
plannedHomePositionSection
.
checked
&&
!
_vehicleHasHomePosition
GridLayout
{
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
columnSpacing
:
ScreenTools
.
defaultFontPixelWidth
rowSpacing
:
columnSpacing
columns
:
2
QGCLabel
{
text
:
qsTr
(
"
Altitude
"
)
}
FactTextField
{
fact
:
missionItem
.
plannedHomePositionAltitude
Layout.fillWidth
:
true
}
}
QGCLabel
{
width
:
parent
.
width
wrapMode
:
Text
.
WordWrap
font.pointSize
:
ScreenTools
.
smallFontPointSize
text
:
qsTr
(
"
Actual position set by vehicle at flight time.
"
)
horizontalAlignment
:
Text
.
AlignHCenter
}
QGCButton
{
text
:
qsTr
(
"
Set Home To Map Center
"
)
onClicked
:
missionItem
.
coordinate
=
map
.
center
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
}
}
}
// Column
}
// Column
}
// Rectangle
src/api/QGCOptions.h
View file @
e8ec1f3c
...
...
@@ -48,6 +48,7 @@ public:
Q_PROPERTY
(
bool
showMissionStatus
READ
showMissionStatus
CONSTANT
)
Q_PROPERTY
(
bool
guidedActionsRequireRCRSSI
READ
guidedActionsRequireRCRSSI
CONSTANT
)
Q_PROPERTY
(
bool
showMissionAbsoluteAltitude
READ
showMissionAbsoluteAltitude
NOTIFY
showMissionAbsoluteAltitudeChanged
)
Q_PROPERTY
(
bool
showSimpleMissionStart
READ
showSimpleMissionStart
NOTIFY
showSimpleMissionStartChanged
)
/// Should QGC hide its settings menu and colapse it into one single menu (Settings and Vehicle Setup)?
/// @return true if QGC should consolidate both menus into one.
...
...
@@ -88,6 +89,7 @@ public:
virtual
bool
showOfflineMapExport
()
const
{
return
true
;
}
virtual
bool
showOfflineMapImport
()
const
{
return
true
;
}
virtual
bool
showMissionAbsoluteAltitude
()
const
{
return
true
;
}
virtual
bool
showSimpleMissionStart
()
const
{
return
false
;
}
#if defined(__mobile__)
virtual
bool
useMobileFileDialog
()
const
{
return
true
;}
...
...
@@ -114,6 +116,7 @@ signals:
void
showOfflineMapExportChanged
();
void
showOfflineMapImportChanged
();
void
showMissionAbsoluteAltitudeChanged
();
void
showSimpleMissionStartChanged
();
private:
CustomInstrumentWidget
*
_defaultInstrumentWidget
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment