Minor Replay & GPS baseband optimizations (#1289)

* No need to scale progress now that widget is fixed
* Use memcpy vs byte copy, elim progress scaling, correct comments
* Minor optimization in C16->C8 conversion
* Only copy bytes actually read from file
This commit is contained in:
Mark Thompson
2023-07-21 11:50:00 -05:00
committed by GitHub
parent 2af95456a2
commit 8eafe27955
3 changed files with 20 additions and 21 deletions

View File

@@ -65,12 +65,12 @@ void GpsSimAppView::on_file_changed(const fs::path& new_file_path) {
field_frequency.set_value(metadata->center_frequency);
sample_rate = metadata->sample_rate;
} else {
sample_rate = 500000;
sample_rate = 2600000;
}
// UI Fixup.
text_sample_rate.set(unit_auto_scale(sample_rate, 3, 1) + "Hz");
progressbar.set_max(file_size / 1024);
progressbar.set_max(file_size);
text_filename.set(truncate(file_path.filename().string(), 12));
auto duration = ms_duration(file_size, sample_rate, 2);