Add frequency step control to capture app.

Redistribute other controls, remove empty row that had been reserved for options views.
This commit is contained in:
Jared Boone 2016-07-19 10:48:45 -07:00
parent a98ada0cb7
commit 6f65cdf41e
2 changed files with 21 additions and 10 deletions

View File

@ -38,6 +38,7 @@ CaptureAppView::CaptureAppView(NavigationView& nav) {
&rssi,
&channel,
&field_frequency,
&field_frequency_step,
&field_rf_amp,
&field_lna,
&field_vga,
@ -59,6 +60,12 @@ CaptureAppView::CaptureAppView(NavigationView& nav) {
};
};
field_frequency_step.set_by_value(receiver_model.frequency_step());
field_frequency_step.on_change = [this](size_t, OptionsField::value_t v) {
receiver_model.set_frequency_step(v);
this->field_frequency.set_step(v);
};
radio::enable({
tuning_frequency(),
sampling_rate,

View File

@ -47,7 +47,7 @@ public:
std::string title() const override { return "Capture"; };
private:
static constexpr ui::Dim header_height = 3 * 16;
static constexpr ui::Dim header_height = 2 * 16;
static constexpr uint32_t sampling_rate = 4000000;
static constexpr uint32_t baseband_bandwidth = 2500000;
@ -60,31 +60,35 @@ private:
rf::Frequency tuning_frequency() const;
RSSI rssi {
{ 21 * 8, 0, 6 * 8, 4 },
{ 24 * 8, 0, 6 * 8, 4 },
};
Channel channel {
{ 21 * 8, 5, 6 * 8, 4 },
{ 24 * 8, 5, 6 * 8, 4 },
};
FrequencyField field_frequency {
{ 3 * 8, 0 * 16 },
{ 0 * 8, 0 * 16 },
};
FrequencyStepView field_frequency_step {
{ 10 * 8, 0 * 16 },
};
RFAmpField field_rf_amp {
{ 13 * 8, 0 * 16 }
{ 16 * 8, 0 * 16 }
};
LNAGainField field_lna {
{ 15 * 8, 0 * 16 }
};
VGAGainField field_vga {
{ 18 * 8, 0 * 16 }
};
VGAGainField field_vga {
{ 21 * 8, 0 * 16 }
};
RecordView record_view {
{ 0 * 8, 2 * 16, 30 * 8, 1 * 16 },
{ 0 * 8, 1 * 16, 30 * 8, 1 * 16 },
"BBD_????", RecordView::FileType::RawS16, 16384, 3
};