From 0e148d809abc9d78024ae3bc9ec6ac42289e11d0 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 28 Dec 2021 12:33:23 -0500 Subject: [PATCH] cleanup logic and fix the zone names coming before the Motion: label --- src/zm_monitor.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index fff655177..c4e82a69a 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -1894,16 +1894,14 @@ bool Monitor::Analyse() { alarm_cause += std::string(zone.Label()); } } - if (!alarm_cause.empty()) - cause = cause+" "+alarm_cause; - Debug(3, "After motion detection, score:%d last_motion_score(%d), new motion score(%d)", score, last_motion_score, motion_score); motion_frame_count += 1; last_motion_score = motion_score; + if (motion_score) { if (cause.length()) cause += ", "; - cause += MOTION_CAUSE; + cause += MOTION_CAUSE+":"+alarm_cause; noteSetMap[MOTION_CAUSE] = zoneSet; } // end if motion_score }