Add debug in Ready(). Reset image_count in Reload so that Ready() works after a reload.

This commit is contained in:
Isaac Connor
2023-11-06 12:49:44 -05:00
parent 1e8077451e
commit a52dc04d2e
2 changed files with 2 additions and 0 deletions

View File

@@ -562,6 +562,7 @@ void Monitor::Load(MYSQL_ROW dbrow, bool load_zones=true, Purpose p = QUERY) {
// How many frames we need to have before we start analysing
ready_count = std::max(warmup_count, pre_event_count);
image_count = 0;
last_alarm_count = 0;
state = IDLE;
last_signal = true; // Defaulting to having signal so that we don't get a signal change on the first frame.

View File

@@ -709,6 +709,7 @@ public:
return false;
}
if (image_count >= ready_count) {
Debug(2, "Ready because image_count(%d) >= ready_count(%d)", image_count, ready_count);
return true;
}
Debug(2, "Not ready because image_count(%d) <= ready_count(%d)", image_count, ready_count);