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
27aa9098
Commit
27aa9098
authored
Apr 09, 2018
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change position to vehicle position
parent
556599a3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
0 deletions
+20
-0
EditPositionDialog.qml
src/QmlControls/EditPositionDialog.qml
+11
-0
EditPositionDialogController.cc
src/QmlControls/EditPositionDialogController.cc
+8
-0
EditPositionDialogController.h
src/QmlControls/EditPositionDialogController.h
+1
-0
No files found.
src/QmlControls/EditPositionDialog.qml
View file @
27aa9098
...
...
@@ -112,6 +112,17 @@ QGCViewDialog {
reject
()
}
}
QGCButton
{
anchors.right
:
parent
.
right
text
:
qsTr
(
"
Set From Vehicle Position
"
)
visible
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
&&
QGroundControl
.
multiVehicleManager
.
activeVehicle
.
coordinate
.
isValid
onClicked
:
{
controller
.
setFromVehicle
()
reject
()
}
}
}
// Column
}
// QGCFlickable
}
// QGCViewDialog
src/QmlControls/EditPositionDialogController.cc
View file @
27aa9098
...
...
@@ -9,6 +9,7 @@
#include "EditPositionDialogController.h"
#include "QGCGeo.h"
#include "QGCApplication.h"
const
char
*
EditPositionDialogController
::
_latitudeFactName
=
"Latitude"
;
const
char
*
EditPositionDialogController
::
_longitudeFactName
=
"Longitude"
;
...
...
@@ -74,3 +75,10 @@ void EditPositionDialogController::setFromUTM(void)
qDebug
()
<<
_eastingFact
.
rawValue
().
toDouble
()
<<
_northingFact
.
rawValue
().
toDouble
()
<<
_zoneFact
.
rawValue
().
toInt
()
<<
(
_hemisphereFact
.
rawValue
().
toInt
()
==
1
)
<<
_coordinate
;
emit
coordinateChanged
(
_coordinate
);
}
void
EditPositionDialogController
::
setFromVehicle
(
void
)
{
_coordinate
=
qgcApp
()
->
toolbox
()
->
multiVehicleManager
()
->
activeVehicle
()
->
coordinate
();
emit
coordinateChanged
(
_coordinate
);
}
src/QmlControls/EditPositionDialogController.h
View file @
27aa9098
...
...
@@ -42,6 +42,7 @@ public:
Q_INVOKABLE
void
initValues
(
void
);
Q_INVOKABLE
void
setFromGeo
(
void
);
Q_INVOKABLE
void
setFromUTM
(
void
);
Q_INVOKABLE
void
setFromVehicle
(
void
);
signals:
void
coordinateChanged
(
QGeoCoordinate
coordinate
);
...
...
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