Skip to content

Commit

Permalink
Clean all rectangles unconditionally
Browse files Browse the repository at this point in the history
  • Loading branch information
leonmavr committed Sep 16, 2024
1 parent 1131b4f commit 85dc7ac
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/viz.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ void viz_init(unsigned width, unsigned height) {

void viz_flush() {
// remove all previously drawn rectangles
for (int i = 0; i < irect; ++i) {
for (int i = 0; i < NOBJECTS; ++i) {
fprintf(viz_plot_pipe, "unset object %d\n", i + 1);
}
for (int i = 0; i < irect; ++i) {
Expand All @@ -42,8 +42,7 @@ void viz_flush() {
fprintf(viz_plot_pipe, "replot\n");
irect = ipoint = 0;
fflush(viz_plot_pipe);
// 20 fps
usleep(50000);
usleep(16000);
}


Expand Down

0 comments on commit 85dc7ac

Please sign in to comment.