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
bd304b2c
Commit
bd304b2c
authored
Oct 07, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
APM stack must request data streams on connect
parent
f380ac52
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
35 additions
and
2 deletions
+35
-2
APMFirmwarePlugin.cc
src/FirmwarePlugin/APM/APMFirmwarePlugin.cc
+12
-0
APMFirmwarePlugin.h
src/FirmwarePlugin/APM/APMFirmwarePlugin.h
+2
-2
FirmwarePlugin.h
src/FirmwarePlugin/FirmwarePlugin.h
+5
-0
GenericFirmwarePlugin.cc
src/FirmwarePlugin/Generic/GenericFirmwarePlugin.cc
+7
-0
GenericFirmwarePlugin.h
src/FirmwarePlugin/Generic/GenericFirmwarePlugin.h
+1
-0
PX4FirmwarePlugin.cc
src/FirmwarePlugin/PX4/PX4FirmwarePlugin.cc
+7
-0
PX4FirmwarePlugin.h
src/FirmwarePlugin/PX4/PX4FirmwarePlugin.h
+1
-0
No files found.
src/FirmwarePlugin/APM/APMFirmwarePlugin.cc
View file @
bd304b2c
...
...
@@ -169,3 +169,15 @@ void APMFirmwarePlugin::adjustMavlinkMessage(mavlink_message_t* message)
// FIXME: Need to implement mavlink message severity adjustment
}
void
APMFirmwarePlugin
::
initializeVehicle
(
Vehicle
*
vehicle
)
{
// Streams are not started automatically on APM stack
vehicle
->
requestDataStream
(
MAV_DATA_STREAM_RAW_SENSORS
,
2
);
vehicle
->
requestDataStream
(
MAV_DATA_STREAM_EXTENDED_STATUS
,
2
);
vehicle
->
requestDataStream
(
MAV_DATA_STREAM_RC_CHANNELS
,
2
);
vehicle
->
requestDataStream
(
MAV_DATA_STREAM_POSITION
,
3
);
vehicle
->
requestDataStream
(
MAV_DATA_STREAM_EXTRA1
,
10
);
vehicle
->
requestDataStream
(
MAV_DATA_STREAM_EXTRA2
,
10
);
vehicle
->
requestDataStream
(
MAV_DATA_STREAM_EXTRA3
,
3
);
}
src/FirmwarePlugin/APM/APMFirmwarePlugin.h
View file @
bd304b2c
...
...
@@ -37,7 +37,6 @@ class APMFirmwarePlugin : public FirmwarePlugin
public:
// Overrides from FirmwarePlugin
virtual
bool
isCapable
(
FirmwareCapabilities
capabilities
);
virtual
QList
<
VehicleComponent
*>
componentsForVehicle
(
AutoPilotPlugin
*
vehicle
);
virtual
QStringList
flightModes
(
void
);
...
...
@@ -45,7 +44,8 @@ public:
virtual
bool
setFlightMode
(
const
QString
&
flightMode
,
uint8_t
*
base_mode
,
uint32_t
*
custom_mode
);
virtual
int
manualControlReservedButtonCount
(
void
);
virtual
void
adjustMavlinkMessage
(
mavlink_message_t
*
message
);
virtual
void
initializeVehicle
(
Vehicle
*
vehicle
);
private:
/// All access to singleton is through AutoPilotPluginManager::instance
APMFirmwarePlugin
(
QObject
*
parent
=
NULL
);
...
...
src/FirmwarePlugin/FirmwarePlugin.h
View file @
bd304b2c
...
...
@@ -35,6 +35,8 @@
#include <QList>
#include <QString>
class
Vehicle
;
/// This is the base class for Firmware specific plugins
///
/// The FirmwarePlugin class is the abstract base class which represents the methods and objects
...
...
@@ -92,6 +94,9 @@ public:
/// @param message[in,out] Mavlink message to adjust if needed.
virtual
void
adjustMavlinkMessage
(
mavlink_message_t
*
message
)
=
0
;
/// Called when Vehicle is first created to send any necessary mavlink messages to the firmware.
virtual
void
initializeVehicle
(
Vehicle
*
vehicle
)
=
0
;
protected:
FirmwarePlugin
(
QObject
*
parent
=
NULL
)
:
QGCSingleton
(
parent
)
{
}
};
...
...
src/FirmwarePlugin/Generic/GenericFirmwarePlugin.cc
View file @
bd304b2c
...
...
@@ -103,3 +103,10 @@ void GenericFirmwarePlugin::adjustMavlinkMessage(mavlink_message_t* message)
// Generic plugin does no message adjustment
}
void
GenericFirmwarePlugin
::
initializeVehicle
(
Vehicle
*
vehicle
)
{
Q_UNUSED
(
vehicle
);
// Generic Flight Stack is by definition "generic", so no extra work
}
src/FirmwarePlugin/Generic/GenericFirmwarePlugin.h
View file @
bd304b2c
...
...
@@ -45,6 +45,7 @@ public:
virtual
bool
setFlightMode
(
const
QString
&
flightMode
,
uint8_t
*
base_mode
,
uint32_t
*
custom_mode
);
virtual
int
manualControlReservedButtonCount
(
void
);
virtual
void
adjustMavlinkMessage
(
mavlink_message_t
*
message
);
virtual
void
initializeVehicle
(
Vehicle
*
vehicle
);
private:
/// All access to singleton is through AutoPilotPluginManager::instance
...
...
src/FirmwarePlugin/PX4/PX4FirmwarePlugin.cc
View file @
bd304b2c
...
...
@@ -193,3 +193,10 @@ bool PX4FirmwarePlugin::isCapable(FirmwareCapabilities capabilities)
{
return
(
capabilities
&
(
MavCmdPreflightStorageCapability
|
SetFlightModeCapability
))
==
capabilities
;
}
void
PX4FirmwarePlugin
::
initializeVehicle
(
Vehicle
*
vehicle
)
{
Q_UNUSED
(
vehicle
);
// PX4 Flight Stack doesn't need to do any extra work
}
src/FirmwarePlugin/PX4/PX4FirmwarePlugin.h
View file @
bd304b2c
...
...
@@ -45,6 +45,7 @@ public:
virtual
bool
setFlightMode
(
const
QString
&
flightMode
,
uint8_t
*
base_mode
,
uint32_t
*
custom_mode
);
virtual
int
manualControlReservedButtonCount
(
void
);
virtual
void
adjustMavlinkMessage
(
mavlink_message_t
*
message
);
virtual
void
initializeVehicle
(
Vehicle
*
vehicle
);
private:
/// All access to singleton is through AutoPilotPluginManager::instance
...
...
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