mpu6000: fixed internal/external mixup in pointers

Thanks to Emile for spotting this!

Conflicts:
	mavlink/include/mavlink/v1.0
This commit is contained in:
Andrew Tridgell 2014-07-11 22:21:53 +10:00 committed by Lorenz Meier
parent 20cd5026d8
commit 8a3a87331d
1 changed files with 2 additions and 2 deletions

View File

@ -1442,7 +1442,7 @@ void
start(bool external_bus, enum Rotation rotation)
{
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_gyro = external_bus?MPU_DEVICE_PATH_GYRO_EXT:MPU_DEVICE_PATH_GYRO;
@ -1595,7 +1595,7 @@ reset(bool external_bus)
void
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)
errx(1, "driver not running");