fix logic to handle no pre_event frames
This commit is contained in:
parent
49d75ce039
commit
5df2fbfff2
|
@ -1543,7 +1543,7 @@ bool Monitor::Analyse() {
|
|||
}
|
||||
if ( score ) {
|
||||
if ( (state == IDLE || state == TAPE || state == PREALARM ) ) {
|
||||
if ( Event::PreAlarmCount() > alarm_frame_count ) {
|
||||
if ( (!pre_event_count) || (Event::PreAlarmCount() >= alarm_frame_count) ) {
|
||||
Info("%s: %03d - Gone into alarm state %u > %u",
|
||||
name, image_count, Event::PreAlarmCount(), alarm_frame_count);
|
||||
shared_data->state = state = ALARM;
|
||||
|
|
Loading…
Reference in New Issue