Commit f80377db authored by Mikhail Karpenko's avatar Mikhail Karpenko

Don't trigger overrun alert after restarts from GUI

parent 5759f046
...@@ -332,6 +332,12 @@ int camogm_start(camogm_state *state) ...@@ -332,6 +332,12 @@ int camogm_start(camogm_state *state)
D1(fprintf(debug_file, "Starting recording\n")); D1(fprintf(debug_file, "Starting recording\n"));
double dtime_stamp; double dtime_stamp;
state->frameno = 0; state->frameno = 0;
// do not trigger overrun alert on successfull (from GUI) restarts
// if (state->prog_state != STATE_RESTARTING)
// for (int p = 0; p < SENSOR_PORTS; p++)
// state->buf_overruns[p] = -1;
state->timescale = state->set_timescale; // current timescale, default 1 state->timescale = state->set_timescale; // current timescale, default 1
// debug // debug
int * ifp = (int*)&(state->frame_params[port]); int * ifp = (int*)&(state->frame_params[port]);
...@@ -1606,6 +1612,7 @@ int listener_loop(camogm_state *state) ...@@ -1606,6 +1612,7 @@ int listener_loop(camogm_state *state)
// restart the file // restart the file
D3(fprintf(debug_file,"%s:line %d - sendImageFrame() returned -%d\n", __FILE__, __LINE__, rslt)); D3(fprintf(debug_file,"%s:line %d - sendImageFrame() returned -%d\n", __FILE__, __LINE__, rslt));
camogm_stop(state); camogm_stop(state);
state->prog_state = STATE_RESTARTING;
camogm_start(state); camogm_start(state);
break; break;
case CAMOGM_FRAME_FILE_ERR: // error with file I/O case CAMOGM_FRAME_FILE_ERR: // error with file I/O
......
...@@ -77,6 +77,7 @@ enum state_flags { ...@@ -77,6 +77,7 @@ enum state_flags {
STATE_STARTING, STATE_STARTING,
STATE_RUNNING, STATE_RUNNING,
STATE_READING, STATE_READING,
STATE_RESTARTING,
STATE_CANCEL STATE_CANCEL
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment