From 9d69fe63611920beadfe1e0f03577becf539167b Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Mon, 18 Jul 2022 15:32:10 +0100 Subject: Correct comment. --- index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index c0bf12d..9835fdd 100644 --- a/index.php +++ b/index.php @@ -17,9 +17,10 @@ $arr_json = json_decode($json, true); // Try to OCR the current temperature from Jersey Met's usually-more-up-to-date image... if (!exec('tesseract "https://sojpublicdata.blob.core.windows.net/jerseymet/Town/internet.Temperature1.png" stdout | grep -Eo "[-0-9]+\.[0-9]+°C"', $ocroutput, $ocrretval)) { + // ...if not, use the JSON output $curtemp = $arr_json['currentTemprature']; } else { - // ...if not, use the JSON output + // ...if so, use the OCRed output $curtemp = $ocroutput[0]; } -- cgit v1.2.3