Skip to content

Commit

Permalink
Fix agc setting handling
Browse files Browse the repository at this point in the history
AGC PR broke settings watcher, because agc paramter was not passed to
`config_daq_rf` function. Lets remove it from the interace and let
`config_daq_rf` figure out if AGC is requested based on the `gain`
value.
  • Loading branch information
godsic committed Sep 2, 2023
1 parent 236a82b commit 3649ab7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 2 additions & 3 deletions _UI/_web_interface/callbacks/update_daq_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@
def update_daq_params(input_value, f0, gain):
if web_interface.module_signal_processor.run_processing:
web_interface.daq_center_freq = f0
agc = True if (gain == AUTO_GAIN_VALUE) else False
web_interface.config_daq_rf(f0, gain, agc)
web_interface.config_daq_rf(f0, gain)

agc_warning_style = copy.deepcopy(AGC_WARNING_DEFAULT_STYLE)
agc_warning_style["display"] = "block" if agc else "none"
agc_warning_style["display"] = "block" if gain == AUTO_GAIN_VALUE else "none"

for i in range(web_interface.module_signal_processor.max_vfos):
half_band_width = (web_interface.module_signal_processor.vfo_bw[i] / 10**6) / 2
Expand Down
5 changes: 3 additions & 2 deletions _UI/_web_interface/kraken_web_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,13 +375,14 @@ def close_data_interfaces(self):
def close(self):
pass

def config_daq_rf(self, f0, gain, agc):
def config_daq_rf(self, f0, gain):
"""
Configures the RF parameters in the DAQ module
"""
self.daq_cfg_iface_status = 1
self.module_receiver.set_center_freq(int(f0 * 10**6))
if agc:

if gain == AUTO_GAIN_VALUE:
self.module_receiver.set_if_agc()
else:
self.module_receiver.set_if_gain(gain)
Expand Down

0 comments on commit 3649ab7

Please sign in to comment.