1
0
Fork 0
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:
Martin Budden 2016-12-14 14:32:38 +00:00
parent 60053e9a51
commit 1d3bfc86d4
16 changed files with 56 additions and 47 deletions

View file

@ -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) {