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
a78ee55b
Commit
a78ee55b
authored
Aug 01, 2016
by
Rustom Jehangir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make supportsRadio a plugin option
parent
479ca562
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
1 deletion
+23
-1
APMAutoPilotPlugin.cc
src/AutoPilotPlugins/APM/APMAutoPilotPlugin.cc
+1
-1
ArduSubFirmwarePlugin.cc
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.cc
+5
-0
ArduSubFirmwarePlugin.h
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.h
+2
-0
FirmwarePlugin.cc
src/FirmwarePlugin/FirmwarePlugin.cc
+5
-0
FirmwarePlugin.h
src/FirmwarePlugin/FirmwarePlugin.h
+4
-0
Vehicle.cc
src/Vehicle/Vehicle.cc
+5
-0
Vehicle.h
src/Vehicle/Vehicle.h
+1
-0
No files found.
src/AutoPilotPlugins/APM/APMAutoPilotPlugin.cc
View file @
a78ee55b
...
...
@@ -66,7 +66,7 @@ const QVariantList& APMAutoPilotPlugin::vehicleComponents(void)
_airframeComponent
->
setupTriggerSignals
();
_components
.
append
(
QVariant
::
fromValue
((
VehicleComponent
*
)
_airframeComponent
));
if
(
!
_vehicle
->
sub
()
)
{
if
(
_vehicle
->
supportsRadio
()
)
{
_radioComponent
=
new
APMRadioComponent
(
_vehicle
,
this
);
_radioComponent
->
setupTriggerSignals
();
_components
.
append
(
QVariant
::
fromValue
((
VehicleComponent
*
)
_radioComponent
));
...
...
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.cc
View file @
a78ee55b
...
...
@@ -62,3 +62,8 @@ bool ArduSubFirmwarePlugin::supportsManualControl(void)
{
return
true
;
}
bool
ArduSubFirmwarePlugin
::
supportsRadio
(
void
)
{
return
false
;
}
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.h
View file @
a78ee55b
...
...
@@ -72,6 +72,8 @@ public:
bool
supportsThrottleModeCenterZero
(
void
);
bool
supportsManualControl
(
void
);
bool
supportsRadio
(
void
);
};
#endif
src/FirmwarePlugin/FirmwarePlugin.cc
View file @
a78ee55b
...
...
@@ -94,6 +94,11 @@ bool FirmwarePlugin::supportsManualControl(void)
return
false
;
}
bool
FirmwarePlugin
::
supportsRadio
(
void
)
{
return
true
;
}
bool
FirmwarePlugin
::
adjustIncomingMavlinkMessage
(
Vehicle
*
vehicle
,
mavlink_message_t
*
message
)
{
Q_UNUSED
(
vehicle
);
...
...
src/FirmwarePlugin/FirmwarePlugin.h
View file @
a78ee55b
...
...
@@ -137,6 +137,10 @@ public:
/// By default, this returns false unless overridden in the firmware plugin.
virtual
bool
supportsManualControl
(
void
);
/// Returns true if the firmware supports the use of the RC radio and requires the RC radio
/// setup page. Returns true by default.
virtual
bool
supportsRadio
(
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/Vehicle/Vehicle.cc
View file @
a78ee55b
...
...
@@ -1525,6 +1525,11 @@ bool Vehicle::supportsThrottleModeCenterZero(void) const
return
_firmwarePlugin
->
supportsThrottleModeCenterZero
();
}
bool
Vehicle
::
supportsRadio
(
void
)
const
{
return
_firmwarePlugin
->
supportsRadio
();
}
void
Vehicle
::
_setCoordinateValid
(
bool
coordinateValid
)
{
if
(
coordinateValid
!=
_coordinateValid
)
{
...
...
src/Vehicle/Vehicle.h
View file @
a78ee55b
...
...
@@ -475,6 +475,7 @@ public:
bool
supportsManualControl
(
void
)
const
;
bool
supportsThrottleModeCenterZero
(
void
)
const
;
bool
supportsRadio
(
void
)
const
;
void
setFlying
(
bool
flying
);
void
setGuidedMode
(
bool
guidedMode
);
...
...
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