Mechanism to clear waterfall when switching modulations.

This commit is contained in:
Jared Boone 2015-09-01 21:04:27 -07:00
parent d4c85bd786
commit 687e627dae
2 changed files with 20 additions and 0 deletions

View File

@ -567,6 +567,8 @@ void ReceiverView::on_modulation_changed(int32_t modulation) {
receiver_model.set_baseband_bandwidth(1750000);
break;
}
waterfall.clear();
}
void ReceiverView::on_show_options_frequency() {

View File

@ -75,6 +75,12 @@ public:
draw_frequency_ticks(painter, r);
}
void clear() {
spectrum_sampling_rate = 0;
spectrum_bins = 0;
set_dirty();
}
private:
static constexpr Dim filter_band_height = 4;
@ -197,6 +203,13 @@ public:
(void)painter;
}
void clear() {
display.fill_rectangle(
screen_rect(),
Color::black()
);
}
void on_channel_spectrum(
const ChannelSpectrum& spectrum
) {
@ -260,6 +273,11 @@ public:
(void)painter;
}
void clear() {
waterfall_view.clear();
frequency_scale.clear();
}
private:
WaterfallView waterfall_view;
FrequencyScale frequency_scale;