mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 22:35:23 +03:00
Fixed potentially incorrect calculation in ACC calibration if non-default cycle number is used.
This commit is contained in:
parent
a7cd21e632
commit
a21d0f5d31
10 changed files with 14 additions and 21 deletions
|
@ -80,12 +80,10 @@
|
|||
#include "sensors/gyro.h"
|
||||
#include "sensors/sensors.h"
|
||||
|
||||
#ifdef USE_HARDWARE_REVISION_DETECTION
|
||||
#include "hardware_revision.h"
|
||||
#endif
|
||||
|
||||
#include "acceleration.h"
|
||||
|
||||
#define CALIBRATING_ACC_CYCLES 400
|
||||
|
||||
FAST_RAM_ZERO_INIT acc_t acc; // acc access functions
|
||||
|
||||
void resetRollAndPitchTrims(rollAndPitchTrims_t *rollAndPitchTrims)
|
||||
|
@ -360,9 +358,9 @@ bool accInit(uint32_t gyroSamplingInverval)
|
|||
return true;
|
||||
}
|
||||
|
||||
void accSetCalibrationCycles(uint16_t calibrationCyclesRequired)
|
||||
void accStartCalibration(void)
|
||||
{
|
||||
calibratingA = calibrationCyclesRequired;
|
||||
calibratingA = CALIBRATING_ACC_CYCLES;
|
||||
}
|
||||
|
||||
bool accIsCalibrationComplete(void)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue