only cleanup old objects when motion is detected so stationary objects are still detected

This commit is contained in:
blakeblackshear
2019-03-15 20:15:41 -05:00
parent afb70f11a8
commit c12e19349e
2 changed files with 29 additions and 20 deletions

View File

@@ -136,7 +136,8 @@ def main():
object_parser = ObjectParser(object_queue, objects_parsed, DETECTED_OBJECTS)
object_parser.start()
# start a thread to expire objects from the detected objects list
object_cleaner = ObjectCleaner(objects_parsed, DETECTED_OBJECTS)
object_cleaner = ObjectCleaner(objects_parsed, DETECTED_OBJECTS,
motion_changed, [region['motion_detected'] for region in regions])
object_cleaner.start()
# connect to mqtt and setup last will