Skip to content

Commit 4342f5c

Browse files
authored
Adding_WFM_AM_mode_to_Audio_App (#2644)
* Adding_WFM_AM_mode_to_Audio_App * more precise values for cos and sin theta, fix sen_theta to sin_theta * fix sen_theta to sin_theta
1 parent bd781ce commit 4342f5c

18 files changed

+448
-49
lines changed

firmware/application/apps/analog_audio_app.cpp

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,26 @@ WFMOptionsView::WFMOptionsView(
114114
};
115115
}
116116

117+
/* WFMAMAptOptionsView *******************************************************/
118+
119+
WFMAMAptOptionsView::WFMAMAptOptionsView(
120+
Rect parent_rect,
121+
const Style* style)
122+
: View{parent_rect} {
123+
set_style(style);
124+
125+
add_children({
126+
&label_config,
127+
&options_config,
128+
});
129+
130+
freqman_set_bandwidth_option(WFMAM_MODULATION, options_config); // adding the common message from freqman.cpp to the options_config
131+
options_config.set_by_value(receiver_model.wfmam_configuration());
132+
options_config.on_change = [this](size_t, OptionsField::value_t n) {
133+
receiver_model.set_wfmam_configuration(n);
134+
};
135+
}
136+
117137
/* AMFMAptOptionsView *********************************************************/
118138

