From 2b360bfd48049a074def3fd404bb3274cadc49c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Thu, 26 Mar 2020 13:53:24 +0100 Subject: [PATCH] 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. --- ROMFS/px4fmu_common/init.d/rc.interface | 2 +- ROMFS/px4fmu_common/init.d/rc.io | 2 +- ROMFS/px4fmu_common/init.d/rcS | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ROMFS/px4fmu_common/init.d/rc.interface b/ROMFS/px4fmu_common/init.d/rc.interface index 2a4764ecb6..e0ee2dffd4 100644 --- a/ROMFS/px4fmu_common/init.d/rc.interface +++ b/ROMFS/px4fmu_common/init.d/rc.interface @@ -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 diff --git a/ROMFS/px4fmu_common/init.d/rc.io b/ROMFS/px4fmu_common/init.d/rc.io index 2f0aadb96f..7633884ea1 100644 --- a/ROMFS/px4fmu_common/init.d/rc.io +++ b/ROMFS/px4fmu_common/init.d/rc.io @@ -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 diff --git a/ROMFS/px4fmu_common/init.d/rcS b/ROMFS/px4fmu_common/init.d/rcS index e48308f162..f44927b0f8 100644 --- a/ROMFS/px4fmu_common/init.d/rcS +++ b/ROMFS/px4fmu_common/init.d/rcS @@ -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