mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-15 01:57:50 +00:00
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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user