From 4561cf2ce64e6c40968f842023b740403561481f Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Fri, 27 May 2022 15:26:59 -0400 Subject: [PATCH] boards: pixhawk 2 cube skip starting low quality l3gd20 gyro to save memory and cpu - free memory is getting tight on these older boards (depending on configuratoin) and the pixhawk 2 cube still has 2 other superior IMUs, so this is just dropping dead weight --- boards/px4/fmu-v2/init/rc.board_sensors | 15 ++++++++------- boards/px4/fmu-v3/init/rc.board_defaults | 1 + boards/px4/fmu-v3/init/rc.board_sensors | 15 ++++++++------- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/boards/px4/fmu-v2/init/rc.board_sensors b/boards/px4/fmu-v2/init/rc.board_sensors index 8aecc96c34..f9a0c7217a 100644 --- a/boards/px4/fmu-v2/init/rc.board_sensors +++ b/boards/px4/fmu-v2/init/rc.board_sensors @@ -1,6 +1,6 @@ #!/bin/sh # -# PX4 FMUv2 specific board sensors init +# board specific sensors init #------------------------------------------------------------------------------ rgbled start -I @@ -65,12 +65,6 @@ then # sensor heating is available, but we disable it for now param set-default SENS_EN_THERMAL 0 - # l3gd20 (external/isolated SPI4) - l3gd20 -s -b 4 -R 4 start - - # lsm303d (external/isolated SPI4) - lsm303d -s -b 4 -R 6 start - # ms5611 (external/isolated SPI4) ms5611 -s -b 4 start @@ -89,6 +83,13 @@ then mpu9250 -s -b 1 start fi + # l3gd20 (external/isolated SPI4) + # low quality sensor disabled by default to save memory + #l3gd20 -s -b 4 -R 4 start + + # lsm303d (external/isolated SPI4) + lsm303d -s -b 4 -R 6 start + else # $BOARD_FMUV3 = 0 -> FMUv2 diff --git a/boards/px4/fmu-v3/init/rc.board_defaults b/boards/px4/fmu-v3/init/rc.board_defaults index 5d576dd747..65348c4f84 100644 --- a/boards/px4/fmu-v3/init/rc.board_defaults +++ b/boards/px4/fmu-v3/init/rc.board_defaults @@ -5,3 +5,4 @@ param set-default BAT1_V_DIV 10.177939394 param set-default BAT1_A_PER_V 15.391030303 + diff --git a/boards/px4/fmu-v3/init/rc.board_sensors b/boards/px4/fmu-v3/init/rc.board_sensors index 33e5698d76..f9a0c7217a 100644 --- a/boards/px4/fmu-v3/init/rc.board_sensors +++ b/boards/px4/fmu-v3/init/rc.board_sensors @@ -1,6 +1,6 @@ #!/bin/sh # -# PX4 FMUv3 specific board sensors init +# board specific sensors init #------------------------------------------------------------------------------ rgbled start -I @@ -65,12 +65,6 @@ then # sensor heating is available, but we disable it for now param set-default SENS_EN_THERMAL 0 - # l3gd20 (external/isolated SPI4) - l3gd20 -s -b 4 -R 4 start - - # lsm303d (external/isolated SPI4) - lsm303d -s -b 4 -R 6 start - # ms5611 (external/isolated SPI4) ms5611 -s -b 4 start @@ -89,6 +83,13 @@ then mpu9250 -s -b 1 start fi + # l3gd20 (external/isolated SPI4) + # low quality sensor disabled by default to save memory + #l3gd20 -s -b 4 -R 4 start + + # lsm303d (external/isolated SPI4) + lsm303d -s -b 4 -R 6 start + else # $BOARD_FMUV3 = 0 -> FMUv2