diff --git a/firmware/application/apps/capture_app.cpp b/firmware/application/apps/capture_app.cpp index ca5c5477..a1b1d483 100644 --- a/firmware/application/apps/capture_app.cpp +++ b/firmware/application/apps/capture_app.cpp @@ -55,12 +55,15 @@ CaptureAppView::CaptureAppView(NavigationView& nav) this->field_frequency.set_step(v); }; - option_format.set_selected_index(0); // Default to C16 + option_format.set_selected_index(previous_format); option_format.on_change = [this](size_t, uint32_t file_type) { + previous_format = file_type; record_view.set_file_type((RecordView::FileType)file_type); }; + check_trim.set_value(previous_trim); check_trim.on_select = [this](Checkbox&, bool v) { + previous_trim = v; record_view.set_auto_trim(v); }; @@ -100,7 +103,7 @@ CaptureAppView::CaptureAppView(NavigationView& nav) }; receiver_model.enable(); - option_bandwidth.set_by_value(500000); + option_bandwidth.set_by_value(previous_bandwidth); record_view.on_error = [&nav](std::string message) { nav.display_modal("Error", message); diff --git a/firmware/application/apps/capture_app.hpp b/firmware/application/apps/capture_app.hpp index d86f9c14..e72fdb79 100644 --- a/firmware/application/apps/capture_app.hpp +++ b/firmware/application/apps/capture_app.hpp @@ -48,12 +48,21 @@ class CaptureAppView : public View { private: static constexpr ui::Dim header_height = 3 * 16; + uint32_t previous_bandwidth{500000}; + uint32_t previous_format{0}; + bool previous_trim{false}; NavigationView& nav_; RxRadioState radio_state_{ReceiverModel::Mode::Capture}; app_settings::SettingsManager settings_{ - "rx_capture", app_settings::Mode::RX}; + "rx_capture", + app_settings::Mode::RX, + { + {"previous_bandwidth"sv, &previous_bandwidth}, + {"previous_format"sv, &previous_format}, + {"previous_trim"sv, &previous_trim}, + }}; Labels labels{ {{0 * 8, 1 * 16}, "Rate:", Theme::getInstance()->fg_light->foreground},