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
d4b9ff9f
Unverified
Commit
d4b9ff9f
authored
Nov 29, 2018
by
Don Gagne
Committed by
GitHub
Nov 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "ArduPilot: Don't starts streams from QGC side. Assume firmware side does the right thing"
parent
e4f2f4b9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
0 deletions
+28
-0
APMFirmwarePlugin.cc
src/FirmwarePlugin/APM/APMFirmwarePlugin.cc
+15
-0
APMFirmwarePlugin.h
src/FirmwarePlugin/APM/APMFirmwarePlugin.h
+1
-0
ArduSubFirmwarePlugin.cc
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.cc
+10
-0
ArduSubFirmwarePlugin.h
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.h
+2
-0
No files found.
src/FirmwarePlugin/APM/APMFirmwarePlugin.cc
View file @
d4b9ff9f
...
...
@@ -593,6 +593,18 @@ void APMFirmwarePlugin::_adjustCalibrationMessageSeverity(mavlink_message_t* mes
mavlink_msg_statustext_encode_chan
(
message
->
sysid
,
message
->
compid
,
0
,
message
,
&
statusText
);
}
void
APMFirmwarePlugin
::
initializeStreamRates
(
Vehicle
*
vehicle
)
{
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
);
}
void
APMFirmwarePlugin
::
initializeVehicle
(
Vehicle
*
vehicle
)
{
vehicle
->
setFirmwarePluginInstanceData
(
new
APMFirmwarePluginInstanceData
);
...
...
@@ -628,6 +640,9 @@ void APMFirmwarePlugin::initializeVehicle(Vehicle* vehicle)
// No version set
break
;
}
}
else
{
// Streams are not started automatically on APM stack
initializeStreamRates
(
vehicle
);
}
}
...
...
src/FirmwarePlugin/APM/APMFirmwarePlugin.h
View file @
d4b9ff9f
...
...
@@ -92,6 +92,7 @@ public:
int
manualControlReservedButtonCount
(
void
)
override
;
bool
adjustIncomingMavlinkMessage
(
Vehicle
*
vehicle
,
mavlink_message_t
*
message
)
override
;
void
adjustOutgoingMavlinkMessage
(
Vehicle
*
vehicle
,
LinkInterface
*
outgoingLink
,
mavlink_message_t
*
message
)
override
;
virtual
void
initializeStreamRates
(
Vehicle
*
vehicle
);
void
initializeVehicle
(
Vehicle
*
vehicle
)
override
;
bool
sendHomePositionToVehicle
(
void
)
override
;
void
addMetaDataToFact
(
QObject
*
parameterMetaData
,
Fact
*
fact
,
MAV_TYPE
vehicleType
)
override
;
...
...
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.cc
View file @
d4b9ff9f
...
...
@@ -169,6 +169,16 @@ int ArduSubFirmwarePlugin::manualControlReservedButtonCount(void)
return
0
;
}
void
ArduSubFirmwarePlugin
::
initializeStreamRates
(
Vehicle
*
vehicle
)
{
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
,
20
);
vehicle
->
requestDataStream
(
MAV_DATA_STREAM_EXTRA2
,
10
);
vehicle
->
requestDataStream
(
MAV_DATA_STREAM_EXTRA3
,
3
);
}
bool
ArduSubFirmwarePlugin
::
isCapable
(
const
Vehicle
*
vehicle
,
FirmwareCapabilities
capabilities
)
{
Q_UNUSED
(
vehicle
);
...
...
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.h
View file @
d4b9ff9f
...
...
@@ -115,6 +115,8 @@ public:
int
defaultJoystickTXMode
(
void
)
final
{
return
3
;
}
void
initializeStreamRates
(
Vehicle
*
vehicle
)
override
final
;
bool
isCapable
(
const
Vehicle
*
vehicle
,
FirmwareCapabilities
capabilities
)
final
;
bool
supportsThrottleModeCenterZero
(
void
)
final
;
...
...
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