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

@@ -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, ''