mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-26 09:45:37 +03:00
Merge pull request #7960 from mikeller/fix_gyro_detection_2
Fixed gyro detection some more.
This commit is contained in:
commit
f16054624e
1 changed files with 4 additions and 1 deletions
|
@ -243,13 +243,16 @@ static bool detectSPISensorsAndUpdateDetectionResult(gyroDev_t *gyro, const gyro
|
||||||
sensor = (gyroSpiDetectFnTable[index])(&gyro->bus);
|
sensor = (gyroSpiDetectFnTable[index])(&gyro->bus);
|
||||||
if (sensor != MPU_NONE) {
|
if (sensor != MPU_NONE) {
|
||||||
gyro->mpuDetectionResult.sensor = sensor;
|
gyro->mpuDetectionResult.sensor = sensor;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Detection failed, disable CS pin again
|
||||||
|
|
||||||
spiPreinitByTag(config->csnTag);
|
spiPreinitByTag(config->csnTag);
|
||||||
|
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue