Skip to content

Commit 3b218b6

Browse files
authored
Merge pull request #9563 from iNavFlight/mmosca-9562-bmi160-acc-issue
Fix #9562 bmi166 acc readout
2 parents 423258c + d42bb2c commit 3b218b6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/drivers/accgyro/accgyro_bmi160.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,9 @@ bool bmi160AccReadScratchpad(accDev_t *acc)
195195
bmi160ContextData_t * ctx = busDeviceGetScratchpadMemory(acc->busDev);
196196

197197
if (ctx->lastReadStatus) {
198-
acc->ADCRaw[X] = (float) int16_val_little_endian(ctx->gyroRaw, 0);
199-
acc->ADCRaw[Y] = (float) int16_val_little_endian(ctx->gyroRaw, 1);
200-
acc->ADCRaw[Z] = (float) int16_val_little_endian(ctx->gyroRaw, 2);
198+
acc->ADCRaw[X] = (float) int16_val_little_endian(ctx->accRaw, 0);
199+
acc->ADCRaw[Y] = (float) int16_val_little_endian(ctx->accRaw, 1);
200+
acc->ADCRaw[Z] = (float) int16_val_little_endian(ctx->accRaw, 2);
201201
return true;
202202
}
203203

0 commit comments

Comments
 (0)