mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-26 07:13:33 +08:00
mpu6000: fixed internal/external mixup in pointers
Thanks to Emile for spotting this! Conflicts: mavlink/include/mavlink/v1.0
This commit is contained in:
committed by
Lorenz Meier
parent
20cd5026d8
commit
8a3a87331d
@@ -1442,7 +1442,7 @@ void
|
|||||||
start(bool external_bus, enum Rotation rotation)
|
start(bool external_bus, enum Rotation rotation)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
MPU6000 **g_dev_ptr = external_bus?&g_dev_int:&g_dev_ext;
|
MPU6000 **g_dev_ptr = external_bus?&g_dev_ext:&g_dev_int;
|
||||||
const char *path_accel = external_bus?MPU_DEVICE_PATH_ACCEL_EXT:MPU_DEVICE_PATH_ACCEL;
|
const char *path_accel = external_bus?MPU_DEVICE_PATH_ACCEL_EXT:MPU_DEVICE_PATH_ACCEL;
|
||||||
const char *path_gyro = external_bus?MPU_DEVICE_PATH_GYRO_EXT:MPU_DEVICE_PATH_GYRO;
|
const char *path_gyro = external_bus?MPU_DEVICE_PATH_GYRO_EXT:MPU_DEVICE_PATH_GYRO;
|
||||||
|
|
||||||
@@ -1595,7 +1595,7 @@ reset(bool external_bus)
|
|||||||
void
|
void
|
||||||
info(bool external_bus)
|
info(bool external_bus)
|
||||||
{
|
{
|
||||||
MPU6000 **g_dev_ptr = external_bus?&g_dev_int:&g_dev_ext;
|
MPU6000 **g_dev_ptr = external_bus?&g_dev_ext:&g_dev_int;
|
||||||
if (*g_dev_ptr == nullptr)
|
if (*g_dev_ptr == nullptr)
|
||||||
errx(1, "driver not running");
|
errx(1, "driver not running");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user