Merge pull request #3100 from vertigeaux/share_frame_scores
save frame scores to SharedData for use with linked monitors
This commit is contained in:
commit
ddf66bc9b5
|
@ -494,6 +494,7 @@ Monitor::Monitor(
|
|||
shared_data->format = camera->SubpixelOrder();
|
||||
shared_data->imagesize = camera->ImageSize();
|
||||
shared_data->alarm_cause[0] = 0;
|
||||
shared_data->last_frame_score = 0;
|
||||
trigger_data->size = sizeof(TriggerData);
|
||||
trigger_data->trigger_state = TRIGGER_CANCEL;
|
||||
trigger_data->trigger_score = 0;
|
||||
|
@ -1538,7 +1539,7 @@ bool Monitor::Analyse() {
|
|||
}
|
||||
}
|
||||
noteSet.insert(linked_monitors[i]->Name());
|
||||
score += 50;
|
||||
score += linked_monitors[i]->lastFrameScore(); // 50;
|
||||
} else {
|
||||
Debug(4, "Linked monitor %d %s is not alarmed",
|
||||
linked_monitors[i]->Id(), linked_monitors[i]->Name());
|
||||
|
@ -1829,6 +1830,7 @@ bool Monitor::Analyse() {
|
|||
}
|
||||
} // end if ! IDLE
|
||||
}
|
||||
shared_data->last_frame_score = score;
|
||||
} else {
|
||||
if ( event ) {
|
||||
Info("%s: %03d - Closing event %" PRIu64 ", trigger off", name, image_count, event->Id());
|
||||
|
|
|
@ -128,7 +128,8 @@ protected:
|
|||
uint8_t signal; /* +54 */
|
||||
uint8_t format; /* +55 */
|
||||
uint32_t imagesize; /* +56 */
|
||||
uint32_t epadding1; /* +60 */
|
||||
uint32_t last_frame_score; /* +60 */
|
||||
// uint32_t epadding1; /* +60 */
|
||||
/*
|
||||
** This keeps 32bit time_t and 64bit time_t identical and compatible as long as time is before 2038.
|
||||
** Shared memory layout should be identical for both 32bit and 64bit and is multiples of 16.
|
||||
|
@ -236,6 +237,10 @@ protected:
|
|||
return last_connect_time;
|
||||
}
|
||||
|
||||
inline uint32_t lastFrameScore() {
|
||||
return shared_data->last_frame_score;
|
||||
}
|
||||
|
||||
bool connect();
|
||||
bool disconnect();
|
||||
|
||||
|
|
Loading…
Reference in New Issue