temp: Use more sane substitute value
When the ADC saturates, use a substitute value that doesn't kill the following math...
This commit is contained in:
parent
115eecde4f
commit
10cea18d0a
1 changed files with 1 additions and 1 deletions
|
|
@ -31,7 +31,7 @@ while True:
|
||||||
value = float(raw_value) / (2**24 - 1)
|
value = float(raw_value) / (2**24 - 1)
|
||||||
|
|
||||||
if value > 0.9999:
|
if value > 0.9999:
|
||||||
value = 0
|
value = 20e3
|
||||||
else:
|
else:
|
||||||
value = 10e3 * 1 / (1 / value - 1)
|
value = 10e3 * 1 / (1 / value - 1)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue