mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 18:57:19 +02:00
Merge branch 'fix/s2_adc_cali_loss_resolution_v5.3' into 'release/v5.3'
fix(adc): fix s2 cali loss resolution (v5.3) See merge request espressif/esp-idf!38596
This commit is contained in:
@ -143,7 +143,7 @@ static esp_err_t cali_raw_to_voltage(void *arg, int raw, int *voltage)
|
||||
//pointers are checked in the upper layer
|
||||
|
||||
cali_chars_line_fitting_t *ctx = arg;
|
||||
*voltage = raw * ctx->coeff_a / coeff_a_scaling + ctx->coeff_b / coeff_b_scaling;
|
||||
*voltage = (raw * ctx->coeff_a / (coeff_a_scaling / coeff_b_scaling) + ctx->coeff_b) / coeff_b_scaling;
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
Reference in New Issue
Block a user