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
a1a57a75
Commit
a1a57a75
authored
Jan 27, 2018
by
Gus Grubba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Save weather structure locally.
parent
acfd2758
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
AirMapWeatherInformation.cc
src/Airmap/AirMapWeatherInformation.cc
+4
-4
No files found.
src/Airmap/AirMapWeatherInformation.cc
View file @
a1a57a75
...
...
@@ -55,14 +55,14 @@ AirMapWeatherInformation::_requestWeatherUpdate(const QGeoCoordinate& coordinate
params
.
weather
=
true
;
_shared
.
client
()
->
status
().
get_status_by_point
(
params
,
[
this
,
coordinate
](
const
Status
::
GetStatus
::
Result
&
result
)
{
if
(
result
)
{
const
Status
::
Weather
&
weather
=
result
.
value
().
weather
;
_
weather
=
result
.
value
().
weather
;
_valid
=
true
;
if
(
weather
.
icon
.
empty
())
{
if
(
_
weather
.
icon
.
empty
())
{
_icon
=
QStringLiteral
(
"qrc:/airmapweather/unknown.svg"
);
}
else
{
_icon
=
QStringLiteral
(
"qrc:/airmapweather/"
)
+
QString
::
fromStdString
(
weather
.
icon
)
+
QStringLiteral
(
".svg"
);
_icon
=
QStringLiteral
(
"qrc:/airmapweather/"
)
+
QString
::
fromStdString
(
_
weather
.
icon
)
+
QStringLiteral
(
".svg"
);
}
qCDebug
(
AirMapManagerLog
)
<<
"Weather Info: "
<<
_valid
<<
"Icon:"
<<
QString
::
fromStdString
(
weather
.
icon
)
<<
"Condition:"
<<
QString
::
fromStdString
(
weather
.
condition
)
<<
"Temp:"
<<
weather
.
temperature
;
qCDebug
(
AirMapManagerLog
)
<<
"Weather Info: "
<<
_valid
<<
"Icon:"
<<
QString
::
fromStdString
(
_weather
.
icon
)
<<
"Condition:"
<<
QString
::
fromStdString
(
_weather
.
condition
)
<<
"Temp:"
<<
_
weather
.
temperature
;
}
else
{
_valid
=
false
;
qCDebug
(
AirMapManagerLog
)
<<
"Request Weather Failed"
;
...
...
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