Unverified Commit c6c5c403 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #6405 from patrickelectric/corrections_2

Some random corrections around the code
parents 01c49e6e 65668635
......@@ -68,7 +68,7 @@ void APMFlightModesComponentController::_rcChannelsChanged(int channelCount, int
for (int i=0; i<6; i++) {
_rgChannelOptionEnabled[i] = QVariant(false);
channelValue = pwmValues[i+6];
if (channelValue != -1 && channelValue > 1800) {
if (channelValue > 1800) {
_rgChannelOptionEnabled[i] = QVariant(true);
}
}
......
......@@ -322,7 +322,7 @@ bool FixedWingLandingComplexItem::scanForItem(QmlObjectListModel* visualItems, V
}
MissionItem& missionItemDoLandStart = item->missionItem();
if (missionItemDoLandStart.command() != MAV_CMD_DO_LAND_START ||
missionItemDoLandStart.param1() != 0 || missionItemDoLandStart.param2() != 0 || missionItemDoLandStart.param3() != 0 || missionItemDoLandStart.param4() != 0|| missionItemDoLandStart.param5() != 0|| missionItemDoLandStart.param6() != 0|| missionItemDoLandStart.param6() != 0) {
missionItemDoLandStart.param1() != 0 || missionItemDoLandStart.param2() != 0 || missionItemDoLandStart.param3() != 0 || missionItemDoLandStart.param4() != 0|| missionItemDoLandStart.param5() != 0|| missionItemDoLandStart.param6() != 0) {
return false;
}
......
......@@ -712,7 +712,7 @@ QString PlanManager::_ackTypeToString(AckType_t ackType)
QString PlanManager::_lastMissionReqestString(MAV_MISSION_RESULT result)
{
if (_lastMissionRequest != -1 && _lastMissionRequest >= 0 && _lastMissionRequest < _writeMissionItems.count()) {
if (_lastMissionRequest >= 0 && _lastMissionRequest < _writeMissionItems.count()) {
MissionItem* item = _writeMissionItems[_lastMissionRequest];
switch (result) {
......
......@@ -244,8 +244,8 @@ BluetoothConfiguration::BluetoothConfiguration(const QString& name)
BluetoothConfiguration::BluetoothConfiguration(BluetoothConfiguration* source)
: LinkConfiguration(source)
, _deviceDiscover(NULL)
, _device(source->device())
{
_device = source->device();
}
BluetoothConfiguration::~BluetoothConfiguration()
......
......@@ -544,15 +544,9 @@ bool QGCFlightGearLink::parseUIArguments(QString uiArgs, QStringList& argList)
} else if (chr == '\"') {
// Flip the state of being in a quoted string. Note that we specifically do not add the
// quote to the string. This replicates standards command line parsing behaviour.
if (chr == '\"') {
inQuotedString = !inQuotedString;
}
inQuotedString = !inQuotedString;
previousSpace = false;
} else {
// Flip the state of being in a quoted string
if (chr == '\"') {
inQuotedString = !inQuotedString;
}
previousSpace = false;
currentArg += chr;
}
......
......@@ -184,7 +184,7 @@ void UAS::receiveMessage(mavlink_message_t message)
// Only accept messages from this system (condition 1)
// and only then if a) attitudeStamped is disabled OR b) attitudeStamped is enabled
// and we already got one attitude packet
if (message.sysid == uasId && (!attitudeStamped || (attitudeStamped && (lastAttitude != 0)) || message.msgid == MAVLINK_MSG_ID_ATTITUDE))
if (message.sysid == uasId && (!attitudeStamped || lastAttitude != 0 || message.msgid == MAVLINK_MSG_ID_ATTITUDE))
{
QString uasState;
QString stateDescription;
......
......@@ -82,8 +82,6 @@ void QGCMAVLinkLogPlayer::_selectLogFileForPlayback(void)
return;
}
LinkInterface* createConnectedLink(LinkConfiguration* config);
LogReplayLinkConfiguration* linkConfig = new LogReplayLinkConfiguration(QString("Log Replay"));
linkConfig->setLogFilename(logFilename);
linkConfig->setName(linkConfig->logFilenameShort());
......
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