UncleRus / esp-idf-lib

Component library for ESP32-xx and ESP8266
https://esp-idf-lib.readthedocs.io/en/latest/
1.37k stars 426 forks source link

fix(mpu6050): use correct variables #648

Closed Rodrigodd closed 1 month ago

Rodrigodd commented 1 month ago

Never tested the code, but while reading it, I noticed that temp_offset was written to by mpu6050_get_accel_offset, but its value is never read from. In the next section, accel_bias_reg was read from, but never written to. From the code logic, I assume they should be the same variable.

The way the code was before, the "factory trim values" (as the comment above the code I changed describes) are being considered to be zero.

UncleRus commented 1 month ago

Thank you!