Commit cdb33d12 authored by tstellanova's avatar tstellanova

debugging premature timeouts of param list recv

parent 13ecf819
......@@ -2259,7 +2259,9 @@ void UAS::requestParameters()
mavlink_message_t msg;
mavlink_msg_param_request_list_pack(mavlink->getSystemId(), mavlink->getComponentId(), &msg, this->getUASID(), MAV_COMP_ID_ALL);
sendMessage(msg);
qDebug() << __FILE__ << ":" << __LINE__ << "LOADING PARAM LIST";
QDateTime time = QDateTime::currentDateTime();
qDebug() << __FILE__ << ":" << __LINE__ << time.toString() << "LOADING PARAM LIST";
}
void UAS::writeParametersToStorage()
......
This diff is collapsed.
......@@ -38,6 +38,13 @@ protected:
/** @brief Load settings that control eg retransmission timeouts */
void loadParamCommsSettings();
/** @brief clear transmissionMissingPackets and transmissionMissingWriteAckPackets */
void clearRetransmissionLists();
void resendReadWriteRequests();
void emitParameterChanged(int compId, const QString& key, QVariant& value);
signals:
void parameterChanged(int component, QString parameter, QVariant value);
void parameterChanged(int component, int parameterIndex, QVariant value);
......
......@@ -450,100 +450,6 @@ void QGCParamWidget::writeParameters()
}
}
/**
* @param component the subsystem which has the parameter
* @param parameterName name of the parameter, as delivered by the system
* @param value value of the parameter
*/
//void QGCParamWidget::setParameter(int component, QString parameterName, QVariant value)
//{
// if (parameterName.isEmpty()) {
// return;
// }
// double dblValue = value.toDouble();
// if (paramDataModel->isValueLessThanParamMin(parameterName,dblValue)) {
// statusLabel->setText(tr("REJ. %1, %2 < min").arg(parameterName).arg(dblValue));
// return;
// }
// if (paramDataModel->isValueGreaterThanParamMax(parameterName,dblValue)) {
// statusLabel->setText(tr("REJ. %1, %2 > max").arg(parameterName).arg(dblValue));
// return;
// }
// QVariant onboardVal;
// paramDataModel->getOnboardParameterValue(component,parameterName,onboardVal);
// if (onboardVal == value) {
// statusLabel->setText(tr("REJ. %1 already %2").arg(parameterName).arg(dblValue));
// return;
// }
// //int paramType = (int)onboardParameters.value(component)->value(parameterName).type();
// int paramType = (int)value.type();
// switch (paramType)
// {
// case QVariant::Char:
// {
// QVariant fixedValue(QChar((unsigned char)value.toInt()));
// emit parameterChanged(component, parameterName, fixedValue);
// //qDebug() << "PARAM WIDGET SENT:" << fixedValue;
// }
// break;
// case QVariant::Int:
// {
// QVariant fixedValue(value.toInt());
// emit parameterChanged(component, parameterName, fixedValue);
// //qDebug() << "PARAM WIDGET SENT:" << fixedValue;
// }
// break;
// case QVariant::UInt:
// {
// QVariant fixedValue(value.toUInt());
// emit parameterChanged(component, parameterName, fixedValue);
// //qDebug() << "PARAM WIDGET SENT:" << fixedValue;
// }
// break;
// case QMetaType::Float:
// {
// QVariant fixedValue(value.toFloat());
// emit parameterChanged(component, parameterName, fixedValue);
// //qDebug() << "PARAM WIDGET SENT:" << fixedValue;
// }
// break;
// default:
// qCritical() << "ABORTED PARAM SEND, NO VALID QVARIANT TYPE";
// return;
// }
// // Wait for parameter to be written back
// // mark it therefore as missing
// if (!transmissionMissingWriteAckPackets.contains(component))
// {
// transmissionMissingWriteAckPackets.insert(component, new QMap<QString, QVariant>());
// }
// // Insert it in missing write ACK list
// transmissionMissingWriteAckPackets.value(component)->insert(parameterName, value);
// // Set timeouts
// if (transmissionActive)
// {
// transmissionTimeout += rewriteTimeout;
// }
// else
// {
// quint64 newTransmissionTimeout = QGC::groundTimeMilliseconds() + rewriteTimeout;
// if (newTransmissionTimeout > transmissionTimeout)
// {
// transmissionTimeout = newTransmissionTimeout;
// }
// transmissionActive = true;
// }
// // Enable guard / reset timeouts
// paramCommsMgr->setRetransmissionGuardEnabled(true); //TODO
//}
void QGCParamWidget::readParameters()
{
......
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