rcS: fixes for SYS_USE_IO=0

rc.io is called from 2 places in rc.interface:
- if [ $OUTPUT_MODE = io -o $OUTPUT_MODE = uavcan_esc ]:
  - 'set OUTPUT_MODE io' is only set within USE_IO=yes, so removing
    the check in rc.io has no effect.
  - in case of UAVCAN, we also want the IO for RC, now covered in the next
    case.
- Further down ('Start IO for RC input if needed.').
  This is intended to start IO for RC only, when fmu is already started.
  However the previous check '$USE_IO = yes' in rc.io prevented that.

In addition we don't start rc_input in case of $USE_IO = no.

Fixes no RC on Pixhawk 2 with SYS_USE_IO=0.
This commit is contained in:
Beat Küng
2020-03-26 13:53:24 +01:00
committed by Daniel Agar
parent b895a356aa
commit 2b360bfd48
3 changed files with 3 additions and 3 deletions

View File

@@ -109,7 +109,7 @@ then
fi
fi
if [ $OUTPUT_MODE = io -o $OUTPUT_MODE = uavcan_esc ]
if [ $OUTPUT_MODE = io ]
then
sh /etc/init.d/rc.io
fi

View File

@@ -10,7 +10,7 @@ then
set HIL_ARG $OUTPUT_MODE
fi
if [ $USE_IO = yes -a $IO_PRESENT = yes ]
if [ $IO_PRESENT = yes ]
then
if px4io start $HIL_ARG
then

View File

@@ -427,7 +427,7 @@ else
#
sh /etc/init.d/rc.serial
if [ $IO_PRESENT = no -o $USE_IO = no ]
if [ $IO_PRESENT = no ]
then
# Must be started after the serial config is read
rc_input start $RC_INPUT_ARGS