rc_input: add RC_PORT_CONFIG param to configure RC port

The parameter will only be available if the board defines an 'RC' serial
port in SERIAL_PORTS (in default.cmake).
This commit is contained in:
Beat Küng
2019-07-16 08:09:22 +02:00
parent b7a0e1ef03
commit 5fe4c61b42
6 changed files with 51 additions and 6 deletions
+8 -5
View File
@@ -52,6 +52,7 @@ set PWM_MAX p:PWM_MAX
set PWM_MIN p:PWM_MIN
set PWM_OUT none
set PWM_RATE p:PWM_RATE
set RC_INPUT_ARGS ""
set SDCARD_MIXERS_PATH /fs/microsd/etc/mixers
set USE_IO no
set VEHICLE_TYPE none
@@ -318,11 +319,6 @@ else
tune_control play -t 2
fi
if [ $IO_PRESENT = no -o $USE_IO = no ]
then
rc_input start
fi
#
# Sensors System (start before Commander so Preflight checks are properly run).
# Commander needs to be this early for in-air-restarts.
@@ -418,6 +414,12 @@ else
#
sh /etc/init.d/rc.serial
if [ $IO_PRESENT = no -o $USE_IO = no ]
then
# Must be started after the serial config is read
rc_input start $RC_INPUT_ARGS
fi
#
# Configure vehicle type specific parameters.
# Note: rc.vehicle_setup is the entry point for rc.interface,
@@ -546,6 +548,7 @@ unset PWM_MAX
unset PWM_MIN
unset PWM_OUT
unset PWM_RATE
unset RC_INPUT_ARGS
unset SDCARD_MIXERS_PATH
unset USE_IO
unset VEHICLE_TYPE