Issue #21: Change calibration apply function
This commit is contained in:
parent
a858223c35
commit
11b84afca0
1
stm-firmware/.gitignore
vendored
1
stm-firmware/.gitignore
vendored
@ -14,3 +14,4 @@ reflow-controller.includes
|
|||||||
*.includes
|
*.includes
|
||||||
*.config
|
*.config
|
||||||
*.files
|
*.files
|
||||||
|
*.user.*
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user