Skip to content

Commit

Permalink
Convert MAVLinkLogManager to Singleton
Browse files Browse the repository at this point in the history
  • Loading branch information
HTRamsey committed Nov 12, 2024
1 parent 6de7052 commit 92b0d5e
Show file tree
Hide file tree
Showing 14 changed files with 890 additions and 838 deletions.
3 changes: 0 additions & 3 deletions src/QGCToolbox.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "MAVLinkProtocol.h"
#include "MultiVehicleManager.h"
#include "VideoManager.h"
#include "MAVLinkLogManager.h"
#include "QGCCorePlugin.h"
#include "SettingsManager.h"
#include "QGCApplication.h"
Expand Down Expand Up @@ -41,7 +40,6 @@ QGCToolbox::QGCToolbox(QGCApplication* app)
_multiVehicleManager = new MultiVehicleManager (app, this);
_videoManager = new VideoManager (app, this);

_mavlinkLogManager = new MAVLinkLogManager (app, this);
#ifndef QGC_AIRLINK_DISABLED
_airlinkManager = new AirLinkManager (app, this);
#endif
Expand All @@ -60,7 +58,6 @@ void QGCToolbox::setChildToolboxes(void)
_mavlinkProtocol->setToolbox(this);
_multiVehicleManager->setToolbox(this);
_videoManager->setToolbox(this);
_mavlinkLogManager->setToolbox(this);
#ifndef QGC_AIRLINK_DISABLED
_airlinkManager->setToolbox(this);
#endif
Expand Down
3 changes: 0 additions & 3 deletions src/QGCToolbox.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class MAVLinkProtocol;
class MultiVehicleManager;
class QGCApplication;
class VideoManager;
class MAVLinkLogManager;
class QGCCorePlugin;
class SettingsManager;
#ifndef QGC_AIRLINK_DISABLED
Expand All @@ -39,7 +38,6 @@ class QGCToolbox : public QObject {
MAVLinkProtocol* mavlinkProtocol () { return _mavlinkProtocol; }
MultiVehicleManager* multiVehicleManager () { return _multiVehicleManager; }
VideoManager* videoManager () { return _videoManager; }
MAVLinkLogManager* mavlinkLogManager () { return _mavlinkLogManager; }
QGCCorePlugin* corePlugin () { return _corePlugin; }
SettingsManager* settingsManager () { return _settingsManager; }
#ifndef QGC_AIRLINK_DISABLED
Expand All @@ -57,7 +55,6 @@ class QGCToolbox : public QObject {
MAVLinkProtocol* _mavlinkProtocol = nullptr;
MultiVehicleManager* _multiVehicleManager = nullptr;
VideoManager* _videoManager = nullptr;
MAVLinkLogManager* _mavlinkLogManager = nullptr;
QGCCorePlugin* _corePlugin = nullptr;
SettingsManager* _settingsManager = nullptr;
#ifndef QGC_AIRLINK_DISABLED
Expand Down
1 change: 0 additions & 1 deletion src/QmlControls/QGroundControlQmlGlobal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ void QGroundControlQmlGlobal::setToolbox(QGCToolbox* toolbox)
_linkManager = toolbox->linkManager();
_multiVehicleManager = toolbox->multiVehicleManager();
_videoManager = toolbox->videoManager();
_mavlinkLogManager = toolbox->mavlinkLogManager();
_corePlugin = toolbox->corePlugin();
_settingsManager = toolbox->settingsManager();
#ifndef NO_SERIAL_LINK
Expand Down
5 changes: 0 additions & 5 deletions src/QmlControls/QGroundControlQmlGlobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class QGCApplication;
class ADSBVehicleManager;
class FactGroup;
class LinkManager;
class MAVLinkLogManager;
class MissionCommandTree;
class MultiVehicleManager;
class QGCCorePlugin;
Expand All @@ -37,7 +36,6 @@ class AirLinkManager;
Q_MOC_INCLUDE("ADSBVehicleManager.h")
Q_MOC_INCLUDE("FactGroup.h")
Q_MOC_INCLUDE("LinkManager.h")
Q_MOC_INCLUDE("MAVLinkLogManager.h")
Q_MOC_INCLUDE("MissionCommandTree.h")
Q_MOC_INCLUDE("MultiVehicleManager.h")
Q_MOC_INCLUDE("QGCCorePlugin.h")
Expand Down Expand Up @@ -77,7 +75,6 @@ class QGroundControlQmlGlobal : public QGCTool
Q_PROPERTY(QGCMapEngineManager* mapEngineManager READ mapEngineManager CONSTANT)
Q_PROPERTY(QGCPositionManager* qgcPositionManger READ qgcPositionManger CONSTANT)
Q_PROPERTY(VideoManager* videoManager READ videoManager CONSTANT)
Q_PROPERTY(MAVLinkLogManager* mavlinkLogManager READ mavlinkLogManager CONSTANT)
Q_PROPERTY(SettingsManager* settingsManager READ settingsManager CONSTANT)
Q_PROPERTY(ADSBVehicleManager* adsbVehicleManager READ adsbVehicleManager CONSTANT)
Q_PROPERTY(QGCCorePlugin* corePlugin READ corePlugin CONSTANT)
Expand Down Expand Up @@ -174,7 +171,6 @@ class QGroundControlQmlGlobal : public QGCTool
QGCPositionManager* qgcPositionManger () { return _qgcPositionManager; }
MissionCommandTree* missionCommandTree () { return _missionCommandTree; }
VideoManager* videoManager () { return _videoManager; }
MAVLinkLogManager* mavlinkLogManager () { return _mavlinkLogManager; }
QGCCorePlugin* corePlugin () { return _corePlugin; }
SettingsManager* settingsManager () { return _settingsManager; }
#ifndef NO_SERIAL_LINK
Expand Down Expand Up @@ -266,7 +262,6 @@ class QGroundControlQmlGlobal : public QGCTool
LinkManager* _linkManager = nullptr;
MultiVehicleManager* _multiVehicleManager = nullptr;
VideoManager* _videoManager = nullptr;
MAVLinkLogManager* _mavlinkLogManager = nullptr;
QGCCorePlugin* _corePlugin = nullptr;
SettingsManager* _settingsManager = nullptr;
#ifndef NO_SERIAL_LINK
Expand Down
Loading

0 comments on commit 92b0d5e

Please sign in to comment.