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
2cfa58a6
Commit
2cfa58a6
authored
Apr 14, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pluginReady now supports disconnect signalling
parent
3df5bb48
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
7 deletions
+17
-7
AutoPilotPlugin.cc
src/AutoPilotPlugins/AutoPilotPlugin.cc
+8
-0
AutoPilotPlugin.h
src/AutoPilotPlugins/AutoPilotPlugin.h
+9
-7
No files found.
src/AutoPilotPlugins/AutoPilotPlugin.cc
View file @
2cfa58a6
...
@@ -33,6 +33,14 @@ AutoPilotPlugin::AutoPilotPlugin(UASInterface* uas, QObject* parent) :
...
@@ -33,6 +33,14 @@ AutoPilotPlugin::AutoPilotPlugin(UASInterface* uas, QObject* parent) :
_pluginReady
(
false
)
_pluginReady
(
false
)
{
{
Q_ASSERT
(
_uas
);
Q_ASSERT
(
_uas
);
connect
(
_uas
,
&
UASInterface
::
disconnected
,
this
,
&
AutoPilotPlugin
::
_uasDisconnected
);
}
void
AutoPilotPlugin
::
_uasDisconnected
(
void
)
{
_pluginReady
=
false
;
emit
pluginReadyChanged
(
_pluginReady
);
}
}
void
AutoPilotPlugin
::
refreshAllParameters
(
void
)
void
AutoPilotPlugin
::
refreshAllParameters
(
void
)
...
...
src/AutoPilotPlugins/AutoPilotPlugin.h
View file @
2cfa58a6
...
@@ -51,8 +51,9 @@ class AutoPilotPlugin : public QObject
...
@@ -51,8 +51,9 @@ class AutoPilotPlugin : public QObject
public:
public:
AutoPilotPlugin
(
UASInterface
*
uas
,
QObject
*
parent
);
AutoPilotPlugin
(
UASInterface
*
uas
,
QObject
*
parent
);
Q_PROPERTY
(
bool
pluginReady
READ
pluginReady
NOTIFY
pluginReadyChanged
)
/// true: plugin is ready for use, plugin should no longer be used
Q_PROPERTY
(
bool
pluginReady
READ
pluginReady
NOTIFY
pluginReadyChanged
)
/// List of VehicleComponent objects
/// List of VehicleComponent objects
Q_PROPERTY
(
QVariantList
vehicleComponents
READ
vehicleComponents
CONSTANT
)
Q_PROPERTY
(
QVariantList
vehicleComponents
READ
vehicleComponents
CONSTANT
)
...
@@ -100,17 +101,15 @@ public:
...
@@ -100,17 +101,15 @@ public:
// Must be implemented by derived class
// Must be implemented by derived class
virtual
const
QVariantList
&
vehicleComponents
(
void
)
=
0
;
virtual
const
QVariantList
&
vehicleComponents
(
void
)
=
0
;
/// FIXME: Kind of hacky
static
void
clearStaticData
(
void
);
static
void
clearStaticData
(
void
);
bool
pluginReady
(
void
)
{
return
_pluginReady
;
}
UASInterface
*
uas
(
void
)
{
return
_uas
;
}
UASInterface
*
uas
(
void
)
{
return
_uas
;
}
bool
pluginReady
(
void
)
{
return
_pluginReady
;
}
signals:
signals:
/// Signalled when plugin is ready for use
/// Signalled when plugin is ready for use
void
pluginReadyChanged
(
bool
pluginReady
);
void
pluginReadyChanged
(
bool
pluginReady
);
protected:
protected:
/// All access to AutoPilotPugin objects is through getInstanceForAutoPilotPlugin
/// All access to AutoPilotPugin objects is through getInstanceForAutoPilotPlugin
AutoPilotPlugin
(
QObject
*
parent
=
NULL
)
:
QObject
(
parent
)
{
}
AutoPilotPlugin
(
QObject
*
parent
=
NULL
)
:
QObject
(
parent
)
{
}
...
@@ -120,6 +119,9 @@ protected:
...
@@ -120,6 +119,9 @@ protected:
UASInterface
*
_uas
;
UASInterface
*
_uas
;
bool
_pluginReady
;
bool
_pluginReady
;
private
slots
:
void
_uasDisconnected
(
void
);
};
};
#endif
#endif
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