Unverified Commit 0dbc3ef9 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #6936 from patrickelectric/remove_unused

Remove random unused variables
parents 0c382c9a 850ad3aa
...@@ -56,9 +56,7 @@ void PX4AdvancedFlightModesController::_init(void) ...@@ -56,9 +56,7 @@ void PX4AdvancedFlightModesController::_init(void)
rcMinParam = QString("RC%1_MIN").arg(channel+1); rcMinParam = QString("RC%1_MIN").arg(channel+1);
rcMaxParam = QString("RC%1_MAX").arg(channel+1); rcMaxParam = QString("RC%1_MAX").arg(channel+1);
rcRevParam = QString("RC%1_REV").arg(channel+1); rcRevParam = QString("RC%1_REV").arg(channel+1);
QVariant value;
_rgRCMin[channel] = getParameterFact(FactSystem::defaultComponentId, rcMinParam)->rawValue().toInt(); _rgRCMin[channel] = getParameterFact(FactSystem::defaultComponentId, rcMinParam)->rawValue().toInt();
_rgRCMax[channel] = getParameterFact(FactSystem::defaultComponentId, rcMaxParam)->rawValue().toInt(); _rgRCMax[channel] = getParameterFact(FactSystem::defaultComponentId, rcMaxParam)->rawValue().toInt();
...@@ -220,8 +218,6 @@ void PX4AdvancedFlightModesController::_rcChannelsChanged(int channelCount, int ...@@ -220,8 +218,6 @@ void PX4AdvancedFlightModesController::_rcChannelsChanged(int channelCount, int
double PX4AdvancedFlightModesController::_switchLiveRange(const QString& param) double PX4AdvancedFlightModesController::_switchLiveRange(const QString& param)
{ {
QVariant value;
int channel = getParameterFact(-1, param)->rawValue().toInt(); int channel = getParameterFact(-1, param)->rawValue().toInt();
if (channel == 0) { if (channel == 0) {
return 0.0; return 0.0;
......
...@@ -90,7 +90,6 @@ void PX4AirframeLoader::loadAirframeMetaData(void) ...@@ -90,7 +90,6 @@ void PX4AirframeLoader::loadAirframeMetaData(void)
QString airframeGroup; QString airframeGroup;
QString image; QString image;
QString errorString;
int xmlState = XmlStateNone; int xmlState = XmlStateNone;
while (!xml.atEnd()) { while (!xml.atEnd()) {
......
...@@ -43,7 +43,6 @@ bool PowerComponent::requiresSetup(void) const ...@@ -43,7 +43,6 @@ bool PowerComponent::requiresSetup(void) const
bool PowerComponent::setupComplete(void) const bool PowerComponent::setupComplete(void) const
{ {
QVariant cvalue, evalue, nvalue;
return _vehicle->parameterManager()->getParameter(FactSystem::defaultComponentId, "BAT_V_CHARGED")->rawValue().toFloat() != 0.0f && return _vehicle->parameterManager()->getParameter(FactSystem::defaultComponentId, "BAT_V_CHARGED")->rawValue().toFloat() != 0.0f &&
_vehicle->parameterManager()->getParameter(FactSystem::defaultComponentId, "BAT_V_EMPTY")->rawValue().toFloat() != 0.0f && _vehicle->parameterManager()->getParameter(FactSystem::defaultComponentId, "BAT_V_EMPTY")->rawValue().toFloat() != 0.0f &&
_vehicle->parameterManager()->getParameter(FactSystem::defaultComponentId, "BAT_N_CELLS")->rawValue().toInt() != 0; _vehicle->parameterManager()->getParameter(FactSystem::defaultComponentId, "BAT_N_CELLS")->rawValue().toInt() != 0;
......
...@@ -140,7 +140,6 @@ void PowerComponentController::_handleUASTextMessage(int uasId, int compId, int ...@@ -140,7 +140,6 @@ void PowerComponentController::_handleUASTextMessage(int uasId, int compId, int
return; return;
} }
QString busCompletePrefix("bus conf done:");
if (text.startsWith(calCompletePrefix)) { if (text.startsWith(calCompletePrefix)) {
_stopBusConfig(); _stopBusConfig();
emit calibrationSuccess(_warningMessages); emit calibrationSuccess(_warningMessages);
......
...@@ -154,7 +154,6 @@ void APMParameterMetaData::loadParameterFactMetaDataFile(const QString& metaData ...@@ -154,7 +154,6 @@ void APMParameterMetaData::loadParameterFactMetaDataFile(const QString& metaData
return; return;
} }
QString errorString;
bool badMetaData = true; bool badMetaData = true;
QStack<int> xmlState; QStack<int> xmlState;
APMFactMetaDataRaw* rawMetaData = NULL; APMFactMetaDataRaw* rawMetaData = NULL;
......
...@@ -285,23 +285,20 @@ void QGCJSBSimLink::readBytes() ...@@ -285,23 +285,20 @@ void QGCJSBSimLink::readBytes()
if (s > maxLength) std::cerr << __FILE__ << __LINE__ << " UDP datagram overflow, allowed to read less bytes than datagram size" << std::endl; if (s > maxLength) std::cerr << __FILE__ << __LINE__ << " UDP datagram overflow, allowed to read less bytes than datagram size" << std::endl;
socket->readDatagram(data, maxLength, &sender, &senderPort); socket->readDatagram(data, maxLength, &sender, &senderPort);
QByteArray b(data, s); /*
// Print string // Print string
// QString state(b); QByteArray b(data, s);
QString state(b);
// // Parse string
// float roll, pitch, yaw, rollspeed, pitchspeed, yawspeed;
// double lat, lon, alt;
// double vx, vy, vz, xacc, yacc, zacc;
// // Send updated state
// emit hilStateChanged(QGC::groundTimeUsecs(), roll, pitch, yaw, rollspeed,
// pitchspeed, yawspeed, lat, lon, alt,
// vx, vy, vz, xacc, yacc, zacc);
// Parse string
float roll, pitch, yaw, rollspeed, pitchspeed, yawspeed;
double lat, lon, alt;
double vx, vy, vz, xacc, yacc, zacc;
// Send updated state
emit hilStateChanged(QGC::groundTimeUsecs(), roll, pitch, yaw, rollspeed,
pitchspeed, yawspeed, lat, lon, alt, vx, vy, vz, xacc, yacc, zacc);
*/
// Echo data for debugging purposes // Echo data for debugging purposes
std::cerr << __FILE__ << __LINE__ << "Received datagram:" << std::endl; std::cerr << __FILE__ << __LINE__ << "Received datagram:" << std::endl;
......
...@@ -253,7 +253,6 @@ static QString get_ip_address(const QString& address) ...@@ -253,7 +253,6 @@ static QString get_ip_address(const QString& address)
if (info.error() == QHostInfo::NoError) if (info.error() == QHostInfo::NoError)
{ {
QList<QHostAddress> hostAddresses = info.addresses(); QList<QHostAddress> hostAddresses = info.addresses();
QHostAddress address;
for (int i = 0; i < hostAddresses.size(); i++) for (int i = 0; i < hostAddresses.size(); i++)
{ {
// Exclude all IPv6 addresses // Exclude all IPv6 addresses
......
...@@ -181,9 +181,6 @@ void UAS::receiveMessage(mavlink_message_t message) ...@@ -181,9 +181,6 @@ void UAS::receiveMessage(mavlink_message_t message)
// and we already got one attitude packet // and we already got one attitude packet
if (message.sysid == uasId && (!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;
bool multiComponentSourceDetected = false; bool multiComponentSourceDetected = false;
bool wrongComponent = false; bool wrongComponent = false;
......
...@@ -227,9 +227,6 @@ Again: ...@@ -227,9 +227,6 @@ Again:
} }
if (childItem) { if (childItem) {
// Process this item
QString text = childItem->text(0);
// Move to the next item for processing at this level // Move to the next item for processing at this level
_walkIndexStack.last() = ++walkIndex; _walkIndexStack.last() = ++walkIndex;
......
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