1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-24 00:35:34 +03:00

Made mpuDetectionResult and mpuConfiguration gyro and acc instance variables

This commit is contained in:
Martin Budden 2016-12-12 16:45:43 +00:00
parent 115b1e76f9
commit 22ddc2ccf9
15 changed files with 113 additions and 108 deletions

View file

@ -49,6 +49,7 @@
#include "sensors/acceleration.h"
#include "sensors/battery.h"
#include "sensors/boardalignment.h"
#include "sensors/gyro.h"
#include "sensors/sensors.h"
#include "fc/runtime_config.h"
@ -222,6 +223,9 @@ retry:
bool accInit(const accelerometerConfig_t *accConfig, uint32_t targetLooptime)
{
memset(&acc, 0, sizeof(acc));
// copy over the common gyro mpu settings
acc.dev.mpuConfiguration = gyro.dev.mpuConfiguration;
acc.dev.mpuDetectionResult = gyro.dev.mpuDetectionResult;
if (!accDetect(&acc.dev, accConfig->acc_hardware)) {
return false;
}