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
61bdd7f2
Commit
61bdd7f2
authored
Feb 17, 2019
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
efd77cee
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
155 additions
and
71 deletions
+155
-71
StructureScan.SettingsGroup.json
src/MissionManager/StructureScan.SettingsGroup.json
+8
-0
StructureScanComplexItem.cc
src/MissionManager/StructureScanComplexItem.cc
+128
-64
StructureScanComplexItem.h
src/MissionManager/StructureScanComplexItem.h
+10
-4
StructureScanComplexItemTest.cc
src/MissionManager/StructureScanComplexItemTest.cc
+1
-1
StructureScanEditor.qml
src/PlanView/StructureScanEditor.qml
+8
-2
No files found.
src/MissionManager/StructureScan.SettingsGroup.json
View file @
61bdd7f2
...
...
@@ -9,6 +9,14 @@
"decimalPlaces"
:
0
,
"defaultValue"
:
0
},
{
"name"
:
"EntranceAltitude"
,
"shortDescription"
:
"Vehicle will fly to/from the structure at this altitude."
,
"type"
:
"double"
,
"units"
:
"m"
,
"decimalPlaces"
:
1
,
"defaultValue"
:
50
},
{
"name"
:
"Altitude"
,
"shortDescription"
:
"Altitude for the bottom layer of the structure scan."
,
...
...
src/MissionManager/StructureScanComplexItem.cc
View file @
61bdd7f2
This diff is collapsed.
Click to expand it.
src/MissionManager/StructureScanComplexItem.h
View file @
61bdd7f2
...
...
@@ -31,7 +31,8 @@ public:
StructureScanComplexItem
(
Vehicle
*
vehicle
,
bool
flyView
,
const
QString
&
kmlOrSHPFile
,
QObject
*
parent
);
Q_PROPERTY
(
CameraCalc
*
cameraCalc
READ
cameraCalc
CONSTANT
)
Q_PROPERTY
(
Fact
*
altitude
READ
altitude
CONSTANT
)
Q_PROPERTY
(
Fact
*
entranceAlt
READ
entranceAlt
CONSTANT
)
Q_PROPERTY
(
Fact
*
scanBottomAlt
READ
scanBottomAlt
CONSTANT
)
Q_PROPERTY
(
Fact
*
structureHeight
READ
structureHeight
CONSTANT
)
Q_PROPERTY
(
Fact
*
layers
READ
layers
CONSTANT
)
Q_PROPERTY
(
Fact
*
gimbalPitch
READ
gimbalPitch
CONSTANT
)
...
...
@@ -43,7 +44,8 @@ public:
Q_PROPERTY
(
QGCMapPolygon
*
flightPolygon
READ
flightPolygon
CONSTANT
)
CameraCalc
*
cameraCalc
(
void
)
{
return
&
_cameraCalc
;
}
Fact
*
altitude
(
void
)
{
return
&
_altitudeFact
;
}
Fact
*
entranceAlt
(
void
)
{
return
&
_entranceAltFact
;
}
Fact
*
scanBottomAlt
(
void
)
{
return
&
_scanBottomAltFact
;
}
Fact
*
structureHeight
(
void
)
{
return
&
_structureHeightFact
;
}
Fact
*
layers
(
void
)
{
return
&
_layersFact
;
}
Fact
*
gimbalPitch
(
void
)
{
return
&
_gimbalPitchFact
;
}
...
...
@@ -100,7 +102,7 @@ public:
static
const
char
*
jsonComplexItemTypeValue
;
static
const
char
*
settingsGroup
;
static
const
char
*
altitude
Name
;
static
const
char
*
scanBottomAlt
Name
;
static
const
char
*
structureHeightName
;
static
const
char
*
layersName
;
static
const
char
*
gimbalPitchName
;
...
...
@@ -122,6 +124,7 @@ private slots:
void
_recalcLayerInfo
(
void
);
void
_updateLastSequenceNumber
(
void
);
void
_updateGimbalPitch
(
void
);
void
_validateEntryVertex
(
void
);
private:
void
_setExitCoordinate
(
const
QGeoCoordinate
&
coordinate
);
...
...
@@ -146,15 +149,18 @@ private:
CameraCalc
_cameraCalc
;
SettingsFact
_
altitude
Fact
;
SettingsFact
_
scanBottomAlt
Fact
;
SettingsFact
_structureHeightFact
;
SettingsFact
_layersFact
;
SettingsFact
_gimbalPitchFact
;
SettingsFact
_startFromTopFact
;
SettingsFact
_entranceAltFact
;
static
const
char
*
_jsonCameraCalcKey
;
static
const
char
*
_jsonAltitudeRelativeKey
;
static
const
char
*
_entranceAltName
;
// This value cannot be overriden
friend
class
StructureScanComplexItemTest
;
};
...
...
src/MissionManager/StructureScanComplexItemTest.cc
View file @
61bdd7f2
...
...
@@ -59,7 +59,7 @@ void StructureScanComplexItemTest::_testDirty(void)
// These facts should set dirty when changed
QList
<
Fact
*>
rgFacts
;
rgFacts
<<
_structureScanItem
->
altitude
()
<<
_structureScanItem
->
layers
();
rgFacts
<<
_structureScanItem
->
entranceAlt
()
<<
_structureScanItem
->
layers
();
for
(
Fact
*
fact
:
rgFacts
)
{
qDebug
()
<<
fact
->
name
();
QVERIFY
(
!
_structureScanItem
->
dirty
());
...
...
src/PlanView/StructureScanEditor.qml
View file @
61bdd7f2
...
...
@@ -128,9 +128,15 @@ Rectangle {
visible
:
missionItem
.
cameraCalc
.
isManualCamera
}
QGCLabel
{
text
:
qsTr
(
"
Bottom layer
alt
"
)
}
QGCLabel
{
text
:
qsTr
(
"
Scan bottom
alt
"
)
}
FactTextField
{
fact
:
missionItem
.
altitude
fact
:
missionItem
.
scanBottomAlt
Layout.fillWidth
:
true
}
QGCLabel
{
text
:
qsTr
(
"
Entrance/Exit alt
"
)
}
FactTextField
{
fact
:
missionItem
.
entranceAlt
Layout.fillWidth
:
true
}
...
...
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