mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 11:59:17 +08:00
mpu9250 fix code style
This commit is contained in:
@@ -113,10 +113,10 @@ MPU9250_I2C::probe()
|
|||||||
// Try first for mpu9250/6500
|
// Try first for mpu9250/6500
|
||||||
read(MPUREG_WHOAMI, &whoami, 1);
|
read(MPUREG_WHOAMI, &whoami, 1);
|
||||||
|
|
||||||
if(whoami == MPU_WHOAMI_9250 || whoami == MPU_WHOAMI_6500) {
|
if (whoami == MPU_WHOAMI_9250 || whoami == MPU_WHOAMI_6500) {
|
||||||
return PX4_OK;
|
return PX4_OK;
|
||||||
}
|
|
||||||
else {
|
} else {
|
||||||
/*
|
/*
|
||||||
* If it's not an MPU it must be an ICM
|
* If it's not an MPU it must be an ICM
|
||||||
* Make sure register bank 0 is selected - whoami is only present on bank 0, and that is
|
* Make sure register bank 0 is selected - whoami is only present on bank 0, and that is
|
||||||
@@ -125,7 +125,7 @@ MPU9250_I2C::probe()
|
|||||||
write(ICMREG_20948_BANK_SEL, ®ister_select, 1);
|
write(ICMREG_20948_BANK_SEL, ®ister_select, 1);
|
||||||
read(ICMREG_20948_WHOAMI, &whoami, 1);
|
read(ICMREG_20948_WHOAMI, &whoami, 1);
|
||||||
|
|
||||||
if(whoami == ICM_WHOAMI_20948) {
|
if (whoami == ICM_WHOAMI_20948) {
|
||||||
return PX4_OK;
|
return PX4_OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user