Added wefax offset to audio app too. (#2572)

* added wefax offset to audio app too.

* moved from head to cpp
This commit is contained in:
Totoo
2025-03-19 23:03:04 +01:00
committed by GitHub
parent ff2f27e297
commit d73db884f0
3 changed files with 9 additions and 1 deletions

View File

@@ -265,6 +265,7 @@ void AnalogAudioView::set_spec_trigger(uint16_t trigger) {
}
AnalogAudioView::~AnalogAudioView() {
receiver_model.set_hidden_offset(0);
audio::output::stop();
receiver_model.disable();
baseband::shutdown();
@@ -431,6 +432,8 @@ void AnalogAudioView::update_modulation(ReceiverModel::Mode modulation) {
receiver_model.set_sampling_rate(is_wideband_spectrum_mode ? spec_bw : 3072000);
receiver_model.set_baseband_bandwidth(is_wideband_spectrum_mode ? spec_bw / 2 : 1750000);
receiver_model.set_hidden_offset(modulation == ReceiverModel::Mode::AMAudioFMApt ? -2200 : 0); // wefax needs to be shifted, see wefax rx app.
receiver_model.enable();
// TODO: This doesn't belong here! There's a better way.