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
97d9118c
Commit
97d9118c
authored
Jul 02, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1696 from dogmaphobic/lowpassRSSI
Low pass filter on RC RSSI
parents
3c8f0abb
b0e764ad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
MainToolBar.cc
src/ui/toolbar/MainToolBar.cc
+10
-3
MainToolBar.h
src/ui/toolbar/MainToolBar.h
+1
-0
No files found.
src/ui/toolbar/MainToolBar.cc
View file @
97d9118c
...
...
@@ -52,6 +52,7 @@ MainToolBar::MainToolBar(QWidget* parent)
,
_showBattery
(
true
)
,
_progressBarValue
(
0.0
f
)
,
_remoteRSSI
(
0
)
,
_remoteRSSIstore
(
100.0
)
,
_telemetryRRSSI
(
0
)
,
_telemetryLRSSI
(
0
)
,
_rollDownMessages
(
0
)
...
...
@@ -328,10 +329,16 @@ void MainToolBar::_telemetryChanged(LinkInterface*, unsigned, unsigned, unsigned
void
MainToolBar
::
_remoteControlRSSIChanged
(
uint8_t
rssi
)
{
// We only care if we haveone single connection
// We only care if we have
one single connection
if
(
_connectionCount
==
1
)
{
if
(
_remoteRSSI
!=
rssi
)
{
_remoteRSSI
=
rssi
;
// Low pass to git rid of jitter
_remoteRSSIstore
=
(
_remoteRSSIstore
*
0.9
f
)
+
((
float
)
rssi
*
0.1
);
uint8_t
filteredRSSI
=
(
uint8_t
)
ceil
(
_remoteRSSIstore
);
if
(
_remoteRSSIstore
<
0.1
)
{
filteredRSSI
=
0
;
}
if
(
_remoteRSSI
!=
filteredRSSI
)
{
_remoteRSSI
=
filteredRSSI
;
emit
remoteRSSIChanged
(
_remoteRSSI
);
}
}
...
...
src/ui/toolbar/MainToolBar.h
View file @
97d9118c
...
...
@@ -134,6 +134,7 @@ private:
bool
_showBattery
;
float
_progressBarValue
;
int
_remoteRSSI
;
double
_remoteRSSIstore
;
int
_telemetryRRSSI
;
int
_telemetryLRSSI
;
...
...
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