Added channel centering cursor in waterfall view

Added more samplerate choices in capture
Updated binary
This commit is contained in:
furrtek
2018-04-18 22:44:41 +01:00
parent d0ce9610b5
commit 5636764226
7 changed files with 114 additions and 13 deletions

View File

@@ -148,6 +148,10 @@ AnalogAudioView::AnalogAudioView(
record_view.on_error = [&nav](std::string message) {
nav.display_modal("Error", message);
};
waterfall.on_select = [this](int32_t offset) {
field_frequency.set_value(receiver_model.tuning_frequency() + offset);
};
audio::output::start();

View File

@@ -104,6 +104,8 @@ public:
void focus() override;
std::string title() const override { return "Analog audio"; };
private:
static constexpr ui::Dim header_height = 3 * 16;
@@ -168,7 +170,7 @@ private:
u"AUD_????", RecordView::FileType::WAV, 4096, 4
};
spectrum::WaterfallWidget waterfall { };
spectrum::WaterfallWidget waterfall { true };
void on_tuning_frequency_changed(rf::Frequency f);
void on_baseband_bandwidth_changed(uint32_t bandwidth_hz);

View File

@@ -1,5 +1,6 @@
/*
* Copyright (C) 2016 Jared Boone, ShareBrained Technology, Inc.
* Copyright (C) 2018 Furrtek
*
* This file is part of PortaPack.
*
@@ -68,8 +69,8 @@ CaptureAppView::CaptureAppView(NavigationView& nav) {
this->field_frequency.set_step(v);
};
option_bandwidth.on_change = [this](size_t, uint32_t divider) {
sampling_rate = 4000000 / divider;
option_bandwidth.on_change = [this](size_t, uint32_t base_rate) {
sampling_rate = 8 * base_rate;
waterfall.on_hide();
set_target_frequency(target_frequency());
@@ -88,7 +89,7 @@ CaptureAppView::CaptureAppView(NavigationView& nav) {
static_cast<int8_t>(receiver_model.vga()),
});
option_bandwidth.set_selected_index(4); // 500k
option_bandwidth.set_selected_index(7); // 500k
record_view.on_error = [&nav](std::string message) {
nav.display_modal("Error", message);

View File

@@ -1,5 +1,6 @@
/*
* Copyright (C) 2016 Jared Boone, ShareBrained Technology, Inc.
* Copyright (C) 2018 Furrtek
*
* This file is part of PortaPack.
*
@@ -93,13 +94,16 @@ private:
OptionsField option_bandwidth {
{ 5 * 8, 1 * 16 },
4,
5,
{
{ " 25k", 20 },
{ " 50k", 10 },
{ "100k", 5 },
{ "250k", 2 },
{ "500k", 1 }
{ " 8k5", 8500 },
{ " 11k ", 11000 },
{ " 16k ", 16000 },
{ " 25k ", 25000 },
{ " 50k ", 50000 },
{ "100k ", 100000 },
{ "250k ", 250000 },
{ "500k ", 500000 }
}
};