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
80879792
Unverified
Commit
80879792
authored
Jul 07, 2020
by
Don Gagne
Committed by
GitHub
Jul 07, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8889 from DonLakeFlyer/RCChannels
Remove RC_CHANNELS_RAW support
parents
0a41a0e6
98b07faa
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
52 deletions
+2
-52
Vehicle.cc
src/Vehicle/Vehicle.cc
+0
-48
Vehicle.h
src/Vehicle/Vehicle.h
+1
-2
PX4FirmwareUpgradeThread.cc
src/VehicleSetup/PX4FirmwareUpgradeThread.cc
+1
-2
No files found.
src/Vehicle/Vehicle.cc
View file @
80879792
...
...
@@ -732,9 +732,6 @@ void Vehicle::_mavlinkMessageReceived(LinkInterface* link, mavlink_message_t mes
case
MAVLINK_MSG_ID_RC_CHANNELS
:
_handleRCChannels
(
message
);
break
;
case
MAVLINK_MSG_ID_RC_CHANNELS_RAW
:
_handleRCChannelsRaw
(
message
);
break
;
case
MAVLINK_MSG_ID_BATTERY_STATUS
:
_handleBatteryStatus
(
message
);
break
;
...
...
@@ -1878,51 +1875,6 @@ void Vehicle::_handleRCChannels(mavlink_message_t& message)
emit
rcChannelsChanged
(
channels
.
chancount
,
pwmValues
);
}
void
Vehicle
::
_handleRCChannelsRaw
(
mavlink_message_t
&
message
)
{
// We handle both RC_CHANNLES and RC_CHANNELS_RAW since different firmware will only
// send one or the other.
mavlink_rc_channels_raw_t
channels
;
mavlink_msg_rc_channels_raw_decode
(
&
message
,
&
channels
);
uint16_t
*
_rgChannelvalues
[
cMaxRcChannels
]
=
{
&
channels
.
chan1_raw
,
&
channels
.
chan2_raw
,
&
channels
.
chan3_raw
,
&
channels
.
chan4_raw
,
&
channels
.
chan5_raw
,
&
channels
.
chan6_raw
,
&
channels
.
chan7_raw
,
&
channels
.
chan8_raw
,
};
int
pwmValues
[
cMaxRcChannels
];
int
channelCount
=
0
;
for
(
int
i
=
0
;
i
<
cMaxRcChannels
;
i
++
)
{
pwmValues
[
i
]
=
-
1
;
}
for
(
int
i
=
0
;
i
<
8
;
i
++
)
{
uint16_t
channelValue
=
*
_rgChannelvalues
[
i
];
if
(
channelValue
==
UINT16_MAX
)
{
pwmValues
[
i
]
=
-
1
;
}
else
{
channelCount
=
i
+
1
;
pwmValues
[
i
]
=
channelValue
;
}
}
for
(
int
i
=
9
;
i
<
18
;
i
++
)
{
pwmValues
[
i
]
=
-
1
;
}
emit
remoteControlRSSIChanged
(
channels
.
rssi
);
emit
rcChannelsChanged
(
channelCount
,
pwmValues
);
}
// Pop warnings ignoring for mavlink headers for both GCC/Clang and MSVC
#ifdef __GNUC__
#if defined(__clang__)
...
...
src/Vehicle/Vehicle.h
View file @
80879792
...
...
@@ -1232,7 +1232,7 @@ signals:
void
gitHashChanged
(
QString
hash
);
void
vehicleUIDChanged
();
/// New RC channel values
/// New RC channel values
coming from RC_CHANNELS message
/// @param channelCount Number of available channels, cMaxRcChannels max
/// @param pwmValues -1 signals channel not available
void
rcChannelsChanged
(
int
channelCount
,
int
pwmValues
[
cMaxRcChannels
]);
...
...
@@ -1317,7 +1317,6 @@ private:
void
_handleHeartbeat
(
mavlink_message_t
&
message
);
void
_handleRadioStatus
(
mavlink_message_t
&
message
);
void
_handleRCChannels
(
mavlink_message_t
&
message
);
void
_handleRCChannelsRaw
(
mavlink_message_t
&
message
);
void
_handleBatteryStatus
(
mavlink_message_t
&
message
);
void
_handleSysStatus
(
mavlink_message_t
&
message
);
void
_handleWindCov
(
mavlink_message_t
&
message
);
...
...
src/VehicleSetup/PX4FirmwareUpgradeThread.cc
View file @
80879792
...
...
@@ -90,12 +90,11 @@ void PX4FirmwareUpgradeThreadWorker::_findBoardOnce(void)
emit
foundBoardInfo
(
bootloaderVersion
,
boardId
,
flashSize
);
}
else
{
emit
error
(
_bootloader
->
errorString
());
return
;
}
}
else
{
emit
error
(
_bootloader
->
errorString
());
return
;
}
return
;
}
}
}
else
{
...
...
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