allow 0 pre_event_count

This commit is contained in:
Isaac Connor 2018-03-29 12:35:03 -04:00
parent 8c52c7feef
commit a5b77a59d3
1 changed files with 2 additions and 2 deletions

View File

@ -1485,7 +1485,7 @@ bool Monitor::Analyse() {
if ( analysis_fps ) {
// If analysis fps is set,
// compute the index for pre event images in the dedicated buffer
pre_index = image_count%pre_event_buffer_count;
pre_index = pre_event_buffer_count ? image_count%pre_event_buffer_count : 0;
// Seek forward the next filled slot in to the buffer (oldest data)
// from the current position
@ -1540,7 +1540,7 @@ bool Monitor::Analyse() {
if ( analysis_fps ) {
// If analysis fps is set,
// compute the index for pre event images in the dedicated buffer
pre_index = image_count%pre_event_buffer_count;
pre_index = pre_event_buffer_count ? image_count%pre_event_buffer_count : 0;
// Seek forward the next filled slot in to the buffer (oldest data)
// from the current position