Project

General

Profile

Revision 1056

sped up simulator!

changed the delay to be less and removed spamming of printfs from
world.c

View differences:

branches/simulator/projects/simulator/libsim/libsim.c
9 9
#include <robot_shared.h>
10 10
#include <string.h>
11 11

  
12
#define TICK_USEC 100
13

  
12 14
RobotShared* shared_state;
13 15

  
14 16
void *tick(int sig)
......
38 40

  
39 41

  
40 42
  iv.it_interval.tv_sec = 0;
41
  iv.it_interval.tv_usec = 50000;
43
  iv.it_interval.tv_usec = TICK_USEC;
42 44
  iv.it_value.tv_sec = 0;
43
  iv.it_value.tv_usec = 50000;
45
  iv.it_value.tv_usec = TICK_USEC;
44 46

  
45 47
  signal(SIGVTALRM, tick);
46 48

  
branches/simulator/projects/simulator/simulator/core/world.c
247 247
    {
248 248
	rf.d = theta + rf_thetas[ir];
249 249
	x = collide_world(&rf);
250
	printf("@(%g) - [%d] = %g --> %d\n",rf.d, ir, x, (short)x);
250
	//printf("@(%g) - [%d] = %g --> %d\n",rf.d, ir, x, (short)x);
251 251
	bot->shared->ranges.d[ir] = x;
252 252
    }
253 253
}

Also available in: Unified diff