Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
d5044690
Unverified
Commit
d5044690
authored
May 20, 2019
by
Gus Grubba
Committed by
GitHub
May 20, 2019
Browse files
Merge pull request #7461 from patrickelectric/rc
Random corrections around the code
parents
cfb50c6d
666be8a1
Changes
9
Hide whitespace changes
Inline
Side-by-side
src/AutoPilotPlugins/APM/APMSensorsComponentController.cc
View file @
d5044690
...
...
@@ -782,7 +782,7 @@ void APMSensorsComponentController::_handleMagCalProgress(mavlink_message_t& mes
}
}
if
(
magCalProgress
.
compass_id
<
3
)
{
if
(
magCalProgress
.
compass_id
<
3
&&
compassCalCount
!=
0
)
{
// Each compass gets a portion of the overall progress
_rgCompassCalProgress
[
magCalProgress
.
compass_id
]
=
magCalProgress
.
completion_pct
/
compassCalCount
;
}
...
...
src/AutoPilotPlugins/AutoPilotPlugin.cc
View file @
d5044690
...
...
@@ -33,7 +33,7 @@ void AutoPilotPlugin::_recalcSetupComplete(void)
{
bool
newSetupComplete
=
true
;
for
(
const
QVariant
componentVariant
:
vehicleComponents
())
{
for
(
const
QVariant
&
componentVariant
:
vehicleComponents
())
{
VehicleComponent
*
component
=
qobject_cast
<
VehicleComponent
*>
(
qvariant_cast
<
QObject
*>
(
componentVariant
));
if
(
component
)
{
if
(
!
component
->
setupComplete
())
{
...
...
src/Camera/QGCCameraControl.cc
View file @
d5044690
...
...
@@ -1153,7 +1153,7 @@ void
QGCCameraControl
::
_requestAllParameters
()
{
//-- Reset receive list
for
(
QString
paramName
:
_paramIO
.
keys
())
{
for
(
const
QString
&
paramName
:
_paramIO
.
keys
())
{
if
(
_paramIO
[
paramName
])
{
_paramIO
[
paramName
]
->
setParamRequest
();
}
else
{
...
...
@@ -1391,7 +1391,7 @@ QGCCameraControl::_updateRanges(Fact* pFact)
}
//-- Parameter update requests
if
(
_requestUpdates
.
contains
(
pFact
->
name
()))
{
for
(
QString
param
:
_requestUpdates
[
pFact
->
name
()])
{
for
(
const
QString
&
param
:
_requestUpdates
[
pFact
->
name
()])
{
if
(
!
_updatesToRequest
.
contains
(
param
))
{
_updatesToRequest
<<
param
;
}
...
...
@@ -1406,7 +1406,7 @@ QGCCameraControl::_updateRanges(Fact* pFact)
void
QGCCameraControl
::
_requestParamUpdates
()
{
for
(
QString
param
:
_updatesToRequest
)
{
for
(
const
QString
&
param
:
_updatesToRequest
)
{
_paramIO
[
param
]
->
paramRequest
();
}
_updatesToRequest
.
clear
();
...
...
@@ -1831,7 +1831,6 @@ QGCCameraControl::_loadRanges(QDomNode option, const QString factName, QString p
for
(
int
i
=
0
;
i
<
parameterRanges
.
size
();
i
++
)
{
QString
param
;
QString
condition
;
QMap
<
QString
,
QVariant
>
rangeList
;
QDomNode
paramRange
=
parameterRanges
.
item
(
i
);
if
(
!
read_attribute
(
paramRange
,
kParameter
,
param
))
{
qCritical
()
<<
QString
(
"Malformed option range for parameter %1"
).
arg
(
factName
);
...
...
@@ -2003,7 +2002,7 @@ QGCCameraControl::_dataReady(QByteArray data)
void
QGCCameraControl
::
_paramDone
()
{
for
(
QString
param
:
_paramIO
.
keys
())
{
for
(
const
QString
&
param
:
_paramIO
.
keys
())
{
if
(
!
_paramIO
[
param
]
->
paramDone
())
{
return
;
}
...
...
src/QtLocationPlugin/QGeoTiledMappingManagerEngineQGC.cpp
View file @
d5044690
...
...
@@ -217,14 +217,14 @@ QGeoTiledMappingManagerEngineQGC::_setCache(const QVariantMap ¶meters)
cacheDir
=
parameters
.
value
(
QStringLiteral
(
"mapping.cache.directory"
)).
toString
();
else
{
cacheDir
=
getQGCMapEngine
()
->
getCachePath
();
if
(
!
QFileInfo
(
cacheDir
)
.
exists
()
)
{
if
(
!
QFileInfo
::
exists
(
cacheDir
))
{
if
(
!
QDir
::
root
().
mkpath
(
cacheDir
))
{
qWarning
()
<<
"Could not create mapping disk cache directory: "
<<
cacheDir
;
cacheDir
=
QDir
::
homePath
()
+
QStringLiteral
(
"/.qgcmapscache/"
);
}
}
}
if
(
!
QFileInfo
(
cacheDir
)
.
exists
()
)
{
if
(
!
QFileInfo
::
exists
(
cacheDir
))
{
if
(
!
QDir
::
root
().
mkpath
(
cacheDir
))
{
qWarning
()
<<
"Could not create mapping disk cache directory: "
<<
cacheDir
;
cacheDir
.
clear
();
...
...
src/Terrain/TerrainQuery.cc
View file @
d5044690
...
...
@@ -501,6 +501,7 @@ void TerrainTileManager::_terrainDone(QByteArray responseBytes, QNetworkReply::N
}
_tilesMutex
.
unlock
();
}
else
{
delete
terrainTile
;
qCWarning
(
TerrainQueryLog
)
<<
"Received invalid tile"
;
}
reply
->
deleteLater
();
...
...
src/VehicleSetup/PX4FirmwareUpgradeThread.cc
View file @
d5044690
...
...
@@ -119,7 +119,7 @@ void PX4FirmwareUpgradeThreadWorker::_findBoardOnce(void)
bool
PX4FirmwareUpgradeThreadWorker
::
_findBoardFromPorts
(
QGCSerialPortInfo
&
portInfo
,
QGCSerialPortInfo
::
BoardType_t
&
boardType
,
QString
&
boardName
)
{
for
(
QGCSerialPortInfo
info
:
QGCSerialPortInfo
::
availablePorts
())
{
for
(
const
QGCSerialPortInfo
&
info
:
QGCSerialPortInfo
::
availablePorts
())
{
info
.
getBoardInfo
(
boardType
,
boardName
);
qCDebug
(
FirmwareUpgradeVerboseLog
)
<<
"Serial Port --------------"
;
...
...
src/comm/LinkManager.cc
View file @
d5044690
...
...
@@ -518,7 +518,7 @@ void LinkManager::_updateAutoConnectLinks(void)
#endif
// Iterate Comm Ports
for
(
QGCSerialPortInfo
portInfo
:
portList
)
{
for
(
const
QGCSerialPortInfo
&
portInfo
:
portList
)
{
qCDebug
(
LinkManagerVerboseLog
)
<<
"-----------------------------------------------------"
;
qCDebug
(
LinkManagerVerboseLog
)
<<
"portName: "
<<
portInfo
.
portName
();
qCDebug
(
LinkManagerVerboseLog
)
<<
"systemLocation: "
<<
portInfo
.
systemLocation
();
...
...
@@ -931,7 +931,7 @@ void LinkManager::_activeLinkCheck(void)
QSignalSpy
spy
(
link
,
SIGNAL
(
bytesReceived
(
LinkInterface
*
,
QByteArray
)));
if
(
spy
.
wait
(
100
))
{
QList
<
QVariant
>
arguments
=
spy
.
takeFirst
();
if
(
arguments
[
1
].
value
<
Q
ByteArray
>
().
contains
(
"nsh>"
))
{
if
(
arguments
[
1
].
to
ByteArray
().
contains
(
"nsh>"
))
{
foundNSHPrompt
=
true
;
}
}
...
...
src/comm/MAVLinkProtocol.cc
View file @
d5044690
...
...
@@ -461,7 +461,7 @@ void MAVLinkProtocol::checkForLostLogFiles(void)
QFileInfoList
fileInfoList
=
tempDir
.
entryInfoList
(
QStringList
(
filter
),
QDir
::
Files
);
//qDebug() << "Orphaned log file count" << fileInfoList.count();
for
(
const
QFileInfo
fileInfo
:
fileInfoList
)
{
for
(
const
QFileInfo
&
fileInfo
:
fileInfoList
)
{
//qDebug() << "Orphaned log file" << fileInfo.filePath();
if
(
fileInfo
.
size
()
==
0
)
{
// Delete all zero length files
...
...
src/comm/UDPLink.cc
View file @
d5044690
...
...
@@ -55,7 +55,6 @@ static QString get_ip_address(const QString& address)
if
(
info
.
error
()
==
QHostInfo
::
NoError
)
{
QList
<
QHostAddress
>
hostAddresses
=
info
.
addresses
();
QHostAddress
address
;
for
(
int
i
=
0
;
i
<
hostAddresses
.
size
();
i
++
)
{
// Exclude all IPv6 addresses
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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