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
5982ad4c
Commit
5982ad4c
authored
Jan 25, 2018
by
Gus Grubba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed QML side and done for the night.
parent
ad4d7957
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
10 deletions
+12
-10
AirMapManager.cc
src/Airmap/AirMapManager.cc
+1
-1
AirMapWeatherInformation.cc
src/Airmap/AirMapWeatherInformation.cc
+3
-0
AirspaceControl.qml
src/Airmap/AirspaceControl.qml
+3
-3
AirspaceWeather.qml
src/Airmap/AirspaceWeather.qml
+4
-4
AirspaceManager.h
src/AirspaceManagement/AirspaceManager.h
+1
-2
No files found.
src/Airmap/AirMapManager.cc
View file @
5982ad4c
...
...
@@ -34,7 +34,7 @@ AirMapManager::AirMapManager(QGCApplication* app, QGCToolbox* toolbox)
{
_logger
=
std
::
make_shared
<
qt
::
Logger
>
();
qt
::
register_types
();
// TODO: still needed?s
_logger
->
logging_category
().
setEnabled
(
QtDebugMsg
,
tru
e
);
_logger
->
logging_category
().
setEnabled
(
QtDebugMsg
,
fals
e
);
_logger
->
logging_category
().
setEnabled
(
QtInfoMsg
,
true
);
_logger
->
logging_category
().
setEnabled
(
QtWarningMsg
,
true
);
_dispatchingLogger
=
std
::
make_shared
<
qt
::
DispatchingLogger
>
(
_logger
);
...
...
src/Airmap/AirMapWeatherInformation.cc
View file @
5982ad4c
...
...
@@ -49,6 +49,7 @@ AirMapWeatherInformation::setROI(const QGeoCoordinate& center)
void
AirMapWeatherInformation
::
_requestWeatherUpdate
(
const
QGeoCoordinate
&
coordinate
)
{
qCDebug
(
AirMapManagerLog
)
<<
"Request Weather"
;
if
(
!
_shared
.
client
())
{
qCDebug
(
AirMapManagerLog
)
<<
"No AirMap client instance. Not updating Weather information"
;
_valid
=
false
;
...
...
@@ -72,8 +73,10 @@ AirMapWeatherInformation::_requestWeatherUpdate(const QGeoCoordinate& coordinate
_humidity
=
weather
.
humidity
;
_visibility
=
weather
.
visibility
;
_precipitation
=
weather
.
precipitation
;
qCDebug
(
AirMapManagerLog
)
<<
"Weather Info: "
<<
_valid
<<
_icon
;
}
else
{
_valid
=
false
;
qCDebug
(
AirMapManagerLog
)
<<
"Request Weather Failed"
;
}
emit
weatherChanged
();
});
...
...
src/Airmap/AirspaceControl.qml
View file @
5982ad4c
...
...
@@ -71,7 +71,7 @@ Item {
}
AirspaceWeather
{
iconHeight
:
ScreenTools
.
defaultFontPixelWidth
*
2.5
visible
:
_activeVehicle
&&
_activeVehicle
.
airspaceController
.
hasWeather
visible
:
_activeVehicle
&&
_activeVehicle
.
airspaceController
.
weatherInfo
.
valid
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
...
...
@@ -141,7 +141,7 @@ Item {
height
:
1
}
AirspaceWeather
{
visible
:
_activeVehicle
&&
_activeVehicle
.
airspaceController
.
hasWeather
&&
showColapse
visible
:
_activeVehicle
&&
_activeVehicle
.
airspaceController
.
weatherInfo
.
valid
&&
showColapse
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
...
...
@@ -162,7 +162,7 @@ Item {
}
}
AirspaceWeather
{
visible
:
_activeVehicle
&&
_activeVehicle
.
airspaceController
.
hasWeather
&&
!
showColapse
visible
:
_activeVehicle
&&
_activeVehicle
.
airspaceController
.
weatherInfo
.
valid
&&
!
showColapse
anchors.right
:
parent
.
right
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
anchors.verticalCenter
:
parent
.
verticalCenter
...
...
src/Airmap/AirspaceWeather.qml
View file @
5982ad4c
...
...
@@ -18,7 +18,7 @@ Item {
property
color
_colorWhite
:
"
#ffffff
"
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
property
bool
_celcius
:
QGroundControl
.
settingsManager
.
unitsSettings
.
temperatureUnits
.
rawValue
===
UnitsSettings
.
TemperatureUnitsCelsius
property
int
_tempC
:
_activeVehicle
?
_activeVehicle
.
airspaceController
.
weatherTemp
:
0
property
int
_tempC
:
_activeVehicle
&&
_activeVehicle
.
airspaceController
.
weatherInfo
.
valid
?
_activeVehicle
.
airspaceController
.
weatherInfo
.
temperature
:
0
property
string
_tempS
:
(
_celcius
?
_tempC
:
_tempC
*
1.8
+
32
).
toFixed
(
0
)
+
(
_celcius
?
"
°C
"
:
"
°F
"
)
Row
{
id
:
weatherRow
...
...
@@ -27,15 +27,15 @@ Item {
width
:
height
height
:
iconHeight
sourceSize.height
:
height
source
:
_activeVehicle
?
_activeVehicle
.
airspaceController
.
weatherI
con
:
""
source
:
_activeVehicle
&&
_activeVehicle
.
airspaceController
.
weatherInfo
.
valid
?
_activeVehicle
.
airspaceController
.
weatherInfo
.
i
con
:
""
color
:
_colorWhite
visible
:
_activeVehicle
&&
_activeVehicle
.
airspaceController
.
hasWeather
visible
:
_activeVehicle
&&
_activeVehicle
.
airspaceController
.
weatherInfo
.
valid
anchors.verticalCenter
:
parent
.
verticalCenter
}
QGCLabel
{
text
:
_tempS
color
:
_colorWhite
visible
:
_activeVehicle
&&
_activeVehicle
.
airspaceController
.
hasWeather
visible
:
_activeVehicle
&&
_activeVehicle
.
airspaceController
.
weatherInfo
.
valid
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
...
...
src/AirspaceManagement/AirspaceManager.h
View file @
5982ad4c
...
...
@@ -81,7 +81,7 @@ public:
QmlObjectListModel
*
polygonRestrictions
()
{
return
&
_polygonRestrictions
;
}
QmlObjectListModel
*
circularRestrictions
()
{
return
&
_circleRestrictions
;
}
AirspaceWeatherInfoProvider
*
weatherInfo
()
{
return
_weather
;
}
AirspaceWeatherInfoProvider
*
weatherInfo
()
{
return
_weather
Provider
;
}
void
setToolbox
(
QGCToolbox
*
toolbox
)
override
;
...
...
@@ -109,5 +109,4 @@ private:
QTimer
_roiUpdateTimer
;
QGeoCoordinate
_roiCenter
;
double
_roiRadius
;
AirspaceWeatherInfoProvider
*
_weather
;
};
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