Enable Sample Rate to be spec'd in .ini file for Weather & SubGhzDecoder apps (#1659)

This commit is contained in:
Mark Thompson 2023-12-21 12:33:06 -06:00 committed by GitHub
parent 36e1b9a36e
commit 19a66fac20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 28 additions and 26 deletions

View file

@ -115,8 +115,7 @@ WeatherView::WeatherView(NavigationView& nav)
recent_entries_view.on_select = [this](const WeatherRecentEntry& entry) {
nav_.push<WeatherRecentEntryDetailView>(entry);
};
baseband::set_weather();
receiver_model.set_sampling_rate(4'000'000); // needed too
baseband::set_subghzd_config(0, receiver_model.sampling_rate()); // 0=am
receiver_model.enable();
signal_token_tick_second = rtc_time::signal_tick_second += [this]() {
on_tick_second();
@ -233,4 +232,4 @@ void RecentEntriesTable<ui::WeatherRecentEntries>::draw(
painter.draw_string(target_rect.location(), style, line);
}
} // namespace ui
} // namespace ui