Issue #21: Change calibration apply function

This commit is contained in:
Mario Hüttel 2020-11-15 23:10:19 +01:00
parent a858223c35
commit 11b84afca0
2 changed files with 2 additions and 1 deletions

View File

@ -14,3 +14,4 @@ reflow-controller.includes
*.includes *.includes
*.config *.config
*.files *.files
*.user.*

View File

@ -216,7 +216,7 @@ void adc_pt1000_get_resistance_calibration(float *offset, float *sensitivity_dev
static inline float adc_pt1000_apply_calibration(float raw_resistance) static inline float adc_pt1000_apply_calibration(float raw_resistance)
{ {
if (calibration_active) if (calibration_active)
return pt1000_res_raw_lf * (1.0f + pt1000_sens_dev) + pt1000_offset; return (raw_resistance - pt1000_offset) * (1.0f + pt1000_sens_dev);
else else
return raw_resistance; return raw_resistance;