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
7e543bb0
Commit
7e543bb0
authored
Jul 23, 2018
by
Gus Grubba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a button to clear feature responses
More clang warnings cleanup
parent
b66447ff
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
28 deletions
+52
-28
AirMapFlightPlanManager.cc
src/Airmap/AirMapFlightPlanManager.cc
+9
-9
AirMapManager.cc
src/Airmap/AirMapManager.cc
+3
-3
AirmapSettings.qml
src/Airmap/AirmapSettings.qml
+39
-15
FlightFeature.qml
src/Airmap/FlightFeature.qml
+1
-1
No files found.
src/Airmap/AirMapFlightPlanManager.cc
View file @
7e543bb0
...
...
@@ -597,7 +597,7 @@ adv_sort(QObject* a, QObject* b)
AirMapAdvisory
*
aa
=
qobject_cast
<
AirMapAdvisory
*>
(
a
);
AirMapAdvisory
*
bb
=
qobject_cast
<
AirMapAdvisory
*>
(
b
);
if
(
!
aa
||
!
bb
)
return
false
;
return
(
int
)
aa
->
color
()
>
(
int
)
bb
->
color
(
);
return
static_cast
<
int
>
(
aa
->
color
())
>
static_cast
<
int
>
(
bb
->
color
()
);
}
//-----------------------------------------------------------------------------
...
...
@@ -607,7 +607,7 @@ rules_sort(QObject* a, QObject* b)
AirMapRule
*
aa
=
qobject_cast
<
AirMapRule
*>
(
a
);
AirMapRule
*
bb
=
qobject_cast
<
AirMapRule
*>
(
b
);
if
(
!
aa
||
!
bb
)
return
false
;
return
(
int
)
aa
->
status
()
>
(
int
)
bb
->
status
(
);
return
static_cast
<
int
>
(
aa
->
status
())
>
static_cast
<
int
>
(
bb
->
status
()
);
}
//-----------------------------------------------------------------------------
...
...
@@ -627,7 +627,7 @@ AirMapFlightPlanManager::_findBriefFeature(const QString& name)
void
AirMapFlightPlanManager
::
_pollBriefing
()
{
qCDebug
(
AirMapManagerLog
)
<<
"Poll Briefing. State:"
<<
(
int
)
_state
;
qCDebug
(
AirMapManagerLog
)
<<
"Poll Briefing. State:"
<<
static_cast
<
int
>
(
_state
)
;
if
(
_state
!=
State
::
Idle
)
{
QTimer
::
singleShot
(
100
,
this
,
&
AirMapFlightPlanManager
::
_pollBriefing
);
return
;
...
...
@@ -721,7 +721,7 @@ AirMapFlightPlanManager::_pollBriefing()
for
(
const
auto
&
authorization
:
briefing
.
evaluation
.
authorizations
)
{
AirMapFlightAuthorization
*
pAuth
=
new
AirMapFlightAuthorization
(
authorization
,
this
);
_authorizations
.
append
(
pAuth
);
qCDebug
(
AirMapManagerLog
)
<<
"Autorization:"
<<
pAuth
->
name
()
<<
" ("
<<
pAuth
->
message
()
<<
")"
<<
(
int
)
pAuth
->
status
(
);
qCDebug
(
AirMapManagerLog
)
<<
"Autorization:"
<<
pAuth
->
name
()
<<
" ("
<<
pAuth
->
message
()
<<
")"
<<
static_cast
<
int
>
(
pAuth
->
status
()
);
switch
(
authorization
.
status
)
{
case
Evaluation
:
:
Authorization
::
Status
::
accepted
:
case
Evaluation
:
:
Authorization
::
Status
::
accepted_upon_submission
:
...
...
@@ -840,7 +840,7 @@ AirMapFlightPlanManager::loadFlightList(QDateTime startTime, QDateTime endTime)
void
AirMapFlightPlanManager
::
_loadFlightList
()
{
qCDebug
(
AirMapManagerLog
)
<<
"Load flight list. State:"
<<
(
int
)
_state
;
qCDebug
(
AirMapManagerLog
)
<<
"Load flight list. State:"
<<
static_cast
<
int
>
(
_state
)
;
if
(
_state
!=
State
::
Idle
)
{
QTimer
::
singleShot
(
100
,
this
,
&
AirMapFlightPlanManager
::
_loadFlightList
);
return
;
...
...
@@ -854,10 +854,10 @@ AirMapFlightPlanManager::_loadFlightList()
if
(
_state
!=
State
::
LoadFlightList
)
return
;
Flights
::
Search
::
Parameters
params
;
params
.
authorization
=
login_token
.
toStdString
();
quint64
start
=
_rangeStart
.
toUTC
().
toMSecsSinceEpoch
(
);
quint64
end
=
_rangeEnd
.
toUTC
().
toMSecsSinceEpoch
(
);
params
.
start_after
=
airmap
::
from_milliseconds_since_epoch
(
airmap
::
milliseconds
(
(
long
long
)
start
));
params
.
start_before
=
airmap
::
from_milliseconds_since_epoch
(
airmap
::
milliseconds
(
(
long
long
)
end
));
quint64
start
=
static_cast
<
quint64
>
(
_rangeStart
.
toUTC
().
toMSecsSinceEpoch
()
);
quint64
end
=
static_cast
<
quint64
>
(
_rangeEnd
.
toUTC
().
toMSecsSinceEpoch
()
);
params
.
start_after
=
airmap
::
from_milliseconds_since_epoch
(
airmap
::
milliseconds
(
static_cast
<
long
long
>
(
start
)
));
params
.
start_before
=
airmap
::
from_milliseconds_since_epoch
(
airmap
::
milliseconds
(
static_cast
<
long
long
>
(
end
)
));
params
.
limit
=
250
;
params
.
pilot_id
=
_pilotID
.
toStdString
();
_shared
.
client
()
->
flights
().
search
(
params
,
[
this
,
isAlive
](
const
Flights
::
Search
::
Result
&
result
)
{
...
...
src/Airmap/AirMapManager.cc
View file @
7e543bb0
...
...
@@ -42,9 +42,9 @@ AirMapManager::AirMapManager(QGCApplication* app, QGCToolbox* toolbox)
{
_logger
=
std
::
make_shared
<
qt
::
Logger
>
();
qt
::
register_types
();
// TODO: still needed?
_logger
->
logging_category
().
setEnabled
(
QtDebugMsg
,
fals
e
);
_logger
->
logging_category
().
setEnabled
(
QtInfoMsg
,
fals
e
);
_logger
->
logging_category
().
setEnabled
(
QtWarningMsg
,
fals
e
);
_logger
->
logging_category
().
setEnabled
(
QtDebugMsg
,
tru
e
);
_logger
->
logging_category
().
setEnabled
(
QtInfoMsg
,
tru
e
);
_logger
->
logging_category
().
setEnabled
(
QtWarningMsg
,
tru
e
);
_dispatchingLogger
=
std
::
make_shared
<
qt
::
DispatchingLogger
>
(
_logger
);
connect
(
&
_shared
,
&
AirMapSharedState
::
error
,
this
,
&
AirMapManager
::
_error
);
}
...
...
src/Airmap/AirmapSettings.qml
View file @
7e543bb0
...
...
@@ -75,15 +75,17 @@ QGCView {
}
}
Rectangle
{
height
:
general
Col
.
height
+
(
ScreenTools
.
defaultFontPixelHeight
*
2
)
height
:
general
Row
.
height
+
(
ScreenTools
.
defaultFontPixelHeight
*
2
)
width
:
_panelWidth
color
:
qgcPal
.
windowShade
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
anchors.horizontalCenter
:
parent
.
horizontalCenter
Row
{
id
:
generalRow
spacing
:
ScreenTools
.
defaultFontPixelWidth
*
4
anchors.centerIn
:
parent
Column
{
id
:
generalCol
spacing
:
ScreenTools
.
defaultFontPixelWidth
anchors.centerIn
:
parent
FactCheckBox
{
text
:
qsTr
(
"
Enable AirMap Services
"
)
fact
:
_enableAirMapFact
...
...
@@ -97,6 +99,28 @@ QGCView {
property
Fact
_enableTelemetryFact
:
QGroundControl
.
settingsManager
.
airMapSettings
.
enableTelemetry
}
}
QGCButton
{
text
:
qsTr
(
"
Reset AirMap Data
"
)
enabled
:
_enableAirMapFact
.
rawValue
onClicked
:
clearDialog
.
open
()
anchors.verticalCenter
:
parent
.
verticalCenter
MessageDialog
{
id
:
clearDialog
visible
:
false
icon
:
StandardIcon
.
Warning
standardButtons
:
StandardButton
.
Yes
|
StandardButton
.
No
title
:
qsTr
(
"
Reset AirMap Data
"
)
text
:
qsTr
(
"
All saved ruleset answers will be cleared. Is this really what you want?
"
)
onYes
:
{
QGroundControl
.
airspaceManager
.
ruleSets
.
clearAllFeatures
()
clearDialog
.
close
()
}
onNo
:
{
clearDialog
.
close
()
}
}
}
}
}
//-----------------------------------------------------------------
//-- Connection Status
...
...
src/Airmap/FlightFeature.qml
View file @
7e543bb0
...
...
@@ -60,7 +60,7 @@ Rectangle {
anchors.left
:
parent
.
left
anchors.verticalCenter
:
parent
.
verticalCenter
Component.onCompleted
:
{
checked
=
feature
.
value
&&
feature
.
value
<
2
?
feature
.
value
:
fals
e
checked
=
feature
.
value
===
2
?
false
:
feature
.
valu
e
}
}
QGCLabel
{
...
...
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