Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
robotran
mbsysc
Commits
841522e4
Commit
841522e4
authored
Sep 02, 2015
by
Nicolas Van der Noot
Browse files
correct viewpoint past visualization
parent
27a6f3a6
Changes
3
Hide whitespace changes
Inline
Side-by-side
MBsysC/mbs_common/mbs_realtime/java/java_functions.c
View file @
841522e4
...
...
@@ -193,11 +193,26 @@ void update_java(Simu_realtime *realtime)
if
(
java
->
visu_past_flag
)
{
java
->
visu_past_flag
=
0
;
java
->
visu_past_flag
=
0
;
java
->
last_past_q_flag
=
1
;
update_jni
(
java
->
jni_struct
,
java
,
java
->
nb_q
,
java
->
past_q
);
}
else
if
(
java
->
change_viewpoint
)
{
if
(
java
->
last_past_q_flag
)
{
update_jni
(
java
->
jni_struct
,
java
,
java
->
nb_q
,
java
->
past_q
);
}
else
{
update_jni
(
java
->
jni_struct
,
java
,
java
->
nb_q
,
java
->
cur_q
);
}
}
else
{
java
->
last_past_q_flag
=
0
;
update_jni
(
java
->
jni_struct
,
java
,
java
->
nb_q
,
java
->
cur_q
);
}
}
...
...
MBsysC/mbs_common/mbs_realtime/realtime/realtime_ext.c
View file @
841522e4
...
...
@@ -116,6 +116,8 @@ Realtime_java* init_realtime_java(void *realtime_options, MbsData* mbs_data)
java
->
flag_buffer_round
=
0
;
java
->
last_past_q_flag
=
0
;
java
->
cur_q
=
(
double
*
)
malloc
(
nb_q
*
sizeof
(
double
));
for
(
i
=
0
;
i
<
nb_q
;
i
++
)
{
...
...
MBsysC/mbs_common/mbs_realtime/realtime/realtime_ext.h
View file @
841522e4
...
...
@@ -54,6 +54,7 @@ typedef struct Realtime_java
int
visu_past_flag
;
///< 1 to view what happened before, 0 otherwise
double
t_visu_past
;
///< requested time for past visualization
int
flag_buffer_round
;
///< 1 if buffer already filled, 0 otherwise
int
last_past_q_flag
;
///< 1 if last visu was with past_q, 0 otherwise
char
*
mbs_file
;
///< path and file name fot the .mbs file used for Java visualization
double
*
tsim_save
;
///< vector saving the simulation time [s]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment