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
b8cfd1e8
Commit
b8cfd1e8
authored
Jun 18, 2018
by
DonLakeFlyer
Browse files
Fix lastSequenceNumber calc
parent
7c359b24
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/MissionManager/StructureScanComplexItem.cc
View file @
b8cfd1e8
...
...
@@ -116,11 +116,16 @@ void StructureScanComplexItem::_polygonCountChanged(int count)
int
StructureScanComplexItem
::
lastSequenceNumber
(
void
)
const
{
return
_sequenceNumber
+
(
_layersFact
.
rawValue
().
toInt
()
*
((
_flightPolygon
.
count
()
+
1
)
+
// 1 waypoint for each polygon vertex + 1 to go back to first polygon vertex for each layer
2
))
+
// Camera trigger start/stop for each layer
2
;
// ROI_WPNEXT_OFFSET and ROI_NONE commands
// Each structure layer contains:
// 1 waypoint for each polygon vertex + 1 to go back to first polygon vertex for each layer
// Two commands for camera trigger start/stop
int
layerItemCount
=
_flightPolygon
.
count
()
+
1
+
2
;
int
multiLayerItemCount
=
layerItemCount
*
_layersFact
.
rawValue
().
toInt
();
int
itemCount
=
multiLayerItemCount
+
2
;
// +2 for ROI_WPNEXT_OFFSET and ROI_NONE commands
return
_sequenceNumber
+
itemCount
-
1
;
}
void
StructureScanComplexItem
::
setDirty
(
bool
dirty
)
...
...
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