PX4-Autopilot/Tools/serial/rc.serial_port.jinja
Ramon Roche 6bd66d50e9 shellcheck: fix SC2268 Avoid x-prefix
if [ "x$PRT_GPS1_" = "x" ]; then
     ^-----------^ SC2268 (style): Avoid x-prefix in comparisons as it no longer serves a purpose.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2025-07-07 10:25:40 +02:00

26 lines
701 B
Django/Jinja

{# jinja template to generate the serial port rc.uart_port script. #}
# serial port script generated with generate_serial_config.py
set SERIAL_DEV none
{% for serial_device in serial_devices -%}
if param compare "$PRT" {{ serial_device.index }}; then
if [ "$PRT_{{ serial_device.tag }}_" = "" ]; then
set SERIAL_DEV {{ serial_device.device }}
set BAUD_PARAM SER_{{ serial_device.tag }}_BAUD
set PRT_{{ serial_device.tag }}_ 1
{% if not constrained_flash -%}
else
echo "Conflicting config for {{ serial_device.device }}"
{% endif -%}
fi
fi
{% endfor %}
{% for config in ethernet_configuration -%}
if param compare "$PRT" {{ config.index }}; then
set SERIAL_DEV ethernet
fi
{% endfor %}