Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
portapack-mayhem
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mcules
portapack-mayhem
Commits
63c4a60c
Commit
63c4a60c
authored
7 years ago
by
furrtek
Browse files
Options
Downloads
Patches
Plain Diff
Fixed scrolling/FFT view glitch when going back to analog audio rx
parent
0222b60b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
firmware/application/ui/ui_spectrum.cpp
+4
-1
4 additions, 1 deletion
firmware/application/ui/ui_spectrum.cpp
firmware/application/ui/ui_spectrum.hpp
+2
-1
2 additions, 1 deletion
firmware/application/ui/ui_spectrum.hpp
with
6 additions
and
2 deletions
firmware/application/ui/ui_spectrum.cpp
+
4
−
1
View file @
63c4a60c
...
@@ -352,7 +352,10 @@ void WaterfallWidget::set_parent_rect(const Rect new_parent_rect) {
...
@@ -352,7 +352,10 @@ void WaterfallWidget::set_parent_rect(const Rect new_parent_rect) {
waterfall_reduced_rect
=
{
0
,
scale_height
,
new_parent_rect
.
width
(),
new_parent_rect
.
height
()
-
scale_height
-
audio_spectrum_height
};
waterfall_reduced_rect
=
{
0
,
scale_height
,
new_parent_rect
.
width
(),
new_parent_rect
.
height
()
-
scale_height
-
audio_spectrum_height
};
frequency_scale
.
set_parent_rect
({
0
,
0
,
new_parent_rect
.
width
(),
scale_height
});
frequency_scale
.
set_parent_rect
({
0
,
0
,
new_parent_rect
.
width
(),
scale_height
});
waterfall_view
.
set_parent_rect
(
waterfall_normal_rect
);
if
(
fft_widget
)
waterfall_view
.
set_parent_rect
(
waterfall_reduced_rect
);
else
waterfall_view
.
set_parent_rect
(
waterfall_normal_rect
);
waterfall_view
.
on_show
();
waterfall_view
.
on_show
();
fft_widget_rect
=
{
0
,
new_parent_rect
.
height
()
-
audio_spectrum_height
,
new_parent_rect
.
width
(),
audio_spectrum_height
};
fft_widget_rect
=
{
0
,
new_parent_rect
.
height
()
-
audio_spectrum_height
,
new_parent_rect
.
width
(),
audio_spectrum_height
};
...
...
This diff is collapsed.
Click to expand it.
firmware/application/ui/ui_spectrum.hpp
+
2
−
1
View file @
63c4a60c
...
@@ -105,6 +105,7 @@ public:
...
@@ -105,6 +105,7 @@ public:
private
:
private
:
void
on_tick_second
();
void
on_tick_second
();
//static constexpr ui::Dim audio_spectrum_scale_height = 16 + 2;
static
constexpr
ui
::
Dim
audio_spectrum_height
=
2
*
16
;
static
constexpr
ui
::
Dim
audio_spectrum_height
=
2
*
16
;
WaterfallView
waterfall_view
{
};
WaterfallView
waterfall_view
{
};
...
@@ -149,7 +150,7 @@ private:
...
@@ -149,7 +150,7 @@ private:
if
(
this
->
audio_fifo
)
{
if
(
this
->
audio_fifo
)
{
AudioSpectrum
audio_spectrum
;
AudioSpectrum
audio_spectrum
;
while
(
audio_fifo
->
out
(
audio_spectrum
)
)
{
while
(
audio_fifo
->
out
(
audio_spectrum
)
)
{
// Unstack everything
until
and only use last buffer (should only be one max. ready per frame)
// Unstack everything
available
and only use last buffer (should only be one max. ready per frame)
}
}
this
->
on_audio_spectrum
(
audio_spectrum
);
this
->
on_audio_spectrum
(
audio_spectrum
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment