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
cfd1fe2b
Commit
cfd1fe2b
authored
5 years ago
by
Erwin Ried
Browse files
Options
Downloads
Patches
Plain Diff
Progress bar fix
parent
c80ea840
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
firmware/application/apps/gps_sim_app.cpp
+1
-1
1 addition, 1 deletion
firmware/application/apps/gps_sim_app.cpp
firmware/baseband/proc_gps_sim.cpp
+6
-22
6 additions, 22 deletions
firmware/baseband/proc_gps_sim.cpp
with
7 additions
and
23 deletions
firmware/application/apps/gps_sim_app.cpp
+
1
−
1
View file @
cfd1fe2b
...
@@ -82,7 +82,7 @@ void GpsSimAppView::on_file_changed(std::filesystem::path new_file_path) {
...
@@ -82,7 +82,7 @@ void GpsSimAppView::on_file_changed(std::filesystem::path new_file_path) {
auto
file_size
=
data_file
.
size
();
auto
file_size
=
data_file
.
size
();
auto
duration
=
(
file_size
*
1000
)
/
(
1
*
2
*
sample_rate
);
auto
duration
=
(
file_size
*
1000
)
/
(
1
*
2
*
sample_rate
);
progressbar
.
set_max
(
file_size
);
progressbar
.
set_max
(
file_size
/
1024
);
text_filename
.
set
(
file_path
.
filename
().
string
().
substr
(
0
,
12
));
text_filename
.
set
(
file_path
.
filename
().
string
().
substr
(
0
,
12
));
text_duration
.
set
(
to_string_time_ms
(
duration
));
text_duration
.
set
(
to_string_time_ms
(
duration
));
...
...
This diff is collapsed.
Click to expand it.
firmware/baseband/proc_gps_sim.cpp
+
6
−
22
View file @
cfd1fe2b
...
@@ -58,34 +58,18 @@ void ReplayProcessor::execute(const buffer_c8_t& buffer) {
...
@@ -58,34 +58,18 @@ void ReplayProcessor::execute(const buffer_c8_t& buffer) {
}
}
// Fill and "stretch"
// Fill and "stretch"
for
(
size_t
i
=
0
;
i
<
buffer
.
count
;
i
++
)
{
for
(
size_t
i
=
0
;
i
<
buffer
.
count
;
i
++
)
{
/*if (i & 3) {
auto
re_out
=
iq_buffer
.
p
[
i
].
real
()
;
buffer.p[i] = buffer.p[i - 1];
auto
im_out
=
iq_buffer
.
p
[
i
].
imag
()
;
} else {
auto re_out = iq_buffer.p[i >> 3].real() ;
auto im_out = iq_buffer.p[i >> 3].imag() ;
buffer.p[i] = { (int8_t)re_out, (int8_t)im_out };
}*/
/*
if (i % 8 != 0) {
buffer.p[i] = buffer.p[i - 1];
} else {
auto re_out = iq_buffer.p[i/8].real() ;
auto im_out = iq_buffer.p[i/8].imag() ;
buffer.p[i] = { (int8_t)re_out, (int8_t)im_out };
}*/
auto
re_out
=
iq_buffer
.
p
[
i
].
real
()
;
auto
im_out
=
iq_buffer
.
p
[
i
].
imag
()
;
buffer
.
p
[
i
]
=
{
(
int8_t
)
re_out
,
(
int8_t
)
im_out
};
buffer
.
p
[
i
]
=
{
(
int8_t
)
re_out
,
(
int8_t
)
im_out
};
}
}
spectrum_samples
+=
buffer
.
count
;
spectrum_samples
+=
buffer
.
count
;
if
(
spectrum_samples
>=
spectrum_interval_samples
)
{
if
(
spectrum_samples
>=
spectrum_interval_samples
)
{
spectrum_samples
-=
spectrum_interval_samples
;
spectrum_samples
-=
spectrum_interval_samples
;
//channel_spectrum.feed(iq_buffer, channel_filter_pass_f, channel_filter_stop_f);
txprogress_message
.
progress
=
bytes_read
/
1024
;
// Inform UI about progress
txprogress_message
.
progress
=
bytes_read
;
// Inform UI about progress
txprogress_message
.
done
=
false
;
txprogress_message
.
done
=
false
;
shared_memory
.
application_queue
.
push
(
txprogress_message
);
shared_memory
.
application_queue
.
push
(
txprogress_message
);
}
}
...
...
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