mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Ran Astyle
This commit is contained in:
parent
f3b7585a89
commit
30bc968ed6
@ -232,11 +232,14 @@ void start(const bool use_i2c, const int bus)
|
||||
fail:
|
||||
|
||||
#ifdef PX4_I2C_BUS_ONBOARD
|
||||
|
||||
if (g_dev_int != nullptr && (bus == -1 || bus == PX4_I2C_BUS_ONBOARD)) {
|
||||
delete g_dev_int;
|
||||
g_dev_int = nullptr;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
if (g_dev_ext != nullptr && (bus == -1 || bus == PX4_I2C_BUS_EXPANSION)) {
|
||||
delete g_dev_ext;
|
||||
g_dev_ext = nullptr;
|
||||
@ -261,6 +264,7 @@ void stop(const bool use_i2c, const int bus)
|
||||
delete g_dev_ext;
|
||||
g_dev_ext = nullptr;
|
||||
}
|
||||
|
||||
} else {
|
||||
if (g_dev_int != nullptr) {
|
||||
delete g_dev_int;
|
||||
|
||||
@ -208,12 +208,14 @@ void gpio_led_start(FAR void *arg)
|
||||
char *gpio_dev;
|
||||
|
||||
#if defined(PX4IO_DEVICE_PATH)
|
||||
|
||||
if (priv->use_io) {
|
||||
gpio_dev = PX4IO_DEVICE_PATH;
|
||||
|
||||
} else {
|
||||
gpio_dev = PX4FMU_DEVICE_PATH;
|
||||
}
|
||||
|
||||
#else
|
||||
gpio_dev = PX4FMU_DEVICE_PATH;
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user