When signal loss occurs, trigger an event close so that the event stops because we are no longer writing to the mp4

This commit is contained in:
Isaac Connor 2018-09-10 17:11:16 -04:00
parent bf1fbd169c
commit c70fb2f195
1 changed files with 4 additions and 0 deletions

View File

@ -1735,6 +1735,7 @@ bool Monitor::Analyse() {
}
shared_data->state = state = IDLE;
last_section_mod = 0;
trigger_data->trigger_state = TRIGGER_CANCEL;
} // end if ( trigger_data->trigger_state != TRIGGER_OFF )
if ( (!signal_change && signal) && (function == MODECT || function == MOCORD) ) {
@ -2388,6 +2389,9 @@ int Monitor::Capture() {
if ( captureResult < 0 ) {
Warning("Return from Capture (%d), signal loss", captureResult);
// Tell zma to end the event. zma will reset TRIGGER
trigger_data->trigger_state = TRIGGER_OFF;
// Unable to capture image for temporary reason
// Fake a signal loss image
Rgb signalcolor;