Include custom args when starting rigctld

This commit is contained in:
Mashintime 2024-02-11 13:09:51 -05:00
parent 37bc01e426
commit 321dda3fd9

View file

@ -221,6 +221,7 @@ class radio:
def format_rigctld_args(self): def format_rigctld_args(self):
config = self.config['RADIO'] # Accessing the 'RADIO' section of the INI file config = self.config['RADIO'] # Accessing the 'RADIO' section of the INI file
config_rigctld = self.config['RIGCTLD'] # Accessing the 'RIGCTLD' section of the INI file for custom args
args = [] args = []
# Helper function to check if the value should be ignored # Helper function to check if the value should be ignored
@ -251,5 +252,10 @@ class radio:
if not should_ignore(config.get('stop_bits', "0")): if not should_ignore(config.get('stop_bits', "0")):
args += ['--set-conf', f'stop_bits={config["stop_bits"]}'] args += ['--set-conf', f'stop_bits={config["stop_bits"]}']
# Handle custom arguments for rigctld
# Custom args are split via ' ' so python doesn't add extranaeous quotes on windows
args += config_rigctld["arguments"].split(" ")
#print("Hamlib args ==>" + str(args))
return args return args