diff --git a/boards/px4/fmu-v6xrt/default.px4board b/boards/px4/fmu-v6xrt/default.px4board index f9961fd7bbfb..029462aa4806 100644 --- a/boards/px4/fmu-v6xrt/default.px4board +++ b/boards/px4/fmu-v6xrt/default.px4board @@ -33,6 +33,7 @@ CONFIG_DRIVERS_OSD_MSP_OSD=y CONFIG_DRIVERS_POWER_MONITOR_INA226=y CONFIG_DRIVERS_POWER_MONITOR_INA228=y CONFIG_DRIVERS_POWER_MONITOR_INA238=y +CONFIG_DRIVERS_POWER_MONITOR_PM_SELECTOR_AUTERION=y CONFIG_DRIVERS_PWM_OUT=y CONFIG_DRIVERS_PX4IO=y CONFIG_DRIVERS_RC_INPUT=y @@ -84,6 +85,7 @@ CONFIG_SYSTEMCMDS_BSONDUMP=y CONFIG_SYSTEMCMDS_DMESG=y CONFIG_SYSTEMCMDS_DUMPFILE=y CONFIG_SYSTEMCMDS_HARDFAULT_LOG=y +CONFIG_SYSTEMCMDS_I2C_LAUNCHER=y CONFIG_SYSTEMCMDS_I2CDETECT=y CONFIG_SYSTEMCMDS_IO_BYPASS_CONTROL=y CONFIG_SYSTEMCMDS_LED_CONTROL=y diff --git a/boards/px4/fmu-v6xrt/init/rc.board_defaults b/boards/px4/fmu-v6xrt/init/rc.board_defaults index 45282796efde..a5a3dc10162c 100644 --- a/boards/px4/fmu-v6xrt/init/rc.board_defaults +++ b/boards/px4/fmu-v6xrt/init/rc.board_defaults @@ -12,9 +12,11 @@ param set-default MAV_2_RATE 100000 param set-default MAV_2_REMOTE_PRT 14550 param set-default MAV_2_UDP_PRT 14550 +# By disabling all 3 INA modules, we use the +# i2c_launcher instead. param set-default SENS_EN_INA238 0 param set-default SENS_EN_INA228 0 -param set-default SENS_EN_INA226 1 +param set-default SENS_EN_INA226 0 safety_button start diff --git a/boards/px4/fmu-v6xrt/init/rc.board_sensors b/boards/px4/fmu-v6xrt/init/rc.board_sensors index 64779648a4b2..8582c617a477 100644 --- a/boards/px4/fmu-v6xrt/init/rc.board_sensors +++ b/boards/px4/fmu-v6xrt/init/rc.board_sensors @@ -17,6 +17,7 @@ #------------------------------------------------------------------------------ set HAVE_PM2 yes +set INA_CONFIGURED no if mft query -q -k MFT -s MFT_PM2 -v 0 then @@ -39,6 +40,8 @@ then then ina226 -X -b 2 -t 2 -k start fi + + set INA_CONFIGURED yes fi if param compare SENS_EN_INA228 1 @@ -49,6 +52,8 @@ then then ina228 -X -b 2 -t 2 -k start fi + + set INA_CONFIGURED yes fi if param compare SENS_EN_INA238 1 @@ -59,6 +64,25 @@ then then ina238 -X -b 2 -t 2 -k start fi + + set INA_CONFIGURED yes +fi + +#Start Auterion Power Module selector for Skynode boards +if ver hwbasecmp 009 010 +then + pm_selector_auterion start +else + if [ $INA_CONFIGURED = no ] + then + # INA226, INA228, INA238 auto-start + i2c_launcher start -b 1 + if [ $HAVE_PM2 = yes ] + then + i2c_launcher start -b 2 + fi + fi +fi fi # Internal SPI bus ICM42686p (hard-mounted) @@ -88,4 +112,5 @@ fi bmp388 -X -b 2 start +unset INA_CONFIGURED unset HAVE_PM2 diff --git a/boards/px4/fmu-v6xrt/nuttx-config/nsh/defconfig b/boards/px4/fmu-v6xrt/nuttx-config/nsh/defconfig index d3e1891c058f..e541c5effe90 100644 --- a/boards/px4/fmu-v6xrt/nuttx-config/nsh/defconfig +++ b/boards/px4/fmu-v6xrt/nuttx-config/nsh/defconfig @@ -260,7 +260,6 @@ CONFIG_SCHED_INSTRUMENTATION_SWITCH=y CONFIG_SCHED_LPWORK=y CONFIG_SCHED_LPWORKPRIORITY=50 CONFIG_SCHED_LPWORKSTACKSIZE=2032 -CONFIG_SCHED_WAITPID=y CONFIG_SDIO_BLOCKSETUP=y CONFIG_SEM_PREALLOCHOLDERS=32 CONFIG_SERIAL_IFLOWCONTROL_WATERMARKS=y @@ -279,6 +278,7 @@ CONFIG_SYSTEM_CLE=y CONFIG_SYSTEM_DHCPC_RENEW=y CONFIG_SYSTEM_NSH=y CONFIG_SYSTEM_PING=y +CONFIG_SYSTEM_SYSTEM=y CONFIG_TASK_NAME_SIZE=24 CONFIG_USBDEV=y CONFIG_USBDEV_BUSPOWERED=y