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
b308d72d
Commit
b308d72d
authored
Dec 24, 2019
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
4e73805e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
1 deletion
+25
-1
FlightDisplayViewMap.qml
src/FlightDisplay/FlightDisplayViewMap.qml
+9
-1
FlyView.SettingsGroup.json
src/Settings/FlyView.SettingsGroup.json
+6
-0
FlyViewSettings.cc
src/Settings/FlyViewSettings.cc
+1
-0
FlyViewSettings.h
src/Settings/FlyViewSettings.h
+1
-0
GeneralSettings.qml
src/ui/preferences/GeneralSettings.qml
+8
-0
No files found.
src/FlightDisplay/FlightDisplayViewMap.qml
View file @
b308d72d
...
...
@@ -48,6 +48,8 @@ FlightMap {
property
var
_activeVehicleCoordinate
:
activeVehicle
?
activeVehicle
.
coordinate
:
QtPositioning
.
coordinate
()
property
real
_toolButtonTopMargin
:
parent
.
height
-
mainWindow
.
height
+
(
ScreenTools
.
defaultFontPixelHeight
/
2
)
property
bool
_airspaceEnabled
:
QGroundControl
.
airmapSupported
?
(
QGroundControl
.
settingsManager
.
airMapSettings
.
enableAirMap
.
rawValue
&&
QGroundControl
.
airspaceManager
.
connected
):
false
property
var
_flyViewSettings
:
QGroundControl
.
settingsManager
.
flyViewSettings
property
bool
_keepMapCenteredOnVehicle
:
_flyViewSettings
.
keepMapCenteredOnVehicle
.
rawValue
property
bool
_disableVehicleTracking
:
false
property
bool
_keepVehicleCentered
:
mainIsMap
?
false
:
true
...
...
@@ -129,7 +131,7 @@ FlightMap {
function
updateMapToVehiclePosition
()
{
// We let FlightMap handle first vehicle position
if
(
firstVehiclePositionReceived
&&
_activeVehicleCoordinate
.
isValid
&&
!
_disableVehicleTracking
)
{
if
(
!
_keepMapCenteredOnVehicle
&&
firstVehiclePositionReceived
&&
_activeVehicleCoordinate
.
isValid
&&
!
_disableVehicleTracking
)
{
if
(
_keepVehicleCentered
)
{
flightMap
.
center
=
_activeVehicleCoordinate
}
else
{
...
...
@@ -140,6 +142,12 @@ FlightMap {
}
}
on_ActiveVehicleCoordinateChanged
:
{
if
(
_keepMapCenteredOnVehicle
&&
_activeVehicleCoordinate
.
isValid
&&
!
_disableVehicleTracking
)
{
flightMap
.
center
=
_activeVehicleCoordinate
}
}
Timer
{
id
:
panRecenterTimer
interval
:
10000
...
...
src/Settings/FlyView.SettingsGroup.json
View file @
b308d72d
...
...
@@ -37,6 +37,12 @@
"type"
:
"bool"
,
"defaultValue"
:
false
},
{
"name"
:
"keepMapCenteredOnVehicle"
,
"shortDescription"
:
"Keep map centered on vehicle"
,
"type"
:
"bool"
,
"defaultValue"
:
false
},
{
"name"
:
"maxGoToLocationDistance"
,
"shortDescription"
:
"Maximum distance allowed for Go To Location."
,
...
...
src/Settings/FlyViewSettings.cc
View file @
b308d72d
...
...
@@ -24,3 +24,4 @@ DECLARE_SETTINGSFACT(FlyViewSettings, alternateInstrumentPanel)
DECLARE_SETTINGSFACT
(
FlyViewSettings
,
showAdditionalIndicatorsCompass
)
DECLARE_SETTINGSFACT
(
FlyViewSettings
,
lockNoseUpCompass
)
DECLARE_SETTINGSFACT
(
FlyViewSettings
,
maxGoToLocationDistance
)
DECLARE_SETTINGSFACT
(
FlyViewSettings
,
keepMapCenteredOnVehicle
)
src/Settings/FlyViewSettings.h
View file @
b308d72d
...
...
@@ -26,4 +26,5 @@ public:
DEFINE_SETTINGFACT
(
showAdditionalIndicatorsCompass
)
DEFINE_SETTINGFACT
(
lockNoseUpCompass
)
DEFINE_SETTINGFACT
(
maxGoToLocationDistance
)
DEFINE_SETTINGFACT
(
keepMapCenteredOnVehicle
)
};
src/ui/preferences/GeneralSettings.qml
View file @
b308d72d
...
...
@@ -468,6 +468,14 @@ Rectangle {
property
Fact
_useChecklist
:
QGroundControl
.
settingsManager
.
appSettings
.
useChecklist
}
FactCheckBox
{
text
:
qsTr
(
"
Keep Map Centered On Vehicle
"
)
fact
:
_keepMapCenteredOnVehicle
visible
:
_keepMapCenteredOnVehicle
.
visible
property
Fact
_keepMapCenteredOnVehicle
:
QGroundControl
.
settingsManager
.
flyViewSettings
.
keepMapCenteredOnVehicle
}
FactCheckBox
{
text
:
qsTr
(
"
Show Telemetry Log Replay Status Bar
"
)
fact
:
_showLogReplayStatusBar
...
...
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