Fixed sensor orientation

This commit is contained in:
dino
2019-12-03 16:16:49 -05:00
committed by Daniel Agar
parent 0dbd6d70d5
commit 34f53c14bf
3 changed files with 10 additions and 10 deletions
+2 -2
View File
@@ -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
+6 -7
View File
@@ -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;
}
+2 -1
View File
@@ -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;