Skip to content

Commit

Permalink
Merge pull request #9563 from iNavFlight/mmosca-9562-bmi160-acc-issue
Browse files Browse the repository at this point in the history
Fix #9562 bmi166 acc readout
  • Loading branch information
DzikuVx authored Dec 26, 2023
2 parents 423258c + d42bb2c commit 3b218b6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/drivers/accgyro/accgyro_bmi160.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,9 @@ bool bmi160AccReadScratchpad(accDev_t *acc)
bmi160ContextData_t * ctx = busDeviceGetScratchpadMemory(acc->busDev);

if (ctx->lastReadStatus) {
acc->ADCRaw[X] = (float) int16_val_little_endian(ctx->gyroRaw, 0);
acc->ADCRaw[Y] = (float) int16_val_little_endian(ctx->gyroRaw, 1);
acc->ADCRaw[Z] = (float) int16_val_little_endian(ctx->gyroRaw, 2);
acc->ADCRaw[X] = (float) int16_val_little_endian(ctx->accRaw, 0);
acc->ADCRaw[Y] = (float) int16_val_little_endian(ctx->accRaw, 1);
acc->ADCRaw[Z] = (float) int16_val_little_endian(ctx->accRaw, 2);
return true;
}

Expand Down

0 comments on commit 3b218b6

Please sign in to comment.