Make last_alarm_count last alarmed frame while only in ALARM state to make post_event_count counts since here not alone alarmed frames that don't shot alarms.

This commit is contained in:
Admin 2021-03-04 20:20:02 +01:00
parent 5f476df194
commit fa22129966
No known key found for this signature in database
GPG Key ID: 3D8CAF8BF20BFF0B
1 changed files with 3 additions and 1 deletions

View File

@ -2138,7 +2138,9 @@ bool Monitor::Analyse() {
Debug(1, "Staying in %s", State_Strings[state].c_str());
}
last_alarm_count = analysis_image_count;
if ( state == ALARM ) {
last_alarm_count = analysis_image_count;
} // This is needed so post_event_count counts after last alarmed frames while in ALARM not single alarmed frames while ALERT
} else { // no score?
alert_to_alarm_frame_count = alarm_frame_count; // load same value configured for alarm_frame_count
if (state == ALARM) {