mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-14 21:33:34 +08:00
Fixed sensor orientation
This commit is contained in:
@@ -16,10 +16,10 @@ mpu6000 -R 8 -s -T 20602 start
|
||||
ism330dlc start
|
||||
|
||||
# Internal SPI bus BMI088 accel
|
||||
bmi088 -A -R 10 start
|
||||
bmi088 -A -R 12 start
|
||||
|
||||
# Internal SPI bus BMI088 gyro
|
||||
bmi088 -G -R 10 start
|
||||
bmi088 -G -R 12 start
|
||||
|
||||
# Possible external compasses
|
||||
ist8310 -C -b 1 start
|
||||
|
||||
@@ -367,7 +367,6 @@ BMI088_gyro::measure()
|
||||
|
||||
check_registers();
|
||||
|
||||
|
||||
// Get the last temperature from the accelerometer (the Gyro does not have its own temperature measurement)
|
||||
_last_temperature = _accel_last_temperature_copy;
|
||||
|
||||
@@ -376,14 +375,14 @@ BMI088_gyro::measure()
|
||||
report.gyro_y = bmi_gyroreport.gyro_y;
|
||||
report.gyro_z = bmi_gyroreport.gyro_z;
|
||||
|
||||
if ((bmi_gyroreport.chip_id & 0x0f) != BMI088_GYR_WHO_AM_I) {
|
||||
// all zero data - probably an SPI bus error
|
||||
if ((bmi_gyroreport.chip_id) != BMI088_GYR_WHO_AM_I) {
|
||||
// If chip id is not right, assume a bus transfer error
|
||||
perf_count(_bad_transfers);
|
||||
perf_end(_sample_perf);
|
||||
// // note that we don't call reset() here as a reset()
|
||||
// // costs 20ms with interrupts disabled. That means if
|
||||
// // the bmi088 does go bad it would cause a FMU failure,
|
||||
// // regardless of whether another sensor is available,
|
||||
// note that we don't call reset() here as a reset()
|
||||
// costs 20ms with interrupts disabled. That means if
|
||||
// the bmi088 does go bad it would cause a FMU failure,
|
||||
// regardless of whether another sensor is available,
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -251,7 +251,8 @@ private:
|
||||
*/
|
||||
struct BMI_GyroReport {
|
||||
uint8_t cmd;
|
||||
uint16_t chip_id;
|
||||
uint8_t chip_id; // Read to check if bus is workig
|
||||
uint8_t ununsed;
|
||||
int16_t gyro_x;
|
||||
int16_t gyro_y;
|
||||
int16_t gyro_z;
|
||||
|
||||
Reference in New Issue
Block a user