Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
cdb33d12
Commit
cdb33d12
authored
Aug 08, 2013
by
tstellanova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debugging premature timeouts of param list recv
parent
13ecf819
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
159 additions
and
240 deletions
+159
-240
UAS.cc
src/uas/UAS.cc
+3
-1
UASParameterCommsMgr.cc
src/uas/UASParameterCommsMgr.cc
+149
-145
UASParameterCommsMgr.h
src/uas/UASParameterCommsMgr.h
+7
-0
QGCParamWidget.cc
src/ui/QGCParamWidget.cc
+0
-94
No files found.
src/uas/UAS.cc
View file @
cdb33d12
...
...
@@ -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
()
...
...
src/uas/UASParameterCommsMgr.cc
View file @
cdb33d12
This diff is collapsed.
Click to expand it.
src/uas/UASParameterCommsMgr.h
View file @
cdb33d12
...
...
@@ -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
);
...
...
src/ui/QGCParamWidget.cc
View file @
cdb33d12
...
...
@@ -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
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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