diff --git a/host/python/codegen/analogvariables.py b/host/python/codegen/analogvariables.py
index 3d1a8becacbee1ef4b4c862c7f66767846d9c6de..f2071025747cb7115764d01d835450d28d854baf 100644
--- a/host/python/codegen/analogvariables.py
+++ b/host/python/codegen/analogvariables.py
@@ -49,11 +49,19 @@ def convert_chn2meas_TEMP2(_chn):
 
     # new version with quadratic fit
     # (Rocco's mail 9/12/2021)
-    a = -15.327
-    b = 65.478
-    c = -8.819
-    v = channel2voltage_ADC(_chn)
-    return quadratic(a,b,c,v)
+    # a = -15.327
+    # b = 65.478
+    # c = -8.819
+    # v = channel2voltage_ADC(_chn)
+    # return quadratic(a,b,c,v)
+
+    # new version with linear fit
+    # (Rocco's mail  02/05/2023)
+    # temperature = 23.24 * voltage - 25.79
+    a = 23.24
+    b = -25.79
+    v = chennale2voltage_ADC(_chn)
+    return linear_regression(0.0, b, 1.0, a + b, v)
 
 def convert_chn2meas_TEMP1(_chn):
     # same as TEMP2