mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 21:35:44 +03:00
Updated sensor driver read signatures
This commit is contained in:
parent
60053e9a51
commit
1d3bfc86d4
16 changed files with 56 additions and 47 deletions
|
@ -379,15 +379,13 @@ static void applyAccelerationTrims(const flightDynamicsTrims_t *accelerationTrim
|
|||
|
||||
void updateAccelerationReadings(rollAndPitchTrims_t *rollAndPitchTrims)
|
||||
{
|
||||
int16_t accADCRaw[XYZ_AXIS_COUNT];
|
||||
|
||||
if (!acc.dev.read(accADCRaw)) {
|
||||
if (!acc.dev.read(&acc.dev)) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (int axis = 0; axis < XYZ_AXIS_COUNT; axis++) {
|
||||
DEBUG_SET(DEBUG_ACCELEROMETER, axis, accADCRaw[axis]);
|
||||
acc.accSmooth[axis] = accADCRaw[axis];
|
||||
DEBUG_SET(DEBUG_ACCELEROMETER, axis, acc.dev.ADCRaw[axis]);
|
||||
acc.accSmooth[axis] = acc.dev.ADCRaw[axis];
|
||||
}
|
||||
|
||||
if (accLpfCutHz) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue