Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
0ce6d773
Commit
0ce6d773
authored
Nov 26, 2016
by
Don Gagne
Browse files
Allows QGC plugins to be optional or custom
parent
d662b4da
Changes
43
Show whitespace changes
Inline
Side-by-side
src/Vehicle/Vehicle.h
View file @
0ce6d773
...
...
@@ -31,7 +31,6 @@ class UASInterface;
class
FirmwarePlugin
;
class
FirmwarePluginManager
;
class
AutoPilotPlugin
;
class
AutoPilotPluginManager
;
class
MissionManager
;
class
GeoFenceManager
;
class
RallyPointManager
;
...
...
@@ -214,7 +213,6 @@ public:
MAV_AUTOPILOT
firmwareType
,
MAV_TYPE
vehicleType
,
FirmwarePluginManager
*
firmwarePluginManager
,
AutoPilotPluginManager
*
autopilotPluginManager
,
JoystickManager
*
joystickManager
);
// The following is used to create a disconnected Vehicle for use while offline editing.
...
...
@@ -579,6 +577,13 @@ public:
/// @return true: X confiuration, false: Plus configuration
bool
xConfigMotors
(
void
);
/// @return Firmware plugin instance data associated with this Vehicle
QObject
*
firmwarePluginInstanceData
(
void
)
{
return
_firmwarePluginInstanceData
;
}
/// Sets the firmware plugin instance data associated with this Vehicle. This object will be parented to the Vehicle
/// and destroyed when the vehicle goes away.
void
setFirmwarePluginInstanceData
(
QObject
*
firmwarePluginInstanceData
);
public
slots
:
void
setLatitude
(
double
latitude
);
void
setLongitude
(
double
longitude
);
...
...
@@ -717,6 +722,7 @@ private:
MAV_AUTOPILOT
_firmwareType
;
MAV_TYPE
_vehicleType
;
FirmwarePlugin
*
_firmwarePlugin
;
QObject
*
_firmwarePluginInstanceData
;
AutoPilotPlugin
*
_autopilotPlugin
;
MAVLinkProtocol
*
_mavlink
;
bool
_soloFirmware
;
...
...
@@ -806,7 +812,6 @@ private:
// Toolbox references
FirmwarePluginManager
*
_firmwarePluginManager
;
AutoPilotPluginManager
*
_autopilotPluginManager
;
JoystickManager
*
_joystickManager
;
int
_flowImageIndex
;
...
...
src/comm/MockLink.cc
View file @
0ce6d773
...
...
@@ -11,8 +11,9 @@
#include
"MockLink.h"
#include
"QGCLoggingCategory.h"
#include
"QGCApplication.h"
#ifndef __mobile__
#include
"UnitTest.h"
#ifdef UNITTEST_BUILD
#include
"UnitTest.h"
#endif
#include
<QTimer>
...
...
@@ -21,7 +22,8 @@
#include
<string.h>
#include
"px4_custom_mode.h"
// FIXME: Hack to work around clean headers
#include
"FirmwarePlugin/PX4/px4_custom_mode.h"
QGC_LOGGING_CATEGORY
(
MockLinkLog
,
"MockLinkLog"
)
QGC_LOGGING_CATEGORY
(
MockLinkVerboseLog
,
"MockLinkVerboseLog"
)
...
...
@@ -1159,7 +1161,7 @@ void MockLink::_handleLogRequestData(const mavlink_message_t& msg)
mavlink_msg_log_request_data_decode
(
&
msg
,
&
request
);
if
(
_logDownloadFilename
.
isEmpty
())
{
#if
n
def
__mobile__
#ifdef
UNITTEST_BUILD
_logDownloadFilename
=
UnitTest
::
createRandomFile
(
_logDownloadFileSize
);
#endif
}
...
...
src/main.cc
View file @
0ce6d773
...
...
@@ -33,10 +33,11 @@
#include
"QGCSerialPortInfo.h"
#endif
#ifdef QT_DEBUG
#ifndef __mobile__
#ifdef UNITTEST_BUILD
#include
"UnitTest.h"
#endif
#endif
#ifdef QT_DEBUG
#include
"CmdLineOptParser.h"
#ifdef Q_OS_WIN
#include
<crtdbg.h>
...
...
@@ -229,8 +230,7 @@ int main(int argc, char *argv[])
int
exitCode
=
0
;
#ifndef __mobile__
#ifdef QT_DEBUG
#ifdef UNITTEST_BUILD
if
(
runUnitTests
)
{
for
(
int
i
=
0
;
i
<
(
stressUnitTests
?
20
:
1
);
i
++
)
{
if
(
!
app
->
_initForUnitTests
())
{
...
...
@@ -249,7 +249,6 @@ int main(int argc, char *argv[])
}
}
}
else
#endif
#endif
{
if
(
!
app
->
_initForNormalAppBoot
())
{
...
...
Prev
1
2
3
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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