Project

General

Profile

Revision 1993

I screwed the last commit, fixed it

View differences:

trunk/code/projects/traffic_navigation/validTurns.c
23 23
#define RESEED(s)( (s)=( ( ((GET16(s)^GET14(s))^GET13(s))^GET11(s) ) | SHIFT(s) ) )/*reseeding the first bit of the number with bits from the number*/
24 24

  
25 25
unsigned int turnseed = 0xC0DE;
26
int resolvRandomNumberGen(int max){
26
int randomNumGen(int max){
27 27
	turnseed *= (rtc_get() + encoder_read(LEFT))%9;
28 28
	return turnseed % max;
29 29
}
......
40 40
}
41 41
*/
42 42

  
43
char getTurnType(char barcode)
43
int getTurnType(int barcode)
44 44
{
45 45
	return randomNumGen(4);
46 46
}

Also available in: Unified diff