1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 08:15:30 +03:00

MPU6050 MPU DATA READY // gyro sync activated

MPU6050 gets DATA READY pin based interrupt instad of i2c
SPI targets are still getting interrupt from SPI
This commit is contained in:
borisbstyle 2015-09-17 23:59:25 +02:00
parent 60053d5ea5
commit c45d3e1fdd
3 changed files with 35 additions and 17 deletions

View file

@ -31,16 +31,16 @@ extern gyro_t gyro;
uint32_t targetLooptime;
static uint8_t mpuDivider;
bool getMpuInterrupt(gyro_t *gyro)
bool getMpuDataStatus(gyro_t *gyro)
{
bool gyroIsUpdated;
bool mpuDataStatus;
gyro->intStatus(&gyroIsUpdated);
return gyroIsUpdated;
gyro->intStatus(&mpuDataStatus);
return mpuDataStatus;
}
bool gyroSyncCheckUpdate(void) {
return getMpuInterrupt(&gyro);
return getMpuDataStatus(&gyro);
}
void gyroUpdateSampleRate(uint32_t looptime, uint8_t lpf, uint8_t syncGyroToLoop) {