mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-11 02:18:29 -04:00
AP_InertialSensor: added paranoid check for DRDY pin
This commit is contained in:
parent
549e08446a
commit
d1ba78002d
@ -392,6 +392,13 @@ void AP_InertialSensor_MPU9250::_read_data_transaction() {
|
||||
|
||||
_spi->transaction((const uint8_t *)&tx, (uint8_t *)&rx, sizeof(rx));
|
||||
|
||||
if (_drdy_pin) {
|
||||
if (_drdy_pin->read() != 0) {
|
||||
// data ready should have gone low after a read
|
||||
printf("MPU9250: DRDY didn't go low\n");
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
detect a bad SPI bus transaction by looking for all 14 bytes
|
||||
zero, or the wrong INT_STATUS register value. This is used to
|
||||
|
Loading…
Reference in New Issue
Block a user