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
9dcfa761
Commit
9dcfa761
authored
Aug 14, 2017
by
Gus Grubba
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'DNSLookup' of
https://github.com/mavlink/qgroundcontrol
into cameraControl
parents
9e04bc16
09fcec33
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
60 additions
and
21 deletions
+60
-21
QGCSetup.pri
QGCSetup.pri
+2
-0
FactTextField.qml
src/FactSystem/FactControls/FactTextField.qml
+1
-1
QGCInstrumentWidgetAlternate.qml
src/FlightMap/Widgets/QGCInstrumentWidgetAlternate.qml
+2
-1
AppMessages.cc
src/QmlControls/AppMessages.cc
+2
-2
AppMessages.h
src/QmlControls/AppMessages.h
+1
-1
AppMessages.qml
src/QmlControls/AppMessages.qml
+1
-1
ParameterEditorDialog.qml
src/QmlControls/ParameterEditorDialog.qml
+17
-4
QGCTileCacheWorker.cpp
src/QtLocationPlugin/QGCTileCacheWorker.cpp
+22
-6
QGCTileCacheWorker.h
src/QtLocationPlugin/QGCTileCacheWorker.h
+5
-0
OfflineMap.qml
src/QtLocationPlugin/QMLControl/OfflineMap.qml
+7
-5
No files found.
QGCSetup.pri
View file @
9dcfa761
...
...
@@ -114,6 +114,8 @@ LinuxBuild {
libQt5PrintSupport.so.5 \
libQt5Qml.so.5 \
libQt5Quick.so.5 \
libQt5QuickControls2.so.5 \
libQt5QuickTemplates2.so.5 \
libQt5QuickWidgets.so.5 \
libQt5SerialPort.so.5 \
libQt5Sql.so.5 \
...
...
src/FactSystem/FactControls/FactTextField.qml
View file @
9dcfa761
...
...
@@ -36,7 +36,7 @@ QGCTextField {
fact
.
value
=
text
}
else
{
_validateString
=
text
qgcView
.
showDialog
(
validationErrorDialogComponent
,
qsTr
(
"
Invalid Value
"
),
qgcView
.
showDialogDefaultWidth
,
StandardButton
.
Save
)
qgcView
.
showDialog
(
validationErrorDialogComponent
,
qsTr
(
"
Invalid Value
"
),
qgcView
.
showDialogDefaultWidth
,
StandardButton
.
Save
|
StandardButton
.
Cancel
)
}
}
else
{
fact
.
value
=
text
...
...
src/FlightMap/Widgets/QGCInstrumentWidgetAlternate.qml
View file @
9dcfa761
...
...
@@ -27,6 +27,7 @@ Rectangle {
border.width
:
1
border.color
:
_isSatellite
?
qgcPal
.
mapWidgetBorderLight
:
qgcPal
.
mapWidgetBorderDark
property
var
_qgcView
:
qgcView
property
real
_innerRadius
:
(
width
-
(
_topBottomMargin
*
3
))
/
4
property
real
_outerRadius
:
_innerRadius
+
_topBottomMargin
property
real
_defaultSize
:
ScreenTools
.
defaultFontPixelHeight
*
(
9
)
...
...
@@ -94,7 +95,7 @@ Rectangle {
anchors.margins
:
1
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
qgcView
:
root
.
qgcView
qgcView
:
root
.
_
qgcView
textColor
:
qgcPal
.
text
backgroundColor
:
qgcPal
.
window
maxHeight
:
_availableValueHeight
...
...
src/QmlControls/AppMessages.cc
View file @
9dcfa761
...
...
@@ -60,14 +60,14 @@ AppLogModel::AppLogModel() : QStringListModel()
connect
(
this
,
&
AppLogModel
::
emitLog
,
this
,
&
AppLogModel
::
threadsafeLog
,
contype
);
}
void
AppLogModel
::
writeMessages
(
const
Q
Url
dest_file
)
void
AppLogModel
::
writeMessages
(
const
Q
String
dest_file
)
{
const
QString
writebuffer
(
stringList
().
join
(
'\n'
).
append
(
'\n'
));
QtConcurrent
::
run
([
dest_file
,
writebuffer
]
{
emit
debug_model
->
writeStarted
();
bool
success
=
false
;
QFile
file
(
dest_file
.
toLocalFile
()
);
QFile
file
(
dest_file
);
if
(
file
.
open
(
QIODevice
::
WriteOnly
|
QIODevice
::
Text
))
{
QTextStream
out
(
&
file
);
out
<<
writebuffer
;
...
...
src/QmlControls/AppMessages.h
View file @
9dcfa761
...
...
@@ -23,7 +23,7 @@ class AppLogModel : public QStringListModel
{
Q_OBJECT
public:
Q_INVOKABLE
void
writeMessages
(
const
Q
Url
dest_file
);
Q_INVOKABLE
void
writeMessages
(
const
Q
String
dest_file
);
static
void
log
(
const
QString
message
);
signals:
...
...
src/QmlControls/AppMessages.qml
View file @
9dcfa761
...
...
@@ -118,7 +118,7 @@ QGCView {
selectExisting
:
false
title
:
qsTr
(
"
Select log save file
"
)
onAcceptedForSave
:
{
debugMessageModel
.
writeMessages
(
file
Url
);
debugMessageModel
.
writeMessages
(
file
);
visible
=
false
;
}
}
...
...
src/QmlControls/ParameterEditorDialog.qml
View file @
9dcfa761
...
...
@@ -11,6 +11,7 @@ import QtQuick 2.3
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Layouts
1.2
import
QGroundControl
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Controllers
1.0
...
...
@@ -28,6 +29,9 @@ QGCViewDialog {
property
real
_editFieldWidth
:
ScreenTools
.
defaultFontPixelWidth
*
20
property
bool
_longDescriptionAvailable
:
fact
.
longDescription
!=
""
property
bool
_editingParameter
:
fact
.
componentId
!=
0
property
bool
_allowForceSave
:
QGroundControl
.
corePlugin
.
showAdvancedUI
||
!
_editingParameter
property
bool
_allowDefaultReset
:
fact
.
defaultValueAvailable
&&
(
QGroundControl
.
corePlugin
.
showAdvancedUI
||
!
_editingParameter
)
ParameterEditorController
{
id
:
controller
;
factPanel
:
parent
}
...
...
@@ -49,11 +53,18 @@ QGCViewDialog {
hideDialog
()
}
else
{
validationError
.
text
=
errorString
forceSave
.
visible
=
true
if
(
_allowForceSave
)
{
forceSave
.
visible
=
true
}
}
}
}
function
reject
()
{
fact
.
valueChanged
(
fact
.
value
)
hideDialog
();
}
function
bitmaskValue
()
{
var
value
=
0
;
for
(
var
i
=
0
;
i
<
fact
.
bitmaskValues
.
length
;
++
i
)
{
...
...
@@ -68,7 +79,9 @@ QGCViewDialog {
Component.onCompleted
:
{
if
(
validate
)
{
validationError
.
text
=
fact
.
validate
(
validateValue
,
false
/* convertOnly */
)
forceSave
.
visible
=
true
if
(
_allowForceSave
)
{
forceSave
.
visible
=
true
}
}
}
...
...
@@ -109,7 +122,7 @@ QGCViewDialog {
QGCButton
{
anchors.baseline
:
valueField
.
baseline
visible
:
fact
.
defaultValueAvailable
visible
:
_allowDefaultReset
text
:
qsTr
(
"
Reset to default
"
)
onClicked
:
{
...
...
@@ -195,7 +208,7 @@ QGCViewDialog {
QGCLabel
{
text
:
qsTr
(
"
Default:
"
)
+
fact
.
defaultValueString
visible
:
fact
.
defaultValueAvailable
visible
:
_allowDefaultReset
}
}
...
...
src/QtLocationPlugin/QGCTileCacheWorker.cpp
View file @
9dcfa761
...
...
@@ -52,6 +52,7 @@ QGCCacheWorker::QGCCacheWorker()
,
_defaultCount
(
0
)
,
_lastUpdate
(
0
)
,
_updateTimeout
(
SHORT_TIMEOUT
)
,
_hostLookupID
(
0
)
{
}
...
...
@@ -73,6 +74,9 @@ QGCCacheWorker::setDatabaseFile(const QString& path)
void
QGCCacheWorker
::
quit
()
{
if
(
_hostLookupID
)
{
QHostInfo
::
abortHostLookup
(
_hostLookupID
);
}
_mutex
.
lock
();
while
(
_taskQueue
.
count
())
{
QGCMapTask
*
task
=
_taskQueue
.
dequeue
();
...
...
@@ -1055,12 +1059,24 @@ QGCCacheWorker::_createDB(QSqlDatabase* db, bool createDefault)
void
QGCCacheWorker
::
_testInternet
()
{
QTcpSocket
socket
;
socket
.
connectToHost
(
"www.github.com"
,
80
);
if
(
socket
.
waitForConnected
(
2500
))
{
qCDebug
(
QGCTileCacheLog
)
<<
"Yes Internet Access"
;
emit
internetStatus
(
true
);
return
;
if
(
!
_hostLookupID
)
{
_hostLookupID
=
QHostInfo
::
lookupHost
(
"www.github.com"
,
this
,
SLOT
(
_lookupReady
(
QHostInfo
)));
}
}
//-----------------------------------------------------------------------------
void
QGCCacheWorker
::
_lookupReady
(
QHostInfo
info
)
{
_hostLookupID
=
0
;
if
(
info
.
error
()
==
QHostInfo
::
NoError
&&
info
.
addresses
().
size
())
{
QTcpSocket
socket
;
socket
.
connectToHost
(
info
.
addresses
().
first
(),
80
);
if
(
socket
.
waitForConnected
(
2000
))
{
qCDebug
(
QGCTileCacheLog
)
<<
"Yes Internet Access"
;
emit
internetStatus
(
true
);
return
;
}
}
qWarning
()
<<
"No Internet Access"
;
emit
internetStatus
(
false
);
...
...
src/QtLocationPlugin/QGCTileCacheWorker.h
View file @
9dcfa761
...
...
@@ -26,6 +26,7 @@
#include <QWaitCondition>
#include <QMutexLocker>
#include <QtSql/QSqlDatabase>
#include <QHostInfo>
#include "QGCLoggingCategory.h"
...
...
@@ -49,6 +50,9 @@ public:
protected:
void
run
();
private
slots
:
void
_lookupReady
(
QHostInfo
info
);
private:
void
_saveTile
(
QGCMapTask
*
mtask
);
void
_getTile
(
QGCMapTask
*
mtask
);
...
...
@@ -93,6 +97,7 @@ private:
quint32
_defaultCount
;
time_t
_lastUpdate
;
int
_updateTimeout
;
int
_hostLookupID
;
};
#endif // QGC_TILE_CACHE_WORKER_H
src/QtLocationPlugin/QMLControl/OfflineMap.qml
View file @
9dcfa761
...
...
@@ -331,12 +331,14 @@ QGCView {
id
:
panel
anchors.fill
:
parent
Map
{
id
:
_map
anchors.fill
:
parent
center
:
QGroundControl
.
flightMapPosition
visible
:
false
FlightMap
{
id
:
_map
anchors.fill
:
parent
visible
:
false
allowGCSLocationCenter
:
true
allowVehicleLocationCenter
:
false
gesture.flickDeceleration
:
3000
mapName
:
"
OfflineMap
"
property
bool
isSatelliteMap
:
activeMapType
.
name
.
indexOf
(
"
Satellite
"
)
>
-
1
||
activeMapType
.
name
.
indexOf
(
"
Hybrid
"
)
>
-
1
...
...
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