Commit 190b1d8a authored by Don Gagne's avatar Don Gagne

Modify consumers of UASManager and QGCUASParamManager to use new interfaces

parent b42a36a8
...@@ -40,6 +40,7 @@ This file is part of the QGROUNDCONTROL project ...@@ -40,6 +40,7 @@ This file is part of the QGROUNDCONTROL project
#include "QGCFlightGearLink.h" #include "QGCFlightGearLink.h"
#include "QGCJSBSimLink.h" #include "QGCJSBSimLink.h"
#include "QGCXPlaneLink.h" #include "QGCXPlaneLink.h"
#include "QGCUASParamManager.h"
/** /**
...@@ -542,7 +543,7 @@ public: ...@@ -542,7 +543,7 @@ public:
} }
/** @brief Get reference to the param manager **/ /** @brief Get reference to the param manager **/
virtual QGCUASParamManager* getParamManager() { virtual QGCUASParamManagerInterface* getParamManager() {
return &paramMgr; return &paramMgr;
} }
......
...@@ -42,7 +42,7 @@ This file is part of the QGROUNDCONTROL project ...@@ -42,7 +42,7 @@ This file is part of the QGROUNDCONTROL project
#include "ProtocolInterface.h" #include "ProtocolInterface.h"
#include "UASParameterDataModel.h" #include "UASParameterDataModel.h"
#include "UASWaypointManager.h" #include "UASWaypointManager.h"
#include "QGCUASParamManager.h" #include "QGCUASParamManagerInterface.h"
#include "RadioCalibration/RadioCalibrationData.h" #include "RadioCalibration/RadioCalibrationData.h"
#ifdef QGC_PROTOBUF_ENABLED #ifdef QGC_PROTOBUF_ENABLED
...@@ -156,7 +156,7 @@ public: ...@@ -156,7 +156,7 @@ public:
virtual UASWaypointManager* getWaypointManager(void) = 0; virtual UASWaypointManager* getWaypointManager(void) = 0;
/** @brief Get reference to the param manager **/ /** @brief Get reference to the param manager **/
virtual QGCUASParamManager* getParamManager() = 0; virtual QGCUASParamManagerInterface* getParamManager() = 0;
/* COMMUNICATION FLAGS */ /* COMMUNICATION FLAGS */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#include <QSettings> #include <QSettings>
#include "QGCUASParamManager.h" #include "QGCUASParamManagerInterface.h"
#include "UASInterface.h" #include "UASInterface.h"
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
#include <QFileDialog> #include <QFileDialog>
#include <QFile> #include <QFile>
#include <QVariant> #include <QVariant>
#include <QTextStream>> #include <QTextStream>
#include "QGCUASParamManager.h" #include "QGCUASParamManagerInterface.h"
#include "UASInterface.h" #include "UASInterface.h"
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
//forward declarations //forward declarations
class QGCUASParamManager; class QGCUASParamManagerInterface;
class UASInterface; class UASInterface;
...@@ -50,7 +50,7 @@ public slots: ...@@ -50,7 +50,7 @@ public slots:
virtual void loadParametersFromFile(); virtual void loadParametersFromFile();
protected: protected:
QGCUASParamManager* paramMgr; QGCUASParamManagerInterface* paramMgr;
UASInterface* mav; UASInterface* mav;
QString updatingParamNameLock; ///< Name of param currently being updated-- used for reducing echo on param change QString updatingParamNameLock; ///< Name of param currently being updated-- used for reducing echo on param change
......
...@@ -276,7 +276,7 @@ protected: ...@@ -276,7 +276,7 @@ protected:
bool doneLoadingConfig; bool doneLoadingConfig;
UASInterface* mav; ///< The current MAV UASInterface* mav; ///< The current MAV
QGCUASParamManager* paramMgr; ///< params mgr for the mav QGCUASParamManagerInterface* paramMgr; ///< params mgr for the mav
static const unsigned int chanMax = 14; ///< Maximum number of channels static const unsigned int chanMax = 14; ///< Maximum number of channels
static const unsigned int chanMappedMax = 16; ///< Maximum number of mapped channels (can be higher than input channel count) static const unsigned int chanMappedMax = 16; ///< Maximum number of mapped channels (can be higher than input channel count)
unsigned int chanCount; ///< Actual channels unsigned int chanCount; ///< Actual channels
......
...@@ -158,7 +158,7 @@ protected slots: ...@@ -158,7 +158,7 @@ protected slots:
protected: protected:
bool doneLoadingConfig; bool doneLoadingConfig;
UASInterface* mav; ///< The current MAV UASInterface* mav; ///< The current MAV
QGCUASParamManager* paramMgr; ///< params mgr for the mav QGCUASParamManagerInterface* paramMgr; ///< params mgr for the mav
static const unsigned int chanMax = 8; ///< Maximum number of channels static const unsigned int chanMax = 8; ///< Maximum number of channels
unsigned int chanCount; ///< Actual channels unsigned int chanCount; ///< Actual channels
int rcType; ///< Type of the remote control int rcType; ///< Type of the remote control
......
...@@ -34,10 +34,8 @@ This file is part of the QGROUNDCONTROL project ...@@ -34,10 +34,8 @@ This file is part of the QGROUNDCONTROL project
#include <QWidget> #include <QWidget>
#include "ui_FrameTypeConfig.h" #include "ui_FrameTypeConfig.h"
#include "UASInterface.h"
#include "UASManager.h"
#include "QGCUASParamManager.h"
#include "AP2ConfigWidget.h" #include "AP2ConfigWidget.h"
class FrameTypeConfig : public AP2ConfigWidget class FrameTypeConfig : public AP2ConfigWidget
{ {
Q_OBJECT Q_OBJECT
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include "QGCToolWidgetItem.h" #include "QGCToolWidgetItem.h"
class QGCUASParamManager; class QGCUASParamManagerInterface;
namespace Ui namespace Ui
{ {
...@@ -52,7 +52,7 @@ protected slots: ...@@ -52,7 +52,7 @@ protected slots:
/** @brief Updates current parameter based on new combobox value */ /** @brief Updates current parameter based on new combobox value */
void comboBoxIndexChanged(QString val); void comboBoxIndexChanged(QString val);
protected: protected:
QGCUASParamManager *paramMgr; ///< Access to parameter manager QGCUASParamManagerInterface *paramMgr; ///< Access to parameter manager
bool visibleEnabled; bool visibleEnabled;
QString visibleParam; QString visibleParam;
int visibleVal; int visibleVal;
......
...@@ -134,7 +134,7 @@ bool QGCMapWidget::setHomeActionTriggered() ...@@ -134,7 +134,7 @@ bool QGCMapWidget::setHomeActionTriggered()
QMessageBox::information(0,"Error","Please connect first"); QMessageBox::information(0,"Error","Please connect first");
return false; return false;
} }
UASManager *uasManager = UASManager::instance(); UASManagerInterface *uasManager = UASManager::instance();
if (!uasManager) { return false; } if (!uasManager) { return false; }
// Enter an altitude // Enter an altitude
......
...@@ -97,7 +97,7 @@ protected: ...@@ -97,7 +97,7 @@ protected:
private: private:
UASInterface* mav; UASInterface* mav;
QGCUASParamManager *paramMgr; QGCUASParamManagerInterface *paramMgr;
QProgressDialog* progress; QProgressDialog* progress;
unsigned pendingParams; unsigned pendingParams;
enum CONFIG_STATE configState; enum CONFIG_STATE configState;
......
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