mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2026-09-02 21:09:03 +00:00
Add AM spectrum ZOOM x3/x4 with optimized x4 decimation (#3304)
* Add AM spectrum zoom x3 and x4 * Optimize AM spectrum zoom x4 processing * Fix AM spectrum zoom formatting * Fix AM spectrum zoom header formatting
This commit is contained in:
@@ -51,8 +51,8 @@ void NarrowbandAMAudio::execute(const buffer_c8_t& buffer) {
|
||||
if (!spectrum_capture_active &&
|
||||
spectrum_samples >= spectrum_interval_samples) {
|
||||
spectrum_samples -= spectrum_interval_samples;
|
||||
channel_spectrum.start_capture(spectrum_zoom_x2 ? 4 : 2);
|
||||
spectrum_capture_active = true;
|
||||
spectrum_capture_active =
|
||||
channel_spectrum.start_capture(spectrum_decimation_factor);
|
||||
}
|
||||
|
||||
if (spectrum_capture_active &&
|
||||
@@ -146,7 +146,7 @@ void NarrowbandAMAudio::configure(const AMConfigureMessage& message) {
|
||||
channel_filter_transition = message.channel_filter.transition_normalized * channel_filter_input_fs;
|
||||
|
||||
modulation_ssb = (int)message.modulation; // now sending by message , 3 types of AM demod : enum class Modulation : int32_t {DSB = 0, SSB = 1, SSB_FM = 2}
|
||||
spectrum_zoom_x2 = message.channel_spectrum_decimation_factor == 2;
|
||||
spectrum_decimation_factor = 2 * message.channel_spectrum_decimation_factor;
|
||||
channel_spectrum.set_decimation_factor(1);
|
||||
spectrum_interval_samples =
|
||||
decim_0_output_fs / spectrum_rate_hz;
|
||||
|
||||
Reference in New Issue
Block a user