diff --git a/ROMFS/px4fmu_common/init.d/rcS b/ROMFS/px4fmu_common/init.d/rcS index 1d75bf12a2..235875f21e 100644 --- a/ROMFS/px4fmu_common/init.d/rcS +++ b/ROMFS/px4fmu_common/init.d/rcS @@ -274,32 +274,26 @@ else . $FCONFIG fi - # - # Start IO for PWM output or RC input if enabled - # - if param compare -s SYS_USE_IO 1 + # Check if PX4IO present and update firmware if needed. + if [ -f $IOFW ] then - # Check if PX4IO present and update firmware if needed. - if [ -f $IOFW ] + if ! px4io checkcrc ${IOFW} then - if ! px4io checkcrc ${IOFW} - then - # tune Program PX4IO - tune_control play -t 16 # tune 16 = PROG_PX4IO + # tune Program PX4IO + tune_control play -t 16 # tune 16 = PROG_PX4IO - if px4io update ${IOFW} + if px4io update ${IOFW} + then + usleep 10000 + tune_control stop + if px4io checkcrc ${IOFW} then - usleep 10000 - tune_control stop - if px4io checkcrc ${IOFW} - then - tune_control play -t 17 # tune 17 = PROG_PX4IO_OK - else - tune_control play -t 18 # tune 18 = PROG_PX4IO_ERR - fi + tune_control play -t 17 # tune 17 = PROG_PX4IO_OK else - tune_control stop + tune_control play -t 18 # tune 18 = PROG_PX4IO_ERR fi + else + tune_control stop fi fi @@ -310,6 +304,7 @@ else fi fi + # # RC update (map raw RC input to calibrate manual control) # start before commander diff --git a/boards/ark/fmu-v6x/init/rc.board_defaults b/boards/ark/fmu-v6x/init/rc.board_defaults index 7a26ee01c8..87451b0c52 100644 --- a/boards/ark/fmu-v6x/init/rc.board_defaults +++ b/boards/ark/fmu-v6x/init/rc.board_defaults @@ -32,11 +32,4 @@ then param set-default SENS_TEMP_ID 3014666 fi -if ver hwtypecmp ARKV6X001000 ARKV6X001001 ARKV6X001002 ARKV6X001003 ARKV6X001004 ARKV6X001005 ARKV6X001006 ARKV6X001007 -then - param set-default SYS_USE_IO 0 -else - param set-default SYS_USE_IO 1 -fi - safety_button start diff --git a/boards/cubepilot/cubeorange/init/rc.board_defaults b/boards/cubepilot/cubeorange/init/rc.board_defaults index 8ae2ed458b..7f961cd33e 100644 --- a/boards/cubepilot/cubeorange/init/rc.board_defaults +++ b/boards/cubepilot/cubeorange/init/rc.board_defaults @@ -14,6 +14,4 @@ param set-default SENS_EN_THERMAL 0 param set-default -s SENS_TEMP_ID 2621474 -param set-default SYS_USE_IO 1 - set IOFW "/etc/extras/cubepilot_io-v2_default.bin" diff --git a/boards/cubepilot/cubeorangeplus/init/rc.board_defaults b/boards/cubepilot/cubeorangeplus/init/rc.board_defaults index 8ae2ed458b..7f961cd33e 100644 --- a/boards/cubepilot/cubeorangeplus/init/rc.board_defaults +++ b/boards/cubepilot/cubeorangeplus/init/rc.board_defaults @@ -14,6 +14,4 @@ param set-default SENS_EN_THERMAL 0 param set-default -s SENS_TEMP_ID 2621474 -param set-default SYS_USE_IO 1 - set IOFW "/etc/extras/cubepilot_io-v2_default.bin" diff --git a/boards/cubepilot/cubeyellow/init/rc.board_defaults b/boards/cubepilot/cubeyellow/init/rc.board_defaults index 54705e650d..6f39beb0c8 100644 --- a/boards/cubepilot/cubeyellow/init/rc.board_defaults +++ b/boards/cubepilot/cubeyellow/init/rc.board_defaults @@ -13,6 +13,4 @@ param set-default BAT2_A_PER_V 17 # Disable IMU thermal control param set-default SENS_EN_THERMAL 0 -param set-default SYS_USE_IO 1 - set IOFW "/etc/extras/cubepilot_io-v2_default.bin" diff --git a/boards/holybro/durandal-v1/init/rc.board_defaults b/boards/holybro/durandal-v1/init/rc.board_defaults index 2a3b2c0a7b..49254efb15 100644 --- a/boards/holybro/durandal-v1/init/rc.board_defaults +++ b/boards/holybro/durandal-v1/init/rc.board_defaults @@ -11,5 +11,3 @@ param set-default BAT2_A_PER_V 36.367515152 # Enable IMU thermal control param set-default SENS_EN_THERMAL 1 - -param set-default SYS_USE_IO 1 diff --git a/boards/holybro/pix32v5/init/rc.board_defaults b/boards/holybro/pix32v5/init/rc.board_defaults index 94c5828214..c2300a50a7 100644 --- a/boards/holybro/pix32v5/init/rc.board_defaults +++ b/boards/holybro/pix32v5/init/rc.board_defaults @@ -9,7 +9,5 @@ param set-default BAT2_V_DIV 18.1 param set-default BAT1_A_PER_V 36.367515152 param set-default BAT2_A_PER_V 36.367515152 -param set-default SYS_USE_IO 1 - rgbled_pwm start safety_button start diff --git a/boards/mro/x21-777/init/rc.board_defaults b/boards/mro/x21-777/init/rc.board_defaults index e9fecd78a8..5d576dd747 100644 --- a/boards/mro/x21-777/init/rc.board_defaults +++ b/boards/mro/x21-777/init/rc.board_defaults @@ -5,5 +5,3 @@ param set-default BAT1_V_DIV 10.177939394 param set-default BAT1_A_PER_V 15.391030303 - -param set-default SYS_USE_IO 1 diff --git a/boards/mro/x21/init/rc.board_defaults b/boards/mro/x21/init/rc.board_defaults index e9fecd78a8..5d576dd747 100644 --- a/boards/mro/x21/init/rc.board_defaults +++ b/boards/mro/x21/init/rc.board_defaults @@ -5,5 +5,3 @@ param set-default BAT1_V_DIV 10.177939394 param set-default BAT1_A_PER_V 15.391030303 - -param set-default SYS_USE_IO 1 diff --git a/boards/px4/fmu-v2/init/rc.board_defaults b/boards/px4/fmu-v2/init/rc.board_defaults index e9fecd78a8..5d576dd747 100644 --- a/boards/px4/fmu-v2/init/rc.board_defaults +++ b/boards/px4/fmu-v2/init/rc.board_defaults @@ -5,5 +5,3 @@ param set-default BAT1_V_DIV 10.177939394 param set-default BAT1_A_PER_V 15.391030303 - -param set-default SYS_USE_IO 1 diff --git a/boards/px4/fmu-v3/init/rc.board_defaults b/boards/px4/fmu-v3/init/rc.board_defaults index e9fecd78a8..5d576dd747 100644 --- a/boards/px4/fmu-v3/init/rc.board_defaults +++ b/boards/px4/fmu-v3/init/rc.board_defaults @@ -5,5 +5,3 @@ param set-default BAT1_V_DIV 10.177939394 param set-default BAT1_A_PER_V 15.391030303 - -param set-default SYS_USE_IO 1 diff --git a/boards/px4/fmu-v4pro/init/rc.board_defaults b/boards/px4/fmu-v4pro/init/rc.board_defaults index 42378a19d7..8dd9df28d5 100644 --- a/boards/px4/fmu-v4pro/init/rc.board_defaults +++ b/boards/px4/fmu-v4pro/init/rc.board_defaults @@ -13,6 +13,4 @@ param set-default BAT2_A_PER_V 26.4 param set-default EKF2_MULTI_IMU 2 param set-default SENS_IMU_MODE 0 -param set-default SYS_USE_IO 1 - set LOGGER_BUF 64 diff --git a/boards/px4/fmu-v5/init/rc.board_defaults b/boards/px4/fmu-v5/init/rc.board_defaults index 83c1976b74..d7f8b05bd8 100644 --- a/boards/px4/fmu-v5/init/rc.board_defaults +++ b/boards/px4/fmu-v5/init/rc.board_defaults @@ -9,13 +9,6 @@ param set-default BAT2_V_DIV 18.1 param set-default BAT1_A_PER_V 36.367515152 param set-default BAT2_A_PER_V 36.367515152 -if ver hwtypecmp V5004000 V5006000 -then - param set-default SYS_USE_IO 0 -else - param set-default SYS_USE_IO 1 -fi - if ver hwtypecmp V5005000 V5005002 V5006000 V5006002 then # CUAV V5+ (V550/V552) and V5nano (V560/V562) have 3 IMUs diff --git a/boards/px4/fmu-v5x/init/rc.board_defaults b/boards/px4/fmu-v5x/init/rc.board_defaults index 2ff61617b9..cf152b948e 100644 --- a/boards/px4/fmu-v5x/init/rc.board_defaults +++ b/boards/px4/fmu-v5x/init/rc.board_defaults @@ -16,8 +16,6 @@ param set-default SENS_EN_INA238 0 param set-default SENS_EN_INA228 0 param set-default SENS_EN_INA226 1 -param set-default SYS_USE_IO 1 - if ver hwtypecmp V5X009000 V5X009001 V5X00a000 V5X00a001 V5X008000 V5X008001 V5X010001 then # Skynode: use the "custom participant" config for uxrce_dds_client diff --git a/boards/px4/fmu-v6c/init/rc.board_defaults b/boards/px4/fmu-v6c/init/rc.board_defaults index 6418e5836d..f7dd269721 100644 --- a/boards/px4/fmu-v6c/init/rc.board_defaults +++ b/boards/px4/fmu-v6c/init/rc.board_defaults @@ -9,5 +9,3 @@ param set-default BAT2_V_DIV 18.1 param set-default BAT1_A_PER_V 36.367515152 param set-default BAT2_A_PER_V 36.367515152 - -param set-default SYS_USE_IO 1 diff --git a/boards/px4/fmu-v6x/init/rc.board_defaults b/boards/px4/fmu-v6x/init/rc.board_defaults index d277bd771c..b94e5f78e6 100644 --- a/boards/px4/fmu-v6x/init/rc.board_defaults +++ b/boards/px4/fmu-v6x/init/rc.board_defaults @@ -16,8 +16,6 @@ param set-default SENS_EN_INA238 0 param set-default SENS_EN_INA228 0 param set-default SENS_EN_INA226 1 -param set-default SYS_USE_IO 1 - if ver hwtypecmp V6X009010 V6X010010 then # Skynode: use the "custom participant" config for uxrce_dds_client diff --git a/boards/siyi/n7/init/rc.board_defaults b/boards/siyi/n7/init/rc.board_defaults index a7d3d20bf9..24b5d9d803 100644 --- a/boards/siyi/n7/init/rc.board_defaults +++ b/boards/siyi/n7/init/rc.board_defaults @@ -10,5 +10,3 @@ param set-default BAT1_A_PER_V 36.367515152 # Enable IMU thermal control param set-default SENS_EN_THERMAL 1 - -param set-default SYS_USE_IO 1 diff --git a/boards/sky-drones/smartap-airlink/init/rc.board_defaults b/boards/sky-drones/smartap-airlink/init/rc.board_defaults index c581f8c741..212c72657f 100644 --- a/boards/sky-drones/smartap-airlink/init/rc.board_defaults +++ b/boards/sky-drones/smartap-airlink/init/rc.board_defaults @@ -25,8 +25,6 @@ param set-default BAT_V_OFFS_CURR 0.413 # Disable safety switch param set-default CBRK_IO_SAFETY 22027 -param set-default SYS_USE_IO 1 - safety_button start set LOGGER_BUF 32 diff --git a/boards/thepeach/k1/init/rc.board_defaults b/boards/thepeach/k1/init/rc.board_defaults index 5d8a3c182b..f22fa838f4 100644 --- a/boards/thepeach/k1/init/rc.board_defaults +++ b/boards/thepeach/k1/init/rc.board_defaults @@ -5,5 +5,3 @@ param set-default BAT1_V_DIV 18.1 param set-default BAT1_A_PER_V 36.367515152 - -param set-default SYS_USE_IO 1 diff --git a/boards/thepeach/r1/init/rc.board_defaults b/boards/thepeach/r1/init/rc.board_defaults index 5d8a3c182b..f22fa838f4 100644 --- a/boards/thepeach/r1/init/rc.board_defaults +++ b/boards/thepeach/r1/init/rc.board_defaults @@ -5,5 +5,3 @@ param set-default BAT1_V_DIV 18.1 param set-default BAT1_A_PER_V 36.367515152 - -param set-default SYS_USE_IO 1 diff --git a/src/drivers/px4io/px4io.cpp b/src/drivers/px4io/px4io.cpp index ca5470a89b..3e24fc48ba 100644 --- a/src/drivers/px4io/px4io.cpp +++ b/src/drivers/px4io/px4io.cpp @@ -336,8 +336,7 @@ private: (ParamInt) _param_rc_rssi_pwm_max, (ParamInt) _param_rc_rssi_pwm_min, (ParamInt) _param_sens_en_themal, - (ParamInt) _param_sys_hitl, - (ParamInt) _param_sys_use_io + (ParamInt) _param_sys_hitl ) }; @@ -468,7 +467,7 @@ int PX4IO::init() } /* try to claim the generic PWM output device node as well - it's OK if we fail at this */ - if (_param_sys_hitl.get() <= 0 && _param_sys_use_io.get() == 1) { + if (_param_sys_hitl.get() <= 0) { _mixing_output.setMaxTopicUpdateRate(MIN_TOPIC_UPDATE_INTERVAL); } diff --git a/src/drivers/px4io/px4io_params.c b/src/drivers/px4io/px4io_params.c index ef1c1ee6ab..b390bdb18a 100644 --- a/src/drivers/px4io/px4io_params.c +++ b/src/drivers/px4io/px4io_params.c @@ -42,18 +42,6 @@ #include #include -/** - * Set usage of IO board - * - * Can be used to use a configure the use of the IO board. - * - * @value 0 IO PWM disabled (RC only) - * @value 1 IO enabled (RC & PWM) - * @reboot_required true - * @group System - */ -PARAM_DEFINE_INT32(SYS_USE_IO, 0); - /** * S.BUS out *