Commit de518771 authored by Nicolas Van der Noot's avatar Nicolas Van der Noot
Browse files

solve bug init plot user

parent 4c98ab3a
......@@ -641,6 +641,8 @@ Simu_realtime* init_simu_realtime(MbsData* mbs_data, Realtime_option *options, i
realtime->buffer_size = options->buffer_size;
realtime->first_break = options->init_break;
realtime->flag_plot = options->flag_plot;
realtime->flag_visu = options->flag_visu;
......
......@@ -143,6 +143,8 @@ typedef struct Simu_realtime
int flag_plot; ///< 1 if SDL plots features activated, 0 otherwise
int flag_visu; ///< 1 if Java visualization features activated, 0 otherwise
int first_break; ///< 1 if during the first break, 0 otherwise
Realtime_constraint **constraints; ///< structures of multiple real-time constraints
Realtime_extern *ext; ///< external variables
......
......@@ -1941,7 +1941,7 @@ void plot_screen_sdl(Simu_realtime *realtime, double tsim, int screen_flag)
screen_sdl = realtime_sdl->screen_sdl;
auto_plot = screen_sdl->auto_plot;
if (screen_flag==1)
if ((screen_flag == 1) && (!realtime->first_break))
{
update_y_tab(screen_sdl);
}
......@@ -2975,6 +2975,8 @@ void break_gestion(Simu_realtime *realtime, double tsim)
}
}
realtime->first_break = 0;
// update variables after the break
delta_break_u_sec = t_usec(init_t_sec, init_t_usec) - start_break_t_usec;
realtime->speed_last_t_usec += delta_break_u_sec;
......
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