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
ea04fc44
Commit
ea04fc44
authored
Oct 16, 2019
by
Valentin Platzgummer
Browse files
reset ref button addded to circular surveyy
parent
a9d2e4c9
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/PlanView/CircularSurveyItemEditor.qml
View file @
ea04fc44
...
@@ -151,6 +151,11 @@ Rectangle {
...
@@ -151,6 +151,11 @@ Rectangle {
spacing
:
_margin
spacing
:
_margin
visible
:
transectsHeader
.
checked
visible
:
transectsHeader
.
checked
QGCButton
{
text
:
qsTr
(
"
Reset Reference
"
)
onClicked
:
missionItem
.
resetReference
();
}
QGCButton
{
QGCButton
{
text
:
qsTr
(
"
Rotate Entry Point
"
)
text
:
qsTr
(
"
Rotate Entry Point
"
)
onClicked
:
missionItem
.
rotateEntryPoint
();
onClicked
:
missionItem
.
rotateEntryPoint
();
...
...
src/Wima/CircularSurveyComplexItem.cc
View file @
ea04fc44
...
@@ -34,13 +34,17 @@ CircularSurveyComplexItem::CircularSurveyComplexItem(Vehicle *vehicle, bool flyV
...
@@ -34,13 +34,17 @@ CircularSurveyComplexItem::CircularSurveyComplexItem(Vehicle *vehicle, bool flyV
}
}
void
CircularSurveyComplexItem
::
resetReference
()
{
setRefPoint
(
_surveyAreaPolygon
.
center
());
}
void
CircularSurveyComplexItem
::
setRefPoint
(
const
QGeoCoordinate
&
refPt
)
void
CircularSurveyComplexItem
::
setRefPoint
(
const
QGeoCoordinate
&
refPt
)
{
{
if
(
refPt
!=
_referencePoint
){
if
(
refPt
!=
_referencePoint
){
_referencePoint
=
refPt
;
_referencePoint
=
refPt
;
emit
refPointChanged
();
emit
refPointChanged
();
//qDebug() << _referencePoint.toString();
}
}
}
}
...
...
src/Wima/CircularSurveyComplexItem.h
View file @
ea04fc44
...
@@ -24,6 +24,8 @@ public:
...
@@ -24,6 +24,8 @@ public:
Q_PROPERTY
(
Fact
*
transectMinLength
READ
transectMinLength
CONSTANT
)
Q_PROPERTY
(
Fact
*
transectMinLength
READ
transectMinLength
CONSTANT
)
Q_PROPERTY
(
bool
autoGenerated
READ
autoGenerated
NOTIFY
autoGeneratedChanged
)
Q_PROPERTY
(
bool
autoGenerated
READ
autoGenerated
NOTIFY
autoGeneratedChanged
)
Q_INVOKABLE
void
resetReference
(
void
);
// Property setters
// Property setters
void
setRefPoint
(
const
QGeoCoordinate
&
refPt
);
void
setRefPoint
(
const
QGeoCoordinate
&
refPt
);
// Set this to true if survey was automatically generated, prevents initialisation from gui.
// Set this to true if survey was automatically generated, prevents initialisation from gui.
...
...
src/Wima/WimaController.cc
View file @
ea04fc44
...
@@ -354,6 +354,8 @@ void WimaController::containerDataValidChanged(bool valid)
...
@@ -354,6 +354,8 @@ void WimaController::containerDataValidChanged(bool valid)
void
WimaController
::
updateCurrentMissionItems
()
void
WimaController
::
updateCurrentMissionItems
()
{
{
if
(
_missionItems
.
count
()
<
0
||
!
_localPlanDataValid
)
return
;
int
numberWaypoints
=
30
;
// the number of waypoints currentMissionItems must not exceed
int
numberWaypoints
=
30
;
// the number of waypoints currentMissionItems must not exceed
int
overlapping
=
2
;
// number of overlapping waypoints of consecutive mission phases
int
overlapping
=
2
;
// number of overlapping waypoints of consecutive mission phases
...
...
src/Wima/WimaPlaner.cc
View file @
ea04fc44
...
@@ -100,6 +100,7 @@ void WimaPlaner::removeArea(int index)
...
@@ -100,6 +100,7 @@ void WimaPlaner::removeArea(int index)
if
(
_visualItems
.
count
()
==
0
)
{
if
(
_visualItems
.
count
()
==
0
)
{
// this branch is reached if all items are removed
// this branch is reached if all items are removed
// to guarentee proper behavior, _currentAreaIndex must be set to a invalid value, as on constructor init.
// to guarentee proper behavior, _currentAreaIndex must be set to a invalid value, as on constructor init.
resetAllInteractive
();
_currentAreaIndex
=
-
1
;
_currentAreaIndex
=
-
1
;
return
;
return
;
}
}
...
...
src/WimaView/SphericalSurveyMapVisual.qml
View file @
ea04fc44
...
@@ -172,11 +172,19 @@ Item {
...
@@ -172,11 +172,19 @@ Item {
DragCoordinate
{
DragCoordinate
{
map
:
_root
.
map
map
:
_root
.
map
qgcView
:
_root
.
qgcView
qgcView
:
_root
.
qgcView
z
:
QGroundControl
.
zOrderMapItems
z
:
QGroundControl
.
zOrderMapItems
checked
:
_missionItem
.
isCurrentItem
checked
:
_missionItem
.
isCurrentItem
coordinate
:
_missionItem
.
refPoint
coordinate
:
_missionItem
.
refPoint
onCoordinateChanged
:
_missionItem
.
refPoint
=
coordinate
property
var
refPoint
:
_missionItem
.
refPoint
onCoordinateChanged
:
_missionItem
.
refPoint
=
coordinate
onRefPointChanged
:
{
if
(
refPoint
!==
coordinate
)
{
coordinate
=
refPoint
}
}
onClicked
:
_root
.
clicked
(
_missionItem
.
sequenceNumber
)
onClicked
:
_root
.
clicked
(
_missionItem
.
sequenceNumber
)
}
}
}
}
...
...
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