[rcS] Only start CDC/ACM when the module is enabled (#24430)

Otherwise sercon and mavlink are attempted to be started and may fail,
spamming the console on boot with error messages.
This commit is contained in:
Niklas Hauser 2025-02-28 21:09:45 +01:00 committed by GitHub
parent 1f5a9e526c
commit 0a9a1a1552
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -488,11 +488,14 @@ else
rc_input start $RC_INPUT_ARGS
# Manages USB interface
if ! cdcacm_autostart start
if param greater -s SYS_USB_AUTO -1
then
sercon
echo "Starting MAVLink on /dev/ttyACM0"
mavlink start -d /dev/ttyACM0
if ! cdcacm_autostart start
then
sercon
echo "Starting MAVLink on /dev/ttyACM0"
mavlink start -d /dev/ttyACM0
fi
fi
#