fix issue with old reading

- old reading shoould be ignored
- fix channels for CTI7
This commit is contained in:
l_samenv
2023-01-30 16:56:31 +01:00
parent a384664639
commit 4d28abe141
2 changed files with 5 additions and 6 deletions

View File

@ -14,20 +14,20 @@ Mod('T',
output_module = 'Heater', output_module = 'Heater',
target = Param(max=470), target = Param(max=470),
io = 'io', io = 'io',
channel = 'A', channel = 'B',
) )
Mod('T_cold_finger', Mod('T_cold_finger',
'frappy_psi.lakeshore.Sensor340', 'frappy_psi.lakeshore.Sensor340',
'cold finger temperature', 'cold finger temperature',
io = 'io', io = 'io',
channel = 'B' channel = 'A'
) )
Mod('Heater', Mod('Heater',
'frappy_psi.lakeshore.HeaterOutput', 'frappy_psi.lakeshore.HeaterOutput',
'heater output', 'heater output',
channel = 'A', channel = 'B',
io = 'io', io = 'io',
resistance = 50, resistance = 50,
max_power = 50, max_power = 50,

View File

@ -58,9 +58,8 @@ class Sensor340(HasIO, Readable):
return ERROR, 'temperature overrange' return ERROR, 'temperature overrange'
if c >= 16: if c >= 16:
return ERROR, 'temperature underrange' return ERROR, 'temperature underrange'
if c >= 2: # do not check for old reading -> this happens regularely on NTCs with T comp
return ERROR, 'old reading' if c % 2:
if c >= 1:
return ERROR, 'invalid reading' return ERROR, 'invalid reading'
return IDLE, '' return IDLE, ''