Commit d862ec87 authored by tstellanova's avatar tstellanova

rm totalOnboardParameters

parent 3dd5866f
...@@ -8,7 +8,9 @@ ...@@ -8,7 +8,9 @@
QGCUASParamManager::QGCUASParamManager(UASInterface* uas, QWidget *parent) : QGCUASParamManager::QGCUASParamManager(UASInterface* uas, QWidget *parent) :
QWidget(parent), QWidget(parent),
mav(uas) mav(uas),
paramDataModel(NULL),
paramCommsMgr(NULL)
{ {
paramDataModel = uas->getParamDataModel(); paramDataModel = uas->getParamDataModel();
paramCommsMgr = uas->getParamCommsMgr(); paramCommsMgr = uas->getParamCommsMgr();
...@@ -18,25 +20,6 @@ QGCUASParamManager::QGCUASParamManager(UASInterface* uas, QWidget *parent) : ...@@ -18,25 +20,6 @@ QGCUASParamManager::QGCUASParamManager(UASInterface* uas, QWidget *parent) :
loadParamMetaInfoCSV(); loadParamMetaInfoCSV();
// // Connect retransmission guard
// connect(this, SIGNAL(parameterUpdateRequested(int,QString)),
// this, SLOT(requestParameterUpdate(int,QString)));
// //TODO connect in paramCommsMgr instead
// connect(this, SIGNAL(parameterUpdateRequestedById(int,int)),
// mav, SLOT(requestParameter(int,int)));
// New parameters from UAS
void parameterUpdated(int compId, QString paramName, QVariant value);
// connect(uas, SIGNAL(parameterChanged(int,int,int,int,QString,QVariant)),
// this, SLOT(receivedParameterUpdate(int,int,int,int,QString,QVariant)));
} }
......
...@@ -11,7 +11,8 @@ ...@@ -11,7 +11,8 @@
UASParameterDataModel::UASParameterDataModel(QObject *parent) : UASParameterDataModel::UASParameterDataModel(QObject *parent) :
QObject(parent) QObject(parent)
{ {
onboardParameters.clear();
pendingParameters.clear();
} }
......
...@@ -14,7 +14,6 @@ public: ...@@ -14,7 +14,6 @@ public:
explicit UASParameterDataModel(QObject *parent = 0); explicit UASParameterDataModel(QObject *parent = 0);
int getTotalOnboardParams() { return totalOnboardParameters; }
//Parameter meta info //Parameter meta info
bool isParamMinKnown(const QString& param) { return paramMin.contains(param); } bool isParamMinKnown(const QString& param) { return paramMin.contains(param); }
virtual bool isValueLessThanParamMin(const QString& param, double dblVal); virtual bool isValueLessThanParamMin(const QString& param, double dblVal);
...@@ -97,7 +96,6 @@ protected: ...@@ -97,7 +96,6 @@ protected:
int uasId; ///< The UAS / MAV to which this data model pertains int uasId; ///< The UAS / MAV to which this data model pertains
QMap<int, QMap<QString, QVariant>* > pendingParameters; ///< Changed values that have not yet been transmitted to the UAS, by component ID QMap<int, QMap<QString, QVariant>* > pendingParameters; ///< Changed values that have not yet been transmitted to the UAS, by component ID
QMap<int, QMap<QString, QVariant>* > onboardParameters; ///< All parameters confirmed to be stored onboard the UAS, by component ID QMap<int, QMap<QString, QVariant>* > onboardParameters; ///< All parameters confirmed to be stored onboard the UAS, by component ID
int totalOnboardParameters;///< The known count of onboard parameters, may not match onboardParameters until all params are received
// Tooltip data structures // Tooltip data structures
QMap<QString, QString> paramDescriptions; ///< Tooltip values QMap<QString, QString> paramDescriptions; ///< Tooltip values
......
...@@ -175,6 +175,9 @@ void QGCParamSlider::selectParameter(int paramIndex) ...@@ -175,6 +175,9 @@ void QGCParamSlider::selectParameter(int paramIndex)
{ {
// Set name // Set name
parameterName = ui->editSelectParamComboBox->itemText(paramIndex); parameterName = ui->editSelectParamComboBox->itemText(paramIndex);
if (parameterName.isEmpty()) {
return;
}
// Update min and max values if available // Update min and max values if available
if (uas) { if (uas) {
......
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