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
9ad93cf0
Commit
9ad93cf0
authored
Apr 18, 2017
by
Gus Grubba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RC noise and remote noise are defined as “unsigned”. Handle them as such.
parent
83b22d62
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
MAVLinkProtocol.cc
src/comm/MAVLinkProtocol.cc
+9
-6
No files found.
src/comm/MAVLinkProtocol.cc
View file @
9ad93cf0
...
...
@@ -213,8 +213,10 @@ void MAVLinkProtocol::receiveBytes(LinkInterface* link, QByteArray b)
// process telemetry status message
mavlink_radio_status_t
rstatus
;
mavlink_msg_radio_status_decode
(
&
message
,
&
rstatus
);
int
rssi
=
rstatus
.
rssi
,
remrssi
=
rstatus
.
remrssi
;
int
rssi
=
rstatus
.
rssi
;
int
remrssi
=
rstatus
.
remrssi
;
int
noise
=
rstatus
.
noise
;
int
remnoise
=
rstatus
.
remnoise
;
// 3DR Si1k radio needs rssi fields to be converted to dBm
if
(
message
.
sysid
==
'3'
&&
message
.
compid
==
'D'
)
{
/* Per the Si1K datasheet figure 23.25 and SI AN474 code
...
...
@@ -230,12 +232,13 @@ void MAVLinkProtocol::receiveBytes(LinkInterface* link, QByteArray b)
rssi
=
qMin
(
qMax
(
qRound
(
static_cast
<
qreal
>
(
rssi
)
/
1.9
-
127.0
),
-
120
),
0
);
remrssi
=
qMin
(
qMax
(
qRound
(
static_cast
<
qreal
>
(
remrssi
)
/
1.9
-
127.0
),
-
120
),
0
);
}
else
{
rssi
=
(
int8_t
)
rstatus
.
rssi
;
remrssi
=
(
int8_t
)
rstatus
.
remrssi
;
rssi
=
(
int8_t
)
rstatus
.
rssi
;
remrssi
=
(
int8_t
)
rstatus
.
remrssi
;
noise
=
(
int8_t
)
rstatus
.
noise
;
remnoise
=
(
int8_t
)
rstatus
.
remnoise
;
}
emit
radioStatusChanged
(
link
,
rstatus
.
rxerrors
,
rstatus
.
fixed
,
rssi
,
remrssi
,
rstatus
.
txbuf
,
rstatus
.
noise
,
rstatus
.
remnoise
);
rstatus
.
txbuf
,
noise
,
remnoise
);
}
#ifndef __mobile__
...
...
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