diff --git a/.idea/workspace.xml b/.idea/workspace.xml index a6a7328..e10f729 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,8 +2,6 @@ - - - + - - + + @@ -36,7 +34,7 @@ - + @@ -119,8 +117,8 @@ @@ -198,7 +196,7 @@ - + @@ -272,22 +270,22 @@ - + - - + + - + - + - - + + - + diff --git a/index.py b/index.py index d7ca344..0328ca9 100644 --- a/index.py +++ b/index.py @@ -34,7 +34,7 @@ def poll(): for stall in doc_ref_stalls: stall_obj = stall.to_dict() - color_reference = image_tools.average_color(75, 400, 50, 50, reference) + color_reference = image_tools.average_color(75, 400, 50, 50, img) color_compare = image_tools.average_color(stall_obj['locationX'], stall_obj['locationY'], stall_obj['width'], stall_obj['height'], img) stall_occupied = image_tools.threshold(image_tools.differences(color_reference, color_compare), float(os.getenv('E_HAT_TRIGGER_LEVEL'))) stall_obj['open'] = not stall_occupied