diff options
author | Luke Bratch <luke@bratch.co.uk> | 2022-07-18 15:32:10 +0100 |
---|---|---|
committer | Luke Bratch <luke@bratch.co.uk> | 2022-07-18 15:32:10 +0100 |
commit | 9d69fe63611920beadfe1e0f03577becf539167b (patch) | |
tree | eef72e01244070d81d73ce11f9dbd9d562484c4a /index.php | |
parent | b6c2cac271e207352071e9014936809d59aa0ed0 (diff) |
Correct comment.
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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]; } |