mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-06 06:30:36 +08:00
Merge remote-tracking branch 'upstream/master' into linux
Signed-off-by: Mark Charlebois <charlebm@gmail.com> Conflicts: src/drivers/rgbled/rgbled.cpp src/modules/commander/PreflightCheck.cpp src/modules/commander/airspeed_calibration.cpp src/modules/commander/calibration_routines.cpp src/modules/commander/gyro_calibration.cpp src/modules/commander/mag_calibration.cpp src/modules/mc_att_control/mc_att_control_main.cpp
This commit is contained in:
@@ -316,7 +316,6 @@ BlinkM::init()
|
||||
ret = I2C::init();
|
||||
|
||||
if (ret != OK) {
|
||||
warnx("I2C init failed");
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -970,7 +969,7 @@ blinkm_main(int argc, char *argv[])
|
||||
if (OK != g_blinkm->init()) {
|
||||
delete g_blinkm;
|
||||
g_blinkm = nullptr;
|
||||
errx(1, "init failed");
|
||||
errx(1, "no BlinkM found");
|
||||
}
|
||||
|
||||
exit(0);
|
||||
|
||||
@@ -216,8 +216,6 @@ __EXPORT int nsh_archinitialize(void)
|
||||
SPI_SELECT(spi1, PX4_SPIDEV_MPU, false);
|
||||
up_udelay(20);
|
||||
|
||||
message("[boot] Successfully initialized SPI port 1\r\n");
|
||||
|
||||
/*
|
||||
* If SPI2 is enabled in the defconfig, we loose some ADC pins as chip selects.
|
||||
* Keep the SPI2 init optional and conditionally initialize the ADC pins
|
||||
@@ -243,7 +241,6 @@ __EXPORT int nsh_archinitialize(void)
|
||||
|
||||
/* Get the SPI port for the microSD slot */
|
||||
|
||||
message("[boot] Initializing SPI port 3\n");
|
||||
spi3 = up_spiinitialize(3);
|
||||
|
||||
if (!spi3) {
|
||||
@@ -252,8 +249,6 @@ __EXPORT int nsh_archinitialize(void)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
message("[boot] Successfully initialized SPI port 3\n");
|
||||
|
||||
/* Now bind the SPI interface to the MMCSD driver */
|
||||
result = mmcsd_spislotinitialize(CONFIG_NSH_MMCSDMINOR, CONFIG_NSH_MMCSDSLOTNO, spi3);
|
||||
|
||||
@@ -263,7 +258,5 @@ __EXPORT int nsh_archinitialize(void)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
message("[boot] Successfully bound SPI port 3 to the MMCSD driver\n");
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -296,8 +296,6 @@ __EXPORT int nsh_archinitialize(void)
|
||||
SPI_SELECT(spi1, PX4_SPIDEV_MPU, false);
|
||||
up_udelay(20);
|
||||
|
||||
message("[boot] Initialized SPI port 1 (SENSORS)\n");
|
||||
|
||||
/* Get the SPI port for the FRAM */
|
||||
|
||||
spi2 = up_spiinitialize(2);
|
||||
@@ -317,8 +315,6 @@ __EXPORT int nsh_archinitialize(void)
|
||||
SPI_SETMODE(spi2, SPIDEV_MODE3);
|
||||
SPI_SELECT(spi2, SPIDEV_FLASH, false);
|
||||
|
||||
message("[boot] Initialized SPI port 2 (RAMTRON FRAM)\n");
|
||||
|
||||
spi4 = up_spiinitialize(4);
|
||||
|
||||
/* Default SPI4 to 1MHz and de-assert the known chip selects. */
|
||||
@@ -328,8 +324,6 @@ __EXPORT int nsh_archinitialize(void)
|
||||
SPI_SELECT(spi4, PX4_SPIDEV_EXT0, false);
|
||||
SPI_SELECT(spi4, PX4_SPIDEV_EXT1, false);
|
||||
|
||||
message("[boot] Initialized SPI port 4\n");
|
||||
|
||||
#ifdef CONFIG_MMCSD
|
||||
/* First, get an instance of the SDIO interface */
|
||||
|
||||
@@ -350,7 +344,6 @@ __EXPORT int nsh_archinitialize(void)
|
||||
/* Then let's guess and say that there is a card in the slot. There is no card detect GPIO. */
|
||||
sdio_mediachange(sdio, true);
|
||||
|
||||
message("[boot] Initialized SDIO\n");
|
||||
#endif
|
||||
|
||||
return OK;
|
||||
|
||||
@@ -1490,8 +1490,9 @@ start(enum HMC5883_BUS busid, enum Rotation rotation)
|
||||
started |= start_bus(bus_options[i], rotation);
|
||||
}
|
||||
|
||||
if (!started)
|
||||
errx(1, "driver start failed");
|
||||
if (!started) {
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -674,7 +674,7 @@ fail:
|
||||
g_dev = nullptr;
|
||||
}
|
||||
|
||||
errx(1, "driver start failed");
|
||||
errx(1, "no PX4 FLOW connected");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -638,7 +638,7 @@ rgbled_main(int argc, char *argv[])
|
||||
if (g_rgbled == nullptr) {
|
||||
// fall back to default bus
|
||||
if (PX4_I2C_BUS_LED == PX4_I2C_BUS_EXPANSION) {
|
||||
warnx("init failed");
|
||||
warnx("no RGB led on bus #%d", i2cdevice);
|
||||
return 1;
|
||||
}
|
||||
i2cdevice = PX4_I2C_BUS_LED;
|
||||
@@ -656,7 +656,7 @@ rgbled_main(int argc, char *argv[])
|
||||
if (OK != g_rgbled->init()) {
|
||||
delete g_rgbled;
|
||||
g_rgbled = nullptr;
|
||||
warnx("init failed");
|
||||
warnx("no RGB led on bus #%d", i2cdevice);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user