mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-22 13:54:22 -04:00
IQ Trim app and Capture auto-trim (#1456)
* Add IQ Trim app WIP * Add 'trim' checkbox to capture * Implement trimming * Finish auto-trim * Stray //
This commit is contained in:
parent
070eb4003e
commit
ef03f020ce
11 changed files with 537 additions and 51 deletions
|
@ -44,6 +44,7 @@ CaptureAppView::CaptureAppView(NavigationView& nav)
|
|||
&field_vga,
|
||||
&option_bandwidth,
|
||||
&option_format,
|
||||
&check_trim,
|
||||
&record_view,
|
||||
&waterfall,
|
||||
});
|
||||
|
@ -59,6 +60,10 @@ CaptureAppView::CaptureAppView(NavigationView& nav)
|
|||
record_view.set_file_type((RecordView::FileType)file_type);
|
||||
};
|
||||
|
||||
check_trim.on_select = [this](Checkbox&, bool v) {
|
||||
record_view.set_auto_trim(v);
|
||||
};
|
||||
|
||||
freqman_set_bandwidth_option(SPEC_MODULATION, option_bandwidth);
|
||||
option_bandwidth.on_change = [this](size_t, uint32_t bandwidth) {
|
||||
/* Nyquist would imply a sample rate of 2x bandwidth, but because the ADC
|
||||
|
@ -92,7 +97,7 @@ CaptureAppView::CaptureAppView(NavigationView& nav)
|
|||
};
|
||||
|
||||
receiver_model.enable();
|
||||
option_bandwidth.set_by_value(500000); // better by_value than by option_bandwidth.set_selected_index(4), Preselected default option 500kHz.
|
||||
option_bandwidth.set_by_value(500000);
|
||||
|
||||
record_view.on_error = [&nav](std::string message) {
|
||||
nav.display_modal("Error", message);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue