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
a6becbdd
Commit
a6becbdd
authored
Aug 21, 2017
by
Beat Küng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AirmapManager: make sure to pass the SITA reg data to the right objects
parent
d09847fc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
AirMapManager.cc
src/MissionManager/AirMapManager.cc
+8
-2
AirMapManager.h
src/MissionManager/AirMapManager.h
+10
-0
No files found.
src/MissionManager/AirMapManager.cc
View file @
a6becbdd
...
@@ -569,8 +569,12 @@ void AirMapFlightManager::_uploadFlight()
...
@@ -569,8 +569,12 @@ void AirMapFlightManager::_uploadFlight()
root
.
insert
(
"buffer"
,
2
);
root
.
insert
(
"buffer"
,
2
);
QJsonObject
flightFeatures
;
QJsonObject
flightFeatures
;
flightFeatures
.
insert
(
"sita_uav_registration_id"
,
""
);
// TODO
if
(
_sitaUavRegistrationId
!=
""
)
{
flightFeatures
.
insert
(
"sita_pilot_registration_id"
,
""
);
// TODO
flightFeatures
.
insert
(
"sita_uav_registration_id"
,
_sitaUavRegistrationId
);
}
if
(
_sitaPilotRegistrationId
!=
""
)
{
flightFeatures
.
insert
(
"sita_pilot_registration_id"
,
_sitaPilotRegistrationId
);
}
root
.
insert
(
"flight_features"
,
flightFeatures
);
root
.
insert
(
"flight_features"
,
flightFeatures
);
root
.
insert
(
"takeoff_latitude"
,
_flight
.
takeoffCoord
.
latitude
());
root
.
insert
(
"takeoff_latitude"
,
_flight
.
takeoffCoord
.
latitude
());
...
@@ -1196,6 +1200,8 @@ void AirMapManager::setToolbox(QGCToolbox* toolbox)
...
@@ -1196,6 +1200,8 @@ void AirMapManager::setToolbox(QGCToolbox* toolbox)
AirMapSettings
*
ap
=
toolbox
->
settingsManager
()
->
airMapSettings
();
AirMapSettings
*
ap
=
toolbox
->
settingsManager
()
->
airMapSettings
();
_networkingData
.
airmapAPIKey
=
ap
->
apiKey
()
->
rawValueString
();
_networkingData
.
airmapAPIKey
=
ap
->
apiKey
()
->
rawValueString
();
_networkingData
.
login
.
setCredentials
(
ap
->
clientID
()
->
rawValueString
(),
ap
->
userName
()
->
rawValueString
(),
ap
->
password
()
->
rawValueString
());
_networkingData
.
login
.
setCredentials
(
ap
->
clientID
()
->
rawValueString
(),
ap
->
userName
()
->
rawValueString
(),
ap
->
password
()
->
rawValueString
());
_flightManager
.
setSitaPilotRegistrationId
(
ap
->
sitaUserReg
()
->
rawValueString
());
_flightManager
.
setSitaUavRegistrationId
(
ap
->
sitaUavReg
()
->
rawValueString
());
}
}
void
AirMapManager
::
setROI
(
QGeoCoordinate
&
center
,
double
radiusMeters
)
void
AirMapManager
::
setROI
(
QGeoCoordinate
&
center
,
double
radiusMeters
)
...
...
src/MissionManager/AirMapManager.h
View file @
a6becbdd
...
@@ -245,6 +245,13 @@ public:
...
@@ -245,6 +245,13 @@ public:
const
QString
&
flightID
()
const
{
return
_currentFlightId
;
}
const
QString
&
flightID
()
const
{
return
_currentFlightId
;
}
void
setSitaUavRegistrationId
(
const
QString
&
sitaUavRegistrationId
)
{
_sitaUavRegistrationId
=
sitaUavRegistrationId
;
}
void
setSitaPilotRegistrationId
(
const
QString
&
sitaPilotRegistrationId
)
{
_sitaPilotRegistrationId
=
sitaPilotRegistrationId
;
}
public
slots
:
public
slots
:
void
endFlight
();
void
endFlight
();
...
@@ -300,6 +307,9 @@ private:
...
@@ -300,6 +307,9 @@ private:
QString
_pilotID
;
///< Pilot ID in the form "auth0|abc123"
QString
_pilotID
;
///< Pilot ID in the form "auth0|abc123"
bool
_noFlightCreatedYet
=
true
;
bool
_noFlightCreatedYet
=
true
;
QTimer
_pollTimer
;
///< timer to poll for approval check
QTimer
_pollTimer
;
///< timer to poll for approval check
QString
_sitaUavRegistrationId
;
QString
_sitaPilotRegistrationId
;
};
};
/// class to send telemetry data to AirMap
/// class to send telemetry data to AirMap
...
...
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