mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-26 09:26:25 +08:00
drivers/rc_input: always provide RC_PORT_CONFIG parameter
- RC_PORT_CONFIG is disabled by default if the board doesn't have CONFIG_BOARD_SERIAL_RC set - allows user facing custom RC configuration that overrides board defaults
This commit is contained in:
@@ -268,10 +268,14 @@ for serial_command in serial_commands:
|
||||
default_port_str = port_config['default'][i]
|
||||
else:
|
||||
default_port_str = port_config['default']
|
||||
|
||||
if default_port_str != "":
|
||||
if default_port_str not in serial_ports:
|
||||
raise Exception("Default Port {:} not found for {:}".format(default_port_str, serial_command['label']))
|
||||
default_port = serial_ports[default_port_str]['index']
|
||||
|
||||
if default_port_str in dict(board_ports).keys():
|
||||
default_port = serial_ports[default_port_str]['index']
|
||||
|
||||
|
||||
commands.append({
|
||||
'command': serial_command['command'],
|
||||
|
||||
Reference in New Issue
Block a user