Configtool: Steinhart-Hart temperature fields should allow floats.
This is, the parameter entry fields in the GUI, not in the generated temperature table. Allowing floats is a tiny bit more precise and also, more importantly, less confusing for the user. --Traumflug This is related to issue #176.
This commit is contained in:
parent
4fdb2dac9e
commit
feb57c3eb0
|
|
@ -410,7 +410,10 @@ class AddSensorDlg(wx.Dialog):
|
||||||
|
|
||||||
def onParam1Entry(self, evt):
|
def onParam1Entry(self, evt):
|
||||||
if self.currentMode == MODE_THERMISTOR:
|
if self.currentMode == MODE_THERMISTOR:
|
||||||
self.param1Valid = self.onTextCtrlInteger(self.param1, True)
|
if self.currentMethod == METHOD_BETA:
|
||||||
|
self.param1Valid = self.onTextCtrlInteger(self.param1, True)
|
||||||
|
else:
|
||||||
|
self.param1Valid = self.onTextCtrlFloat(self.param1, True)
|
||||||
self.checkValuesForPreset()
|
self.checkValuesForPreset()
|
||||||
else:
|
else:
|
||||||
self.param1Valid = True
|
self.param1Valid = True
|
||||||
|
|
@ -432,10 +435,7 @@ class AddSensorDlg(wx.Dialog):
|
||||||
|
|
||||||
def onParam3Entry(self, evt):
|
def onParam3Entry(self, evt):
|
||||||
if self.currentMode == MODE_THERMISTOR:
|
if self.currentMode == MODE_THERMISTOR:
|
||||||
if self.currentMethod == METHOD_BETA:
|
self.param3Valid = self.onTextCtrlFloat(self.param3, True)
|
||||||
self.param3Valid = self.onTextCtrlFloat(self.param3, True)
|
|
||||||
else:
|
|
||||||
self.param3Valid = self.onTextCtrlInteger(self.param3, True)
|
|
||||||
self.checkValuesForPreset()
|
self.checkValuesForPreset()
|
||||||
else:
|
else:
|
||||||
self.param3Valid = True
|
self.param3Valid = True
|
||||||
|
|
@ -463,7 +463,7 @@ class AddSensorDlg(wx.Dialog):
|
||||||
if self.currentMethod == METHOD_BETA:
|
if self.currentMethod == METHOD_BETA:
|
||||||
self.param5Valid = True
|
self.param5Valid = True
|
||||||
else:
|
else:
|
||||||
self.param5Valid = self.onTextCtrlInteger(self.param5, True)
|
self.param5Valid = self.onTextCtrlFloat(self.param5, True)
|
||||||
self.checkValuesForPreset()
|
self.checkValuesForPreset()
|
||||||
else:
|
else:
|
||||||
self.param5Valid = True
|
self.param5Valid = True
|
||||||
|
|
|
||||||
|
|
@ -131,8 +131,8 @@ def SteinhartHartTable(ofp, params, names, idx, settings, finalTable):
|
||||||
params[6]))
|
params[6]))
|
||||||
ofp.output(" {")
|
ofp.output(" {")
|
||||||
|
|
||||||
thrm = SHThermistor(int(params[0]), int(params[1]), int(params[2]),
|
thrm = SHThermistor(int(params[0]), float(params[1]), int(params[2]),
|
||||||
int(params[3]), int(params[4]), int(params[5]),
|
float(params[3]), int(params[4]), float(params[5]),
|
||||||
int(params[6]))
|
int(params[6]))
|
||||||
|
|
||||||
for t in idx:
|
for t in idx:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue