Commit f8e1ad2c authored by François Heremans's avatar François Heremans
Browse files

Correction to pause routine during realtime operation

parent ebc6c51f
......@@ -73,6 +73,15 @@ if (FLAG_JAVA)
include_directories ("${PROJECT_BINARY_DIR}/conf")
endif ()
# Websocket files
if (FLAG_WEBSOCKET)
include_directories("./websocket")
increment_src( ${PROJECT_SOURCE_DIR}/websocket )
add_definitions( -DWEBSOCKET )
include_directories ("${PROJECT_BINARY_DIR}/conf")
endif ()
# Get OpenGL lib
if (FLAG_REAL_TIME AND FLAG_OPEN_GL)
# Threads
......@@ -133,13 +142,6 @@ if (FLAG_REAL_TIME AND FLAG_OPEN_GL)
include_directories ("${PROJECT_BINARY_DIR}/conf")
endif ()
# Websocket files
if (FLAG_WEBSOCKET)
include_directories("./websocket")
increment_src( ${PROJECT_SOURCE_DIR}/websocket )
add_definitions( -DWEBSOCKET )
include_directories ("${PROJECT_BINARY_DIR}/conf")
endif ()
# list include directories (to find headers)
init_include()
......
......@@ -234,13 +234,13 @@ void process_msg(Simu_realtime *realtime){
void pause_routine(Simu_realtime *realtime){
// variables declaration
int start_break_t_usec;
int delta_break_u_sec;
int init_t_sec, init_t_usec;
// // variables declaration
// int start_break_t_usec;
// int delta_break_u_sec;
// int init_t_sec, init_t_usec;
init_t_sec = realtime->init_t_sec;
init_t_usec = realtime->init_t_usec;
// init_t_sec = realtime->init_t_sec;
// init_t_usec = realtime->init_t_usec;
// start of the break instant
// start_break_t_usec = t_usec(init_t_sec, init_t_usec);
......@@ -256,11 +256,13 @@ void pause_routine(Simu_realtime *realtime){
auto end_break = high_resolution_clock::now();
auto delta_us = duration_cast<std::chrono::microseconds>(start_break - end_break);
auto delta_us = std::chrono::duration_cast<std::chrono::microseconds>(end_break - start_break);
// update variables after the break
realtime->speed_last_t_usec += delta_us.count();
update_realtime_constraints_break(realtime, delta_break_u_sec);
update_realtime_constraints_break(realtime, delta_us.count());
}
/*! \brief main update loop for the visualization
......
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