meter reader logging improvenets

This commit is contained in:
Bogdan Vlaicu
2021-02-12 19:10:08 -05:00
parent b5f6cc815c
commit ecd5a32be5
3 changed files with 8 additions and 5 deletions
+5 -4
View File
@@ -48,7 +48,7 @@ def processor(base_low, baseline, base_up):
found = (response['TextDetections'])
reading = ""
for item in found:
print("Tekst:", item['DetectedText'])
print("DetectedText:", item['DetectedText'])
print("Type:", item['Type'])
print("Confidence", item['Confidence'])
print("Id", item['Id'])
@@ -64,15 +64,16 @@ def processor(base_low, baseline, base_up):
try:
nw = int(temp)
except Exception:
print("Conversion failed")
print("Conversion to int failed")
pass
print("Nw: ", nw)
print("Converted int: ", nw)
if (base_low <= nw and nw <= base_up):
print("erg waarschijnlijk juist:")
print("Value found in range:")
reading = temp
print(temp)
print(base_low, nw, base_up)
print("-----------")
print("Returning reading: ", reading)
return reading