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.
Never tested the code, but while reading it, I noticed that
temp_offset
was written to bympu6050_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.