diff --git a/config_webrx.py b/config_webrx.py index 00ea746..b3f8bdb 100644 --- a/config_webrx.py +++ b/config_webrx.py @@ -83,7 +83,7 @@ audio_compression = "adpcm" # valid values: "adpcm", "none" fft_compression = "adpcm" # valid values: "adpcm", "none" digimodes_enable = True # Decoding digimodes come with higher CPU usage. -digimodes_fft_size = 1024 +digimodes_fft_size = 2048 # determines the quality, and thus the cpu usage, for the ambe codec used by digital voice modes # if you're running on a Raspi (up to 3B+) you'll want to leave this on 1 diff --git a/csdr/csdr.py b/csdr/csdr.py index de39d83..8048ae9 100644 --- a/csdr/csdr.py +++ b/csdr/csdr.py @@ -279,7 +279,9 @@ class dsp(object): if which == "fft": chain += [ "csdr fft_cc {secondary_fft_input_size} {secondary_fft_block_size}", - "csdr logpower_cf -70", + "csdr logpower_cf -70" + if self.fft_averages == 0 + else "csdr logaveragepower_cf -70 {secondary_fft_size} {fft_averages}", "csdr fft_exchange_sides_ff {secondary_fft_input_size}", ] if self.fft_compression == "adpcm": @@ -318,7 +320,10 @@ class dsp(object): self.restart() def secondary_fft_block_size(self): - return (self.samp_rate / self.decimation) / self.fft_fps + if self.fft_averages == 0: + return (self.samp_rate / self.decimation) / self.fft_fps + else: + return (self.samp_rate / self.decimation) / self.fft_fps / self.fft_averages def secondary_decimation(self): return 1 # currently unused @@ -383,6 +388,7 @@ class dsp(object): secondary_fft_input_size=self.secondary_fft_size, secondary_fft_size=self.secondary_fft_size, secondary_fft_block_size=self.secondary_fft_block_size(), + fft_averages=self.fft_averages, ) logger.debug("secondary command (fft) = %s", secondary_command_fft) diff --git a/htdocs/openwebrx.js b/htdocs/openwebrx.js index 35fc3d5..0df80df 100644 --- a/htdocs/openwebrx.js +++ b/htdocs/openwebrx.js @@ -1519,7 +1519,7 @@ function initPanels() { |___/ */ -var secondary_demod_fft_offset_db = 30; //need to calculate that later +var secondary_demod_fft_offset_db = 18; //need to calculate that later var secondary_demod_canvases_initialized = false; var secondary_demod_listbox_updating = false; var secondary_demod_channel_freq = 1000;