mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
I2CSPIDriverBase: sensor start failure ERROR if internal, WARN if external
This commit is contained in:
parent
990d7c159d
commit
6d0339ba0c
@ -5,7 +5,7 @@
|
||||
board_adc start
|
||||
|
||||
# SPI1
|
||||
if ! icm20689 -s -b 1 -R 2 start
|
||||
if ! icm20689 -s -b 1 -R 2 -q start
|
||||
then
|
||||
adis16470 -s -b 1 -R 2 start
|
||||
fi
|
||||
|
||||
@ -9,7 +9,7 @@ board_adc start
|
||||
ms5611 -s start
|
||||
|
||||
# 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
|
||||
# lis3mdl internal SPI bus is rotated 90 deg yaw
|
||||
lis3mdl -s start
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
rgbled start -I
|
||||
rgbled_ncp5623c start -I
|
||||
rgbled_ncp5623c start -I -q
|
||||
|
||||
board_adc start
|
||||
|
||||
|
||||
@ -696,7 +696,14 @@ int I2CSPIDriverBase::module_start(const BusCLIArguments &cli, BusInstanceIterat
|
||||
}
|
||||
|
||||
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)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user