mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 15:58:53 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user