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
ab003135
Commit
ab003135
authored
Dec 05, 2017
by
Beat Küng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AirMapManager: update authorizations to changed airmapd interface
parent
6226743f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
AirMapManager.cc
src/MissionManager/AirMapManager.cc
+11
-10
No files found.
src/MissionManager/AirMapManager.cc
View file @
ab003135
...
...
@@ -19,6 +19,7 @@
#include <airmap/authenticator.h>
#include <airmap/airspaces.h>
#include <airmap/evaluation.h>
#include <airmap/flight_plans.h>
#include <airmap/flights.h>
#include <airmap/pilots.h>
...
...
@@ -188,7 +189,7 @@ void AirMapRestrictionManager::setROI(const QGeoCoordinate& center, double radiu
}
else
{
QString
description
=
QString
::
fromStdString
(
result
.
error
().
description
()
?
result
.
error
().
description
().
get
()
:
""
);
emit
error
(
"Failed to
authenticate with AirMap
"
,
emit
error
(
"Failed to
retrieve Geofences
"
,
QString
::
fromStdString
(
result
.
error
().
message
()),
description
);
}
emit
requestDone
(
true
);
...
...
@@ -434,8 +435,8 @@ void AirMapFlightManager::_checkForValidBriefing()
if
(
result
)
{
bool
allValid
=
true
;
for
(
const
auto
&
validation
:
result
.
value
().
validations
)
{
if
(
validation
.
status
!=
FlightPlan
::
Briefing
::
Validation
::
Status
::
valid
)
{
for
(
const
auto
&
validation
:
result
.
value
().
evaluation
.
validations
)
{
if
(
validation
.
status
!=
Evaluation
::
Validation
::
Status
::
valid
)
{
emit
error
(
QString
(
"%1 registration identifier is invalid: %2"
).
arg
(
QString
::
fromStdString
(
validation
.
authority
.
name
)).
arg
(
QString
::
fromStdString
(
validation
.
message
)),
""
,
""
);
allValid
=
false
;
...
...
@@ -504,23 +505,23 @@ void AirMapFlightManager::_pollBriefing()
bool
rejected
=
false
;
bool
accepted
=
false
;
bool
pending
=
false
;
for
(
const
auto
&
authorization
:
briefing
.
authorizations
)
{
for
(
const
auto
&
authorization
:
briefing
.
evaluation
.
authorizations
)
{
switch
(
authorization
.
status
)
{
case
FlightPlan
:
:
Briefing
::
Authorization
::
Status
::
accepted
:
case
FlightPlan
:
:
Briefing
::
Authorization
::
Status
::
accepted_upon_submission
:
case
Evaluation
:
:
Authorization
::
Status
::
accepted
:
case
Evaluation
:
:
Authorization
::
Status
::
accepted_upon_submission
:
accepted
=
true
;
break
;
case
FlightPlan
:
:
Briefing
::
Authorization
::
Status
::
rejected
:
case
FlightPlan
:
:
Briefing
::
Authorization
::
Status
::
rejected_upon_submission
:
case
Evaluation
:
:
Authorization
::
Status
::
rejected
:
case
Evaluation
:
:
Authorization
::
Status
::
rejected_upon_submission
:
rejected
=
true
;
break
;
case
FlightPlan
:
:
Briefing
::
Authorization
::
Status
::
pending
:
case
Evaluation
:
:
Authorization
::
Status
::
pending
:
pending
=
true
;
break
;
}
}
if
(
briefing
.
authorizations
.
size
()
==
0
)
{
if
(
briefing
.
evaluation
.
authorizations
.
size
()
==
0
)
{
// if we don't get any authorizations, we assume it's accepted
accepted
=
true
;
}
...
...
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