Automatically switch to C8 capture format when bandwidth >1.5MHz (#1404)

* Automatically select C8

* Automatically select C8
This commit is contained in:
Mark Thompson 2023-08-24 03:14:18 -05:00 committed by GitHub
parent f537c7896e
commit 966d1c938b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -82,6 +82,12 @@ CaptureAppView::CaptureAppView(NavigationView& nav)
auto anti_alias_filter_bandwidth = filter_bandwidth_for_sampling_rate(actual_sample_rate);
receiver_model.set_baseband_bandwidth(anti_alias_filter_bandwidth);
// Automatically switch default capture format to C8 when bandwidth setting is increased to >=1.5MHz
if ((bandwidth >= 1500000) && (previous_bandwidth < 1500000)) {
option_format.set_selected_index(1);
}
previous_bandwidth = bandwidth;
waterfall.start();
};

View File

@ -46,6 +46,7 @@ class CaptureAppView : public View {
private:
static constexpr ui::Dim header_height = 3 * 16;
uint32_t previous_bandwidth{500000};
NavigationView& nav_;
RxRadioState radio_state_{ReceiverModel::Mode::Capture};