Skip to content

Commit

Permalink
Added debugging for sensors
Browse files Browse the repository at this point in the history
  • Loading branch information
nigeljohnson73 committed Mar 22, 2021
1 parent 068da30 commit 927b109
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion include/_app.php
Original file line number Diff line number Diff line change
Expand Up @@ -1332,7 +1332,12 @@ function readSensorRaw_DS18B20($sensor) {
$dummy = $dummy;
echo ("Got temp: " . $temp . "\n");
$val = (( double ) $temp) / 1000.0;
echo ("Set val: " . $val . "\n");
if($val > 60) {
echo "Temp out of expected range\n";
$val = null;
} else {
echo ("Set val: " . $val . "\n");
}
$output = null;
} else {
echo ("CRC check failed\n");
Expand Down

0 comments on commit 927b109

Please sign in to comment.