mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 17:23:34 +08:00
I2CSPIDriverBase: sensor start failure ERROR if internal, WARN if external
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
board_adc start
|
board_adc start
|
||||||
|
|
||||||
# SPI1
|
# SPI1
|
||||||
if ! icm20689 -s -b 1 -R 2 start
|
if ! icm20689 -s -b 1 -R 2 -q start
|
||||||
then
|
then
|
||||||
adis16470 -s -b 1 -R 2 start
|
adis16470 -s -b 1 -R 2 start
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ board_adc start
|
|||||||
ms5611 -s start
|
ms5611 -s start
|
||||||
|
|
||||||
# hmc5883 internal SPI bus is rotated 90 deg yaw
|
# hmc5883 internal SPI bus is rotated 90 deg yaw
|
||||||
if ! hmc5883 -T -s -R 2 start
|
if ! hmc5883 -T -s -R 2 -q start
|
||||||
then
|
then
|
||||||
# lis3mdl internal SPI bus is rotated 90 deg yaw
|
# lis3mdl internal SPI bus is rotated 90 deg yaw
|
||||||
lis3mdl -s start
|
lis3mdl -s start
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
rgbled start -I
|
rgbled start -I
|
||||||
rgbled_ncp5623c start -I
|
rgbled_ncp5623c start -I -q
|
||||||
|
|
||||||
board_adc start
|
board_adc start
|
||||||
|
|
||||||
|
|||||||
@@ -696,7 +696,14 @@ int I2CSPIDriverBase::module_start(const BusCLIArguments &cli, BusInstanceIterat
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!started && !cli.quiet_start) {
|
if (!started && !cli.quiet_start) {
|
||||||
PX4_WARN("%s: no instance started (no device on bus?)", px4_get_taskname());
|
static constexpr char no_instance_started[] {"no instance started (no device on bus?)"};
|
||||||
|
|
||||||
|
if (iterator.external()) {
|
||||||
|
PX4_WARN("%s: %s", px4_get_taskname(), no_instance_started);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
PX4_ERR("%s: %s", px4_get_taskname(), no_instance_started);
|
||||||
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_I2C)
|
#if defined(CONFIG_I2C)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user