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
479ca562
Commit
479ca562
authored
Aug 01, 2016
by
Rustom Jehangir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make supportsManualControl a plugin option
parent
3b82d52d
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
22 additions
and
9 deletions
+22
-9
ArduSubFirmwarePlugin.cc
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.cc
+5
-0
ArduSubFirmwarePlugin.h
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.h
+1
-0
FirmwarePlugin.cc
src/FirmwarePlugin/FirmwarePlugin.cc
+5
-0
FirmwarePlugin.h
src/FirmwarePlugin/FirmwarePlugin.h
+4
-0
PX4FirmwarePlugin.cc
src/FirmwarePlugin/PX4/PX4FirmwarePlugin.cc
+5
-0
PX4FirmwarePlugin.h
src/FirmwarePlugin/PX4/PX4FirmwarePlugin.h
+1
-0
Vehicle.cc
src/Vehicle/Vehicle.cc
+1
-9
No files found.
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.cc
View file @
479ca562
...
...
@@ -57,3 +57,8 @@ bool ArduSubFirmwarePlugin::supportsThrottleModeCenterZero(void)
{
return
false
;
}
bool
ArduSubFirmwarePlugin
::
supportsManualControl
(
void
)
{
return
true
;
}
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.h
View file @
479ca562
...
...
@@ -71,6 +71,7 @@ public:
bool
supportsThrottleModeCenterZero
(
void
);
bool
supportsManualControl
(
void
);
};
#endif
src/FirmwarePlugin/FirmwarePlugin.cc
View file @
479ca562
...
...
@@ -89,6 +89,11 @@ bool FirmwarePlugin::supportsThrottleModeCenterZero(void)
return
true
;
}
bool
FirmwarePlugin
::
supportsManualControl
(
void
)
{
return
false
;
}
bool
FirmwarePlugin
::
adjustIncomingMavlinkMessage
(
Vehicle
*
vehicle
,
mavlink_message_t
*
message
)
{
Q_UNUSED
(
vehicle
);
...
...
src/FirmwarePlugin/FirmwarePlugin.h
View file @
479ca562
...
...
@@ -133,6 +133,10 @@ public:
/// throttle.
virtual
bool
supportsThrottleModeCenterZero
(
void
);
/// Returns true if the firmware supports the use of the MAVlink "MANUAL_CONTROL" message.
/// By default, this returns false unless overridden in the firmware plugin.
virtual
bool
supportsManualControl
(
void
);
/// Called before any mavlink message is processed by Vehicle such that the firmwre plugin
/// can adjust any message characteristics. This is handy to adjust or differences in mavlink
/// spec implementations such that the base code can remain mavlink generic.
...
...
src/FirmwarePlugin/PX4/PX4FirmwarePlugin.cc
View file @
479ca562
...
...
@@ -170,6 +170,11 @@ int PX4FirmwarePlugin::manualControlReservedButtonCount(void)
return
0
;
// 0 buttons reserved for rc switch simulation
}
bool
PX4FirmwarePlugin
::
supportsManualControl
(
void
)
{
return
true
;
}
bool
PX4FirmwarePlugin
::
isCapable
(
const
Vehicle
*
vehicle
,
FirmwareCapabilities
capabilities
)
{
if
(
vehicle
->
multiRotor
())
{
...
...
src/FirmwarePlugin/PX4/PX4FirmwarePlugin.h
View file @
479ca562
...
...
@@ -44,6 +44,7 @@ public:
void
guidedModeChangeAltitude
(
Vehicle
*
vehicle
,
double
altitudeRel
)
final
;
bool
isGuidedMode
(
const
Vehicle
*
vehicle
)
const
;
int
manualControlReservedButtonCount
(
void
)
final
;
bool
supportsManualControl
(
void
)
final
;
void
initializeVehicle
(
Vehicle
*
vehicle
)
final
;
bool
sendHomePositionToVehicle
(
void
)
final
;
void
addMetaDataToFact
(
QObject
*
parameterMetaData
,
Fact
*
fact
,
MAV_TYPE
vehicleType
)
final
;
...
...
src/Vehicle/Vehicle.cc
View file @
479ca562
...
...
@@ -1517,15 +1517,7 @@ bool Vehicle::vtol(void) const
bool
Vehicle
::
supportsManualControl
(
void
)
const
{
// PX4 Firmware supports manual control message
if
(
px4Firmware
()
)
{
return
true
;
}
// ArduSub supports manual control message (identified by APM + Submarine type)
if
(
apmFirmware
()
&&
vehicleType
()
==
MAV_TYPE_SUBMARINE
)
{
return
true
;
}
return
false
;
return
_firmwarePlugin
->
supportsManualControl
();
}
bool
Vehicle
::
supportsThrottleModeCenterZero
(
void
)
const
...
...
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