Remove unneeded AMFM support in those apps (#2597)

This commit is contained in:
gullradriel 2025-03-26 11:58:11 +01:00 committed by GitHub
parent 75c34747cb
commit 2c118ae584
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 21 additions and 33 deletions

View file

@ -455,9 +455,9 @@ ScannerView::ScannerView(
// initialize to a value under SPEC
static freqman_index_t last_mode = WFM_MODULATION;
// unsupported SPEC mode fix
if (v == SPEC_MODULATION) {
if (v >= SPEC_MODULATION) {
if (last_mode == WFM_MODULATION)
v = AMFM_MODULATION;
v = AM_MODULATION;
else
v = WFM_MODULATION;
field_mode.set_selected_index(v);
@ -727,14 +727,6 @@ void ScannerView::change_mode(freqman_index_t new_mod) {
field_bw.set_by_value(receiver_model.wfm_configuration());
field_bw.on_change = [this](size_t, OptionsField::value_t n) { receiver_model.set_wfm_configuration(n); };
break;
case AMFM_MODULATION:
freqman_set_bandwidth_option(new_mod, field_bw);
baseband::run_image(portapack::spi_flash::image_tag_am_audio);
receiver_model.set_modulation(ReceiverModel::Mode::AMAudioFMApt);
receiver_model.set_amfm_configuration(5);
field_bw.set_by_value(0);
field_bw.on_change = [this](size_t, OptionsField::value_t n) { (void)n; };
break;
default:
break;
}