From e91b11d1db09228a05a338ec2ab2da23dd44efa8 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 23 Sep 2022 14:17:28 -0400 Subject: [PATCH] Add IDLE to the states where we will close the event at section length end time. --- src/zm_monitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index e6c226dc1..03587db1c 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -2213,7 +2213,7 @@ bool Monitor::Analyse() { // Alert means this frame has no motion, but we were alarmed and are still recording. if ((noteSetMap.size() > 0) and event) event->updateNotes(noteSetMap); - } else if (state == TAPE) { + } else if (state == TAPE || state == IDLE) { if (event) { if (section_length >= Seconds(min_section_length) && (event->Duration() >= section_length)) { Debug(1, "%s: event %" PRIu64 ", has exceeded desired section length. %" PRIi64 " - %" PRIi64 " = %" PRIi64 " >= %" PRIi64,