From 6157344e1b2d31b8a0b674bfedd9a60510062561 Mon Sep 17 00:00:00 2001 From: tstellanova Date: Tue, 6 Aug 2013 08:54:27 -0700 Subject: [PATCH] more comms refactoring --- src/uas/QGCUASParamManager.cc | 6 ++++-- src/uas/QGCUASParamManager.h | 2 +- src/ui/QGCParamWidget.cc | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/uas/QGCUASParamManager.cc b/src/uas/QGCUASParamManager.cc index 2bbe1fb61..af62e3916 100644 --- a/src/uas/QGCUASParamManager.cc +++ b/src/uas/QGCUASParamManager.cc @@ -43,10 +43,12 @@ void QGCUASParamManager::requestParameterList() } paramDataModel->forgetAllOnboardParameters(); - received.clear(); + // Clear transmission state - transmissionListMode = true; + receivedParamsList.clear(); transmissionListSizeKnown.clear(); + + transmissionListMode = true; foreach (int key, transmissionMissingPackets.keys()) { transmissionMissingPackets.value(key)->clear(); diff --git a/src/uas/QGCUASParamManager.h b/src/uas/QGCUASParamManager.h index c6351a6c3..f16be9f7b 100644 --- a/src/uas/QGCUASParamManager.h +++ b/src/uas/QGCUASParamManager.h @@ -62,7 +62,7 @@ protected: UASParameterDataModel* paramDataModel;///< Shared data model of parameters // Communications management - QVector received; ///< Successfully received parameters + QVector receivedParamsList; ///< Successfully received parameters QMap* > transmissionMissingPackets; ///< Missing packets QMap* > transmissionMissingWriteAckPackets; ///< Missing write ACK packets bool transmissionListMode; ///< Currently requesting list diff --git a/src/ui/QGCParamWidget.cc b/src/ui/QGCParamWidget.cc index 40fc49195..1cb641fdd 100644 --- a/src/ui/QGCParamWidget.cc +++ b/src/ui/QGCParamWidget.cc @@ -764,6 +764,7 @@ void QGCParamWidget::setParameters() { QMap::iterator j; for (j = comp->begin(); j != comp->end(); ++j) { + //TODO mavlink command for "set parameter list" ? setParameter(compid, j.key(), j.value()); parametersSent++; } -- 2.22.0