119139
AMFMAptOptionsView::AMFMAptOptionsView(
@@ -415,6 +435,12 @@ void AnalogAudioView::on_show_options_modulation() {
415435
text_ctcss.hidden(true);
416436
break;
417437

438+
case ReceiverModel::Mode::WFMAudioAMApt:
439+
widget = std::make_unique<WFMAMAptOptionsView>(options_view_rect, Theme::getInstance()->option_active);
440+
waterfall.show_audio_spectrum_view(true);
441+
text_ctcss.hidden(true);
442+
break;
443+
418444
case ReceiverModel::Mode::AMAudioFMApt:
419445
widget = std::make_unique<AMFMAptOptionsView>(this, options_view_rect, Theme::getInstance()->option_active);
420446
waterfall.show_audio_spectrum_view(false);
@@ -462,7 +488,10 @@ void AnalogAudioView::update_modulation(ReceiverModel::Mode modulation) {
462488
case ReceiverModel::Mode::WidebandFMAudio:
463489
image_tag = portapack::spi_flash::image_tag_wfm_audio;
464490
break;
465-
case ReceiverModel::Mode::AMAudioFMApt: // TODO pending to update it.
491+
case ReceiverModel::Mode::WFMAudioAMApt:
492+
image_tag = portapack::spi_flash::image_tag_wfm_audio;
493+
break;
494+
case ReceiverModel::Mode::AMAudioFMApt:
466495
image_tag = portapack::spi_flash::image_tag_am_audio;
467496
break;
468497
case ReceiverModel::Mode::SpectrumAnalysis:
@@ -501,7 +530,10 @@ void AnalogAudioView::update_modulation(ReceiverModel::Mode modulation) {
501530
case ReceiverModel::Mode::WidebandFMAudio:
502531
sampling_rate = 48000;
503532
break;
504-
case ReceiverModel::Mode::AMAudioFMApt: // TODO Wefax mode.
533+
case ReceiverModel::Mode::WFMAudioAMApt:
534+
sampling_rate = 12000;
535+
break;
536+
case ReceiverModel::Mode::AMAudioFMApt:
505537
sampling_rate = 12000;
506538
break;
507539
default:

firmware/application/apps/analog_audio_app.hpp

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class AMFMAptOptionsView : public View {
7474

7575
OptionsField options_config{
7676
{3 * 8, 0 * 16},
77-
6, // Max option length chars
77+
6, // Max option length chars "USB+FM"
7878
{
7979
// Using common messages from freqman_ui.cpp In HF USB , Here we only need USB Audio demod, + post-FM demod fsubcarrier FM tone to get APT signal.
8080
}};
@@ -132,6 +132,23 @@ class WFMOptionsView : public View {
132132
}};
133133
};
134134

135+
class WFMAMAptOptionsView : public View {
136+
public:
137+
WFMAMAptOptionsView(Rect parent_rect, const Style* style);
138+
139+
private:
140+
Text label_config{
141+
{0 * 8, 0 * 16, 2 * 8, 1 * 16},
142+
"BW",
143+
};
144+
OptionsField options_config{
145+
{3 * 8, 0 * 16},
146+
10, // Max option char length "FM+AM(DSB)"
147+
{
148+
// Using common messages from freqman_ui.cpp
149+
}};
150+
};
151+
135152
class SPECOptionsView : public View {
136153
public:
137154
SPECOptionsView(AnalogAudioView* view, Rect parent_rect, const Style* style);
@@ -215,7 +232,7 @@ class AnalogAudioView : public View {
215232
uint8_t zoom_factor_amfm{0}; // initial zoom factor in AMFM mode
216233
uint8_t previous_AM_mode_option{0}; // GUI 5 AM modes : (0..4 ) (DSB9K, DSB6K, USB,LSB, CW). Used to select proper FIR filter (0..11) AM mode + offset 0 (zoom+1) or +6 (if zoom+2)
217234
uint8_t previous_zoom{0}; // GUI ZOOM+1, ZOOM+2 , equivalent to two values offset 0 (zoom+1) or +6 (if zoom+2)
218-
//
235+
219236
app_settings::SettingsManager settings_{
220237
"rx_audio",
221238
app_settings::Mode::RX,
@@ -261,7 +278,8 @@ class AnalogAudioView : public View {
261278
{"NFM ", toUType(ReceiverModel::Mode::NarrowbandFMAudio)},
262279
{"WFM ", toUType(ReceiverModel::Mode::WidebandFMAudio)},
263280
{"SPEC", toUType(ReceiverModel::Mode::SpectrumAnalysis)},
264-
{"AMFM", toUType(ReceiverModel::Mode::AMAudioFMApt)} // Added to handle HF WeatherFax , SSB (USB demod) + Tone_Subcarrier FM demod
281+
{"AMFM", toUType(ReceiverModel::Mode::AMAudioFMApt)}, // Added to handle HF WeatherFax , SSB (USB demod) + Tone_Subcarrier FM demod
282+
{"FMAM", toUType(ReceiverModel::Mode::WFMAudioAMApt)} // Added to handle SAT NOAA APT
265283
}};
266284

267285
AudioVolumeField field_volume{

firmware/application/apps/ui_freqman.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ using option_db_t = std::pair<std::string_view, int32_t>;
4545
using options_db_t = std::vector<option_db_t>;
4646

4747
extern options_db_t freqman_modulations;
48-
extern options_db_t freqman_bandwidths[5];
48+
extern options_db_t freqman_bandwidths[6];
4949
// extern options_db_t freqman_steps; // now included via ui_receiver.hpp
5050
extern options_db_t freqman_steps_short;
5151

firmware/application/baseband_api.cpp

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,16 +93,28 @@ void NBFMConfig::apply(const uint8_t squelch_level) const {
9393

9494
void WFMConfig::apply() const {
9595
const WFMConfigureMessage message{
96-
decim_0, // taps_200k_decim_0 , taps_180k_wfm_decim_0, taps_40k_wfm_decim_0
97-
decim_1, // taps_200k_decim_1 or taps_180k_wfm_decim_1, taps_40k_wfm_decim_1
98-
taps_64_lp_156_198,
96+
decim_0, // Dynamic array 24 taps : taps_200k_decim_0 , taps_180k_wfm_decim_0, taps_40k_wfm_decim_0
97+
decim_1, // Dynamic array 16 taps : taps_200k_decim_1 or taps_180k_wfm_decim_1, taps_40k_wfm_decim_1
98+
taps_64_lp_156_198, // Fixed channel audio filter 15khz
9999
75000,
100100
audio_48k_hpf_30hz_config,
101101
audio_48k_deemph_2122_6_config};
102102
send_message(&message);
103103
audio::set_rate(audio::Rate::Hz_48000);
104104
}
105105

106+
void WFMAMConfig::apply() const {
107+
const WFMAMConfigureMessage message{
108+
decim_0, // Fixed 24 taps array : taps_16k0_decim_0
109+
decim_1, // Fixed 32 taps array : taps_84k_wfm_decim_1
110+
taps_64_lp_1875_2166, // Fixed channel audio filter , 64 taps array , to filter DSB AM 2k4 carrier before demod. AM .
111+
17000, // NOAA satellite tx , FM deviation = +-17Khz.
112+
apt_audio_12k_notch_2k4_config,
113+
apt_audio_12k_lpf_2000hz_config};
114+
send_message(&message);
115+
audio::set_rate(audio::Rate::Hz_12000);
116+
}
117+
106118
void set_tone(const uint32_t index, const uint32_t delta, const uint32_t duration) {
107119
shared_memory.bb_data.tones_data.tone_defs[index].delta = delta;
108120
shared_memory.bb_data.tones_data.tone_defs[index].duration = duration;

firmware/application/baseband_api.hpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,19 @@ struct NBFMConfig {
5656
};
5757

5858
struct WFMConfig {
59-
const fir_taps_real<24> decim_0; // To handle both WFM filters , 200k and 40K for NOAA APT
59+
const fir_taps_real<24> decim_0; // To handle all 3 WFM filters , 200k, 180k and 40K-
6060
const fir_taps_real<16> decim_1;
6161

6262
void apply() const;
6363
};
6464

65+
struct WFMAMConfig {
66+
const fir_taps_real<24> decim_0; // To handle WFM filter BW=40K for NOAA APT
67+
const fir_taps_real<32> decim_1;
68+
69+
void apply() const;
70+
};
71+
6572
void set_tone(const uint32_t index, const uint32_t delta, const uint32_t duration);
6673
void set_tones_config(const uint32_t bw, const uint32_t pre_silence, const uint16_t tone_count, const bool dual_tone, const bool audio_out);
6774
void kill_tone();

firmware/application/external/debug_pmem/ui_debug_pmem.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ bool DebugDumpView::debug_dump_func() {
157157
case ReceiverModel::Mode::WidebandFMAudio:
158158
pmem_dump_file.write_line("modulation: Mode::WidebandFMAudio");
159159
break;
160+
case ReceiverModel::Mode::WFMAudioAMApt:
161+
pmem_dump_file.write_line("modulation: Mode::WFMAudioAMApt");
162+
break;
160163
case ReceiverModel::Mode::SpectrumAnalysis:
161164
pmem_dump_file.write_line("modulation: Mode::SpectrumAnalysis");
162165
break;

firmware/application/freqman.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ enum freqman_entry_modulation : uint8_t {
4242
NFM_MODULATION,
4343
WFM_MODULATION,
4444
SPEC_MODULATION,
45-
AMFM_MODULATION // Added for Wefax.
45+
AMFM_MODULATION, // Added for HF Wefax.demod APT signal
46+
WFMAM_MODULATION // Added for NOAA 137 Mhz satellite band, demod APT signal.
4647
};
4748

4849
// TODO: Can these be removed after Recon is migrated to FreqmanDB?

firmware/application/freqman_db.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,11 @@ options_t freqman_modulations = {
4949
{"NFM", 1},
5050
{"WFM", 2},
5151
{"SPEC", 3},
52-
{"AMFM", 4},
52+
{"AMFM", 4}, // To handle HF Wefax AM and FM demod. inside Audio App.
53+
{"FMAM", 5}, // To handle NOAA 137 Mhz Sat FM and AM demod inside Audio App.
5354
};
5455

55-
options_t freqman_bandwidths[5] = {
56+
options_t freqman_bandwidths[6] = {
5657
{
5758
// AM
5859
{"DSB 9k", 0},
@@ -103,7 +104,11 @@ options_t freqman_bandwidths[5] = {
103104
},
104105
{
105106
// AMFM for Wefax-
106-
{"USB+FM", 5}, // Fixed RX demodul AM config Index 5 : USB+FM for Audio Weather fax (WFAX) tones.
107+
{"USB+FM", 5}, // Fixed RX demod. AM config Index 5 : USB+FM for Audio Weather fax (WFAX) tones.
108+
},
109+
{
110+
// WFMAM for NOAA satellites, 137 Mhz band
111+
{"FM+AM(DSB)", 1}, // Fixed RX demod- WFM config Index 1 : FM+AM for Audio NOAA APT ones.
107112
},
108113
};
109114

firmware/application/receiver_model.cpp

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,20 @@ namespace {
4141

4242
static constexpr std::array<baseband::AMConfig, 12> am_configs{{
4343
// we config here all the non COMMON parameters to each AM modulation type in RX.
44-
{taps_6k0_decim_1, taps_9k0_decim_2, taps_9k0_dsb_channel, AMConfigureMessage::Modulation::DSB, audio_12k_hpf_300hz_config, (int)AMConfigureMessage::Zoom_waterfall::ZOOM_x_1}, // AM DSB-C BW 9khz (+-4k5) commercial EU bandwidth .
45-
{taps_6k0_decim_1, taps_6k0_decim_2, taps_6k0_dsb_channel, AMConfigureMessage::Modulation::DSB, audio_12k_hpf_300hz_config, (int)AMConfigureMessage::Zoom_waterfall::ZOOM_x_1}, // AM DSB-C BW 6khz (+-3k0) narrow AM , ham equipments.
46-
{taps_6k0_decim_1, taps_6k0_decim_2, taps_2k8_usb_channel, AMConfigureMessage::Modulation::SSB, audio_12k_hpf_300hz_config, (int)AMConfigureMessage::Zoom_waterfall::ZOOM_x_1}, // SSB USB BW 2K8 (+ 2K8) SSB ham equipments.
47-
{taps_6k0_decim_1, taps_6k0_decim_2, taps_2k8_lsb_channel, AMConfigureMessage::Modulation::SSB, audio_12k_hpf_300hz_config, (int)AMConfigureMessage::Zoom_waterfall::ZOOM_x_1}, // SSB LSB BW 2K8 (- 2K8) SSB ham equipments.
48-
{taps_6k0_decim_1, taps_6k0_decim_2, taps_0k7_usb_channel, AMConfigureMessage::Modulation::SSB, audio_12k_hpf_300hz_config, (int)AMConfigureMessage::Zoom_waterfall::ZOOM_x_1}, // SSB USB BW 0K7 (+ 0K7) To get audio tone from CW Morse, assuming tx shifted +700hz aprox
49-
{taps_6k0_decim_1, taps_6k0_decim_2, taps_2k6_usb_wefax_channel, AMConfigureMessage::Modulation::SSB_FM, audio_12k_lpf_1500hz_config, (int)AMConfigureMessage::Zoom_waterfall::ZOOM_x_1}, // SSB USB+FM to demod. Subcarrier FM Audio Tones to get APT Weather Fax.
44+
{taps_6k0_decim_1, taps_9k0_decim_2, taps_9k0_dsb_channel, AMConfigureMessage::Modulation::DSB, audio_12k_hpf_300hz_config, (int)AMConfigureMessage::Zoom_waterfall::ZOOM_x_1}, // AM DSB-C BW 9khz (+-4k5) commercial EU bandwidth .
45+
{taps_6k0_decim_1, taps_6k0_decim_2, taps_6k0_dsb_channel, AMConfigureMessage::Modulation::DSB, audio_12k_hpf_300hz_config, (int)AMConfigureMessage::Zoom_waterfall::ZOOM_x_1}, // AM DSB-C BW 6khz (+-3k0) narrow AM , ham equipments.
46+
{taps_6k0_decim_1, taps_6k0_decim_2, taps_2k8_usb_channel, AMConfigureMessage::Modulation::SSB, audio_12k_hpf_300hz_config, (int)AMConfigureMessage::Zoom_waterfall::ZOOM_x_1}, // SSB USB BW 2K8 (+ 2K8) SSB ham equipments.
47+
{taps_6k0_decim_1, taps_6k0_decim_2, taps_2k8_lsb_channel, AMConfigureMessage::Modulation::SSB, audio_12k_hpf_300hz_config, (int)AMConfigureMessage::Zoom_waterfall::ZOOM_x_1}, // SSB LSB BW 2K8 (- 2K8) SSB ham equipments.
48+
{taps_6k0_decim_1, taps_6k0_decim_2, taps_0k7_usb_channel, AMConfigureMessage::Modulation::SSB, audio_12k_hpf_300hz_config, (int)AMConfigureMessage::Zoom_waterfall::ZOOM_x_1}, // SSB USB BW 0K7 (+ 0K7) To get audio tone from CW Morse, assuming tx shifted +700hz aprox
49+
{taps_6k0_decim_1, taps_6k0_decim_2, taps_2k6_usb_wefax_channel, AMConfigureMessage::Modulation::SSB_FM, apt_audio_12k_lpf_1500hz_config, (int)AMConfigureMessage::Zoom_waterfall::ZOOM_x_1}, // SSB USB+FM to demod. Subcarrier FM Audio Tones to get APT Weather Fax.
5050

5151
// below options for Waterfall zoom x 2
52-
{taps_6k0_narrow_decim_1, taps_9k0_decim_2, taps_9k0_dsb_channel, AMConfigureMessage::Modulation::DSB, audio_12k_hpf_300hz_config, (int)AMConfigureMessage::Zoom_waterfall::ZOOM_x_2}, // AM DSB-C BW 9khz (+-4k5) commercial EU bandwidth .
53-
{taps_6k0_narrow_decim_1, taps_6k0_decim_2, taps_6k0_dsb_channel, AMConfigureMessage::Modulation::DSB, audio_12k_hpf_300hz_config, (int)AMConfigureMessage::Zoom_waterfall::ZOOM_x_2}, // AM DSB-C BW 6khz (+-3k0) narrow AM , ham equipments.
54-
{taps_6k0_narrow_decim_1, taps_6k0_decim_2, taps_2k8_usb_channel, AMConfigureMessage::Modulation::SSB, audio_12k_hpf_300hz_config, (int)AMConfigureMessage::Zoom_waterfall::ZOOM_x_2}, // SSB USB BW 2K8 (+ 2K8) SSB ham equipments.
55-
{taps_6k0_narrow_decim_1, taps_6k0_decim_2, taps_2k8_lsb_channel, AMConfigureMessage::Modulation::SSB, audio_12k_hpf_300hz_config, (int)AMConfigureMessage::Zoom_waterfall::ZOOM_x_2}, // SSB LSB BW 2K8 (- 2K8) SSB ham equipments.
56-
{taps_6k0_narrow_decim_1, taps_6k0_decim_2, taps_0k7_usb_channel, AMConfigureMessage::Modulation::SSB, audio_12k_hpf_300hz_config, (int)AMConfigureMessage::Zoom_waterfall::ZOOM_x_2}, // SSB USB BW 0K7 (+ 0K7) To get audio tone from CW Morse, assuming tx shifted +700hz aprox
57-
{taps_6k0_narrow_decim_1, taps_6k0_decim_2, taps_2k6_usb_wefax_channel, AMConfigureMessage::Modulation::SSB_FM, audio_12k_lpf_1500hz_config, (int)AMConfigureMessage::Zoom_waterfall::ZOOM_x_2}, // SSB USB+FM to demod. Subcarrier FM Audio Tones to get APT Weather Fax with waterfall zoom x 2 (we need taps_6k0_narrow_decim_1 to minimize aliasing)
52+
{taps_6k0_narrow_decim_1, taps_9k0_decim_2, taps_9k0_dsb_channel, AMConfigureMessage::Modulation::DSB, audio_12k_hpf_300hz_config, (int)AMConfigureMessage::Zoom_waterfall::ZOOM_x_2}, // AM DSB-C BW 9khz (+-4k5) commercial EU bandwidth .
53+
{taps_6k0_narrow_decim_1, taps_6k0_decim_2, taps_6k0_dsb_channel, AMConfigureMessage::Modulation::DSB, audio_12k_hpf_300hz_config, (int)AMConfigureMessage::Zoom_waterfall::ZOOM_x_2}, // AM DSB-C BW 6khz (+-3k0) narrow AM , ham equipments.
54+
{taps_6k0_narrow_decim_1, taps_6k0_decim_2, taps_2k8_usb_channel, AMConfigureMessage::Modulation::SSB, audio_12k_hpf_300hz_config, (int)AMConfigureMessage::Zoom_waterfall::ZOOM_x_2}, // SSB USB BW 2K8 (+ 2K8) SSB ham equipments.
55+
{taps_6k0_narrow_decim_1, taps_6k0_decim_2, taps_2k8_lsb_channel, AMConfigureMessage::Modulation::SSB, audio_12k_hpf_300hz_config, (int)AMConfigureMessage::Zoom_waterfall::ZOOM_x_2}, // SSB LSB BW 2K8 (- 2K8) SSB ham equipments.
56+
{taps_6k0_narrow_decim_1, taps_6k0_decim_2, taps_0k7_usb_channel, AMConfigureMessage::Modulation::SSB, audio_12k_hpf_300hz_config, (int)AMConfigureMessage::Zoom_waterfall::ZOOM_x_2}, // SSB USB BW 0K7 (+ 0K7) To get audio tone from CW Morse, assuming tx shifted +700hz aprox
57+
{taps_6k0_narrow_decim_1, taps_6k0_decim_2, taps_2k6_usb_wefax_channel, AMConfigureMessage::Modulation::SSB_FM, apt_audio_12k_lpf_1500hz_config, (int)AMConfigureMessage::Zoom_waterfall::ZOOM_x_2}, // SSB USB+FM to demod. Subcarrier FM Audio Tones to get APT Weather Fax with waterfall zoom x 2 (we need taps_6k0_narrow_decim_1 to minimize aliasing)
5858
}};
5959

6060
static constexpr std::array<baseband::NBFMConfig, 3> nbfm_configs{{
@@ -69,6 +69,10 @@ static constexpr std::array<baseband::WFMConfig, 3> wfm_configs{{
6969
{taps_40k_wfm_decim_0, taps_40k_wfm_decim_1},
7070
}};
7171

72+
static constexpr std::array<baseband::WFMAMConfig, 1> wfmam_configs{{
73+
{taps_16k0_decim_0, taps_84k_wfmam_decim_1},
74+
}};
75+
7276
} /* namespace */
7377

7478
rf::Frequency ReceiverModel::target_frequency() const {
@@ -187,6 +191,17 @@ void ReceiverModel::set_wfm_configuration(uint8_t n) {
187191
}
188192
}
189193

194+
uint8_t ReceiverModel::wfmam_configuration() const {
195+
return settings_.wfmam_config_index;
196+
}
197+
198+
void ReceiverModel::set_wfmam_configuration(uint8_t n) {
199+
if (n < wfmam_configs.size()) {
200+
settings_.wfmam_config_index = n;
201+
update_modulation();
202+
}
203+
}
204+
190205
uint8_t ReceiverModel::squelch_level() const {
191206
return settings_.squelch_level;
192207
}
@@ -340,6 +355,10 @@ void ReceiverModel::update_modulation() {
340355
update_wfm_configuration();
341356
break;
342357

358+
case Mode::WFMAudioAMApt:
359+
update_wfmam_configuration();
360+
break;
361+
343362
case Mode::SpectrumAnalysis:
344363
case Mode::Capture:
345364
break;
@@ -362,6 +381,10 @@ void ReceiverModel::update_wfm_configuration() {
362381
wfm_configs[wfm_configuration()].apply();
363382
}
364383

384+
void ReceiverModel::update_wfmam_configuration() {
385+
wfmam_configs[wfmam_configuration()].apply(); // update with different index for Wefax.
386+
}
387+
365388
void ReceiverModel::update_antenna_bias() {
366389
if (enabled_)
367390
radio::set_antenna_bias(portapack::get_antenna_bias());

firmware/application/receiver_model.hpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ class ReceiverModel {
4141
NarrowbandFMAudio = 1,
4242
WidebandFMAudio = 2,
4343
SpectrumAnalysis = 3,
44-
AMAudioFMApt = 4, // Added to handle HF WeatherFax , SSB (USB demod) + Tone_Subcarrier FM demod
45-
Capture = 5,
44+
AMAudioFMApt = 4, // Added to handle HF WeatherFax , SSB (USB demod) + Tone_Subcarrier FM demod
45+
WFMAudioAMApt = 5, // Added to handle SAT Weather map , NOAA 137 Mhz.
46+
Capture = 6,
4647
};
4748

4849
struct settings_t {
@@ -56,6 +57,7 @@ class ReceiverModel {
5657
Mode mode = Mode::NarrowbandFMAudio;
5758
uint8_t am_config_index = 0;
5859
uint8_t amfm_config_index = 0;
60+
uint8_t wfmam_config_index = 0;
5961
uint8_t nbfm_config_index = 0;
6062
uint8_t wfm_config_index = 0;
6163
uint8_t squelch_level = 80;
@@ -98,6 +100,9 @@ class ReceiverModel {
98100
uint8_t wfm_configuration() const;
99101
void set_wfm_configuration(uint8_t n);
100102

103+
uint8_t wfmam_configuration() const;
104+
void set_wfmam_configuration(uint8_t n);
105+
101106
uint8_t squelch_level() const;
102107
void set_squelch_level(uint8_t v);
103108

@@ -151,6 +156,7 @@ class ReceiverModel {
151156
void update_amfm_configuration();
152157
void update_nbfm_configuration();
153158
void update_wfm_configuration();
159+
void update_wfmam_configuration();
154160

155161
void update_antenna_bias();
156162
void update_headphone_volume();

0 commit comments

Comments
 (0)