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
5f269009
Commit
5f269009
authored
Jul 08, 2020
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
8fdbaf3f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
13 deletions
+1
-13
RCChannelMonitorController.cc
src/QmlControls/RCChannelMonitorController.cc
+1
-8
RCChannelMonitorController.h
src/QmlControls/RCChannelMonitorController.h
+0
-5
No files found.
src/QmlControls/RCChannelMonitorController.cc
View file @
5f269009
...
...
@@ -18,9 +18,7 @@ RCChannelMonitorController::RCChannelMonitorController(void)
void
RCChannelMonitorController
::
_rcChannelsChanged
(
int
channelCount
,
int
pwmValues
[
Vehicle
::
cMaxRcChannels
])
{
int
maxChannel
=
std
::
min
(
channelCount
,
_chanMax
());
for
(
int
channel
=
0
;
channel
<
maxChannel
;
channel
++
)
{
for
(
int
channel
=
0
;
channel
<
channelCount
;
channel
++
)
{
int
channelValue
=
pwmValues
[
channel
];
if
(
_chanCount
!=
channelCount
)
{
...
...
@@ -33,8 +31,3 @@ void RCChannelMonitorController::_rcChannelsChanged(int channelCount, int pwmVal
}
}
}
int
RCChannelMonitorController
::
_chanMax
(
void
)
const
{
return
_vehicle
->
firmwareType
()
==
MAV_AUTOPILOT_PX4
?
_chanMaxPX4
:
_chanMaxAPM
;
}
src/QmlControls/RCChannelMonitorController.h
View file @
5f269009
...
...
@@ -37,12 +37,7 @@ private slots:
void
_rcChannelsChanged
(
int
channelCount
,
int
pwmValues
[
Vehicle
::
cMaxRcChannels
]);
private:
int
_chanMax
(
void
)
const
;
int
_chanCount
;
static
const
int
_chanMaxPX4
=
18
;
///< Maximum number of supported rc channels, PX4 Firmware
static
const
int
_chanMaxAPM
=
14
;
///< Maximum number of supported rc channels, APM firmware
};
#endif // RCChannelMonitorController_H
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