Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
6f2a9953
Commit
6f2a9953
authored
Oct 01, 2018
by
Gus Grubba
Committed by
Thomas Gubler
Nov 07, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CP - Add setting to toggle splitting concave polygon on/off
parent
9ae5cc7e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
2 deletions
+32
-2
SurveyItemEditor.qml
src/PlanView/SurveyItemEditor.qml
+8
-0
App.SettingsGroup.json
src/Settings/App.SettingsGroup.json
+7
-0
AppSettings.cc
src/Settings/AppSettings.cc
+11
-0
AppSettings.h
src/Settings/AppSettings.h
+6
-2
No files found.
src/PlanView/SurveyItemEditor.qml
View file @
6f2a9953
...
...
@@ -9,6 +9,7 @@ import QGroundControl 1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
Vehicle
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
FactSystem
1.0
import
QGroundControl
.
FactControls
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
FlightMap
1.0
...
...
@@ -119,6 +120,13 @@ Rectangle {
onClicked
:
missionItem
.
rotateEntryPoint
();
}
FactCheckBox
{
text
:
qsTr
(
"
Split concave polygons
"
)
fact
:
_splitConcave
visible
:
_splitConcave
.
visible
property
Fact
_splitConcave
:
QGroundControl
.
settingsManager
.
appSettings
.
splitConcavePolygons
}
FactCheckBox
{
text
:
qsTr
(
"
Hover and capture image
"
)
fact
:
missionItem
.
hoverAndCapture
...
...
src/Settings/App.SettingsGroup.json
View file @
6f2a9953
...
...
@@ -199,5 +199,12 @@
"enumStrings"
:
"Never,Always,When in Follow Me Flight Mode"
,
"enumValues"
:
"0,1,2"
,
"defaultValue"
:
0
},
{
"name"
:
"SplitConcavePolygons"
,
"shortDescription"
:
"Split mission concave polygons"
,
"longDescription"
:
"Split mission concave polygons into separate regular, convex polygons"
,
"type"
:
"bool"
,
"defaultValue"
:
false
}
]
src/Settings/AppSettings.cc
View file @
6f2a9953
...
...
@@ -41,6 +41,7 @@ const char* AppSettings::esriTokenName = "EsriTok
const
char
*
AppSettings
::
defaultFirmwareTypeName
=
"DefaultFirmwareType"
;
const
char
*
AppSettings
::
gstDebugName
=
"GstreamerDebugLevel"
;
const
char
*
AppSettings
::
followTargetName
=
"FollowTarget"
;
const
char
*
AppSettings
::
splitConcavePolygonsName
=
"SplitConcavePolygons"
;
const
char
*
AppSettings
::
parameterFileExtension
=
"params"
;
const
char
*
AppSettings
::
planFileExtension
=
"plan"
;
...
...
@@ -84,6 +85,7 @@ AppSettings::AppSettings(QObject* parent)
,
_defaultFirmwareTypeFact
(
NULL
)
,
_gstDebugFact
(
NULL
)
,
_followTargetFact
(
NULL
)
,
_splitConcavePolygonsFact
(
NULL
)
{
QQmlEngine
::
setObjectOwnership
(
this
,
QQmlEngine
::
CppOwnership
);
qmlRegisterUncreatableType
<
AppSettings
>
(
"QGroundControl.SettingsManager"
,
1
,
0
,
"AppSettings"
,
"Reference only"
);
...
...
@@ -428,3 +430,12 @@ Fact* AppSettings::followTarget(void)
return
_followTargetFact
;
}
Fact
*
AppSettings
::
splitConcavePolygons
(
void
)
{
if
(
!
_splitConcavePolygonsFact
)
{
_splitConcavePolygonsFact
=
_createSettingsFact
(
splitConcavePolygonsName
);
}
return
_splitConcavePolygonsFact
;
}
src/Settings/AppSettings.h
View file @
6f2a9953
...
...
@@ -43,6 +43,7 @@ public:
Q_PROPERTY
(
Fact
*
defaultFirmwareType
READ
defaultFirmwareType
CONSTANT
)
Q_PROPERTY
(
Fact
*
gstDebug
READ
gstDebug
CONSTANT
)
Q_PROPERTY
(
Fact
*
followTarget
READ
followTarget
CONSTANT
)
Q_PROPERTY
(
Fact
*
splitConcavePolygons
READ
splitConcavePolygons
CONSTANT
)
Q_PROPERTY
(
QString
missionSavePath
READ
missionSavePath
NOTIFY
savePathsChanged
)
Q_PROPERTY
(
QString
parameterSavePath
READ
parameterSavePath
NOTIFY
savePathsChanged
)
...
...
@@ -82,13 +83,14 @@ public:
Fact
*
defaultFirmwareType
(
void
);
Fact
*
gstDebug
(
void
);
Fact
*
followTarget
(
void
);
Fact
*
splitConcavePolygons
(
void
);
QString
missionSavePath
(
void
);
QString
parameterSavePath
(
void
);
QString
telemetrySavePath
(
void
);
QString
logSavePath
(
void
);
QString
videoSavePath
(
void
);
QString
crashSavePath
(
void
);
QString
videoSavePath
(
void
);
QString
crashSavePath
(
void
);
static
MAV_AUTOPILOT
offlineEditingFirmwareTypeFromFirmwareType
(
MAV_AUTOPILOT
firmwareType
);
static
MAV_TYPE
offlineEditingVehicleTypeFromVehicleType
(
MAV_TYPE
vehicleType
);
...
...
@@ -119,6 +121,7 @@ public:
static
const
char
*
defaultFirmwareTypeName
;
static
const
char
*
gstDebugName
;
static
const
char
*
followTargetName
;
static
const
char
*
splitConcavePolygonsName
;
// Application wide file extensions
static
const
char
*
parameterFileExtension
;
...
...
@@ -170,6 +173,7 @@ private:
SettingsFact
*
_defaultFirmwareTypeFact
;
SettingsFact
*
_gstDebugFact
;
SettingsFact
*
_followTargetFact
;
SettingsFact
*
_splitConcavePolygonsFact
;
};
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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