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:
parent
115b1e76f9
commit
22ddc2ccf9
15 changed files with 113 additions and 108 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue