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',
target = Param(max=470),
io = 'io',
channel = 'A',
channel = 'B',
)
Mod('T_cold_finger',
'frappy_psi.lakeshore.Sensor340',
'cold finger temperature',
io = 'io',
channel = 'B'
channel = 'A'
)
Mod('Heater',
'frappy_psi.lakeshore.HeaterOutput',
'heater output',
channel = 'A',
channel = 'B',
io = 'io',
resistance = 50,
max_power = 50,

View File

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