mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-18 22:05:17 +03:00
Cleanup of acc device drivers extern usage CF PR#2117
This commit is contained in:
parent
5e84431e7a
commit
e9a46c6ebb
21 changed files with 41 additions and 44 deletions
|
@ -627,8 +627,10 @@ bool sensorsAutodetect(sensorAlignmentConfig_t *sensorAlignmentConfig, uint8_t a
|
|||
|
||||
|
||||
// Now time to init things, acc first
|
||||
if (sensors(SENSOR_ACC))
|
||||
acc.init();
|
||||
if (sensors(SENSOR_ACC)) {
|
||||
acc.acc_1G = 256; // set default
|
||||
acc.init(&acc);
|
||||
}
|
||||
// this is safe because either mpu6050 or mpu3050 or lg3d20 sets it, and in case of fail, we never get here.
|
||||
gyroUpdateSampleRate(gyroLpf, gyroSyncDenominator); // Set gyro refresh rate before initialisation
|
||||
gyro.init(gyroLpf);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue