Commit d8f298cb authored by Gus Grubba's avatar Gus Grubba

Make Internet test optional.

parent 07d286c9
......@@ -741,7 +741,9 @@ void QGCApplication::qmlAttemptWindowClose()
bool QGCApplication::isInternetAvailable()
{
return getQGCMapEngine()->isInternetActive();
if(_toolbox->settingsManager()->appSettings()->checkInternet()->rawValue().toBool())
return getQGCMapEngine()->isInternetActive();
return true;
}
void QGCApplication::_checkForNewVersion()
......
......@@ -543,7 +543,10 @@ QGCCreateTileSetTask::~QGCCreateTileSetTask()
void
QGCMapEngine::testInternet()
{
getQGCMapEngine()->addTask(new QGCTestInternetTask());
if(qgcApp()->toolbox()->settingsManager()->appSettings()->checkInternet()->rawValue().toBool())
getQGCMapEngine()->addTask(new QGCTestInternetTask());
else
_internetStatus(true);
}
//-----------------------------------------------------------------------------
......
......@@ -79,7 +79,7 @@ QGeoTileFetcherQGC::getTileImage(const QGeoTileSpec &spec)
return new QGeoTiledMapReplyQGC(_networkManager, request, spec);
}
else {
return NULL;
return nullptr;
}
}
......
......@@ -96,6 +96,13 @@
"type": "bool",
"defaultValue": false
},
{
"name": "checkInternet",
"shortDescription": "Check Internet connection",
"longDescription": "Check Internet connection before accessing Internet resources.",
"type": "bool",
"defaultValue": true
},
{
"name": "virtualJoystick",
"shortDescription": "Show virtual joystick",
......
......@@ -77,6 +77,7 @@ DECLARE_SETTINGSFACT(AppSettings, defaultMissionItemAltitude)
DECLARE_SETTINGSFACT(AppSettings, telemetrySave)
DECLARE_SETTINGSFACT(AppSettings, telemetrySaveNotArmed)
DECLARE_SETTINGSFACT(AppSettings, audioMuted)
DECLARE_SETTINGSFACT(AppSettings, checkInternet)
DECLARE_SETTINGSFACT(AppSettings, virtualJoystick)
DECLARE_SETTINGSFACT(AppSettings, virtualJoystickCentralized)
DECLARE_SETTINGSFACT(AppSettings, appFontPointSize)
......
......@@ -32,6 +32,7 @@ public:
DEFINE_SETTINGFACT(telemetrySave)
DEFINE_SETTINGFACT(telemetrySaveNotArmed)
DEFINE_SETTINGFACT(audioMuted)
DEFINE_SETTINGFACT(checkInternet)
DEFINE_SETTINGFACT(virtualJoystick)
DEFINE_SETTINGFACT(virtualJoystickCentralized)
DEFINE_SETTINGFACT(appFontPointSize)
......
......@@ -255,6 +255,13 @@ Rectangle {
property Fact _audioMuted: QGroundControl.settingsManager.appSettings.audioMuted
}
FactCheckBox {
text: qsTr("Check for Internet connection")
fact: _checkInternet
visible: _checkInternet.visible
property Fact _checkInternet: QGroundControl.settingsManager.appSettings.checkInternet
}
FactCheckBox {
text: qsTr("AutoLoad Missions")
fact: _autoLoad
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment