Commit e80e4db6 authored by Sébastien Timmermans's avatar Sébastien Timmermans
Browse files

[Error mngmt] real-time 466->410

parent 2884668a
...@@ -237,7 +237,7 @@ void mbs_dirdyn_init(MbsDirdyn* dd, MbsData* mbs_data) ...@@ -237,7 +237,7 @@ void mbs_dirdyn_init(MbsDirdyn* dd, MbsData* mbs_data)
if (dd->options->realtime) if (dd->options->realtime)
{ {
mbs_msg("\t >Real-time> To use the real-time features (mbs_dirdyn->options->realtime activated), set the CMake flag 'FLAG_REAL_TIME' to ON !\n"); mbs_msg("\t >Real-time> To use the real-time features (mbs_dirdyn->options->realtime activated), set the CMake flag 'FLAG_REAL_TIME' to ON !\n");
mbs_error_msg("[%d] in mbs_dirdyn_init !! \n", -466); mbs_error_msg("[%d] in mbs_dirdyn_init !! \n", -410);
} }
#endif #endif
...@@ -415,7 +415,7 @@ void mbs_dirdyn_init(MbsDirdyn* dd, MbsData* mbs_data) ...@@ -415,7 +415,7 @@ void mbs_dirdyn_init(MbsDirdyn* dd, MbsData* mbs_data)
if (!dd->options->realtime) if (!dd->options->realtime)
{ {
mbs_msg("\t >Real-time> Error: real-time features must be activated to set 'save_visu' to 1 ! \n"); mbs_msg("\t >Real-time> Error: real-time features must be activated to set 'save_visu' to 1 ! \n");
mbs_error_msg("[%d] in mbs_dirdyn_init !! \n", -466); mbs_error_msg("[%d] in mbs_dirdyn_init !! \n", -410);
} }
realtime = (Simu_realtime*) mbs_data->realtime; realtime = (Simu_realtime*) mbs_data->realtime;
...@@ -423,7 +423,7 @@ void mbs_dirdyn_init(MbsDirdyn* dd, MbsData* mbs_data) ...@@ -423,7 +423,7 @@ void mbs_dirdyn_init(MbsDirdyn* dd, MbsData* mbs_data)
if (!realtime->options->flag_visu) if (!realtime->options->flag_visu)
{ {
mbs_msg("\t >Real-time> Error: flag_visu must be set to 1 to set 'save_value' to 1 ! \n"); mbs_msg("\t >Real-time> Error: flag_visu must be set to 1 to set 'save_value' to 1 ! \n");
mbs_error_msg("[%d] in mbs_dirdyn_init !! \n", -466); mbs_error_msg("[%d] in mbs_dirdyn_init !! \n", -410);
} }
visu = realtime->ext->visu; visu = realtime->ext->visu;
...@@ -439,7 +439,7 @@ void mbs_dirdyn_init(MbsDirdyn* dd, MbsData* mbs_data) ...@@ -439,7 +439,7 @@ void mbs_dirdyn_init(MbsDirdyn* dd, MbsData* mbs_data)
#else #else
mbs_msg("\t >Real-time> Error: Java libraries must be activated to set 'save_visu' to 1 ! \n"); mbs_msg("\t >Real-time> Error: Java libraries must be activated to set 'save_visu' to 1 ! \n");
mbs_error_msg("[%d] in mbs_dirdyn_init !! \n", -466); mbs_error_msg("[%d] in mbs_dirdyn_init !! \n", -410);
#endif #endif
} }
......
...@@ -395,19 +395,19 @@ void check_user_realtime_options(Realtime_option *options) ...@@ -395,19 +395,19 @@ void check_user_realtime_options(Realtime_option *options)
if (options->t0 >= options->tf) if (options->t0 >= options->tf)
{ {
mbs_msg("\t >Real-time> options error: t0 (%f) >= tf (%f).\n", options->t0, options->tf); mbs_msg("\t >Real-time> options error: t0 (%f) >= tf (%f).\n", options->t0, options->tf);
mbs_error_msg("[%d] in check_user_realtime_options !! \n", -466); mbs_error_msg("[%d] in check_user_realtime_options !! \n", -410);
} }
if (options->dt0 <= 0.0) if (options->dt0 <= 0.0)
{ {
mbs_msg("\t >Real-time> options error: dt0 (%f) is not strictly positive.\n", options->dt0); mbs_msg("\t >Real-time> options error: dt0 (%f) is not strictly positive.\n", options->dt0);
mbs_error_msg("[%d] in check_user_realtime_options !! \n", -466); mbs_error_msg("[%d] in check_user_realtime_options !! \n", -410);
} }
if (options->y_min_init >= options->y_max_init) if (options->y_min_init >= options->y_max_init)
{ {
mbs_msg("\t >Real-time> options error: y_min_init (%f) >= y_max_init (%f).\n", options->y_min_init, options->y_max_init); mbs_msg("\t >Real-time> options error: y_min_init (%f) >= y_max_init (%f).\n", options->y_min_init, options->y_max_init);
mbs_error_msg("[%d] in check_user_realtime_options !! \n", -466); mbs_error_msg("[%d] in check_user_realtime_options !! \n", -410);
} }
for(i=0; i<options->nb_models; i++) for(i=0; i<options->nb_models; i++)
...@@ -415,7 +415,7 @@ void check_user_realtime_options(Realtime_option *options) ...@@ -415,7 +415,7 @@ void check_user_realtime_options(Realtime_option *options)
if (options->nb_q[i] < 0) if (options->nb_q[i] < 0)
{ {
mbs_msg("\t >Real-time> options error: nb_q[%d] (%d) negative.\n", i, options->nb_q[i]); mbs_msg("\t >Real-time> options error: nb_q[%d] (%d) negative.\n", i, options->nb_q[i]);
mbs_error_msg("[%d] in check_user_realtime_options !! \n", -466); mbs_error_msg("[%d] in check_user_realtime_options !! \n", -410);
} }
} }
...@@ -564,7 +564,7 @@ Simu_realtime* init_simu_realtime(MbsData* mbs_data, Realtime_option *options, i ...@@ -564,7 +564,7 @@ Simu_realtime* init_simu_realtime(MbsData* mbs_data, Realtime_option *options, i
if (nb_constraints < 0) if (nb_constraints < 0)
{ {
mbs_msg("\t >Real-time> Error: negative number of realtime constraints! \n"); mbs_msg("\t >Real-time> Error: negative number of realtime constraints! \n");
mbs_error_msg("[%d] in init_simu_realtime !! \n", -466); mbs_error_msg("[%d] in init_simu_realtime !! \n", -410);
} }
// memory allocation // memory allocation
...@@ -583,7 +583,7 @@ Simu_realtime* init_simu_realtime(MbsData* mbs_data, Realtime_option *options, i ...@@ -583,7 +583,7 @@ Simu_realtime* init_simu_realtime(MbsData* mbs_data, Realtime_option *options, i
if (options->flag_visu) if (options->flag_visu)
{ {
mbs_msg("\t >Real-time> To use the Java visualization (realtime->options->flag_visu activated), set the CMake flag 'FLAG_VISU' to ON !\n"); mbs_msg("\t >Real-time> To use the Java visualization (realtime->options->flag_visu activated), set the CMake flag 'FLAG_VISU' to ON !\n");
mbs_error_msg("[%d] in init_simu_realtime !! \n", -466); mbs_error_msg("[%d] in init_simu_realtime !! \n", -410);
} }
#endif #endif
...@@ -596,7 +596,7 @@ Simu_realtime* init_simu_realtime(MbsData* mbs_data, Realtime_option *options, i ...@@ -596,7 +596,7 @@ Simu_realtime* init_simu_realtime(MbsData* mbs_data, Realtime_option *options, i
if (options->flag_plot) if (options->flag_plot)
{ {
mbs_msg("\t >Real-time> To use the real-time features (realtime->options->flag_plot activated), set the CMake flag 'FLAG_PLOT' to ON ! \n"); mbs_msg("\t >Real-time> To use the real-time features (realtime->options->flag_plot activated), set the CMake flag 'FLAG_PLOT' to ON ! \n");
mbs_error_msg("[%d] in init_simu_realtime !! \n", -466); mbs_error_msg("[%d] in init_simu_realtime !! \n", -410);
} }
#endif #endif
......
...@@ -533,7 +533,7 @@ void free_screen_sdl(Screen_sdl *screen_sdl) ...@@ -533,7 +533,7 @@ void free_screen_sdl(Screen_sdl *screen_sdl)
void log_SDL_error(char *SDL_function) void log_SDL_error(char *SDL_function)
{ {
mbs_msg("\t >SDL> %s error: %s\n",SDL_function, SDL_GetError()); mbs_msg("\t >SDL> %s error: %s\n",SDL_function, SDL_GetError());
mbs_error_msg("[%d] in log_SDL_error !! \n", -466); mbs_error_msg("[%d] in log_SDL_error !! \n", -410);
} }
/*! \brief change the color in SDL /*! \brief change the color in SDL
......
...@@ -39,7 +39,6 @@ MbsBuffer* mbs_new_buffer(char* filename, char* anim_name, int nx, int size, int ...@@ -39,7 +39,6 @@ MbsBuffer* mbs_new_buffer(char* filename, char* anim_name, int nx, int size, int
if(fid == NULL) if(fid == NULL)
{ {
mbs_error_msg("error in mbs_buffer_save: cannot open file '%s'\n", b->filename); mbs_error_msg("error in mbs_buffer_save: cannot open file '%s'\n", b->filename);
return NULL;
}else{ }else{
fclose(fid); fclose(fid);
} }
...@@ -86,7 +85,6 @@ MbsBuffer* mbs_new_buffer(char* filename, char* anim_name, int nx, int size, int ...@@ -86,7 +85,6 @@ MbsBuffer* mbs_new_buffer(char* filename, char* anim_name, int nx, int size, int
if(fid == NULL) if(fid == NULL)
{ {
mbs_error_msg("in mbs_buffer_save: cannot open file '%s'\n", b->anim->filename); mbs_error_msg("in mbs_buffer_save: cannot open file '%s'\n", b->anim->filename);
return NULL;
}else{ }else{
fclose(fid); fclose(fid);
} }
......
Supports Markdown
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