Project

General

Profile

Statistics
| Revision:

root / trunk / code / projects / traffic_navigation / validTurns-test.c @ 1943

History | View | Annotate | Download (1.22 KB)

1
#include <dragonfly_lib.h>
2
#include "intersectData.h"
3
#include "validTurns.h"
4
#include "lineDrive.h"
5

    
6
//#define TEST_VALIDTURNS
7

    
8
#ifdef TEST_VALIDTURNS
9

    
10
int main(){
11

    
12
        dragonfly_init(ALL_ON);
13
        orb1_set_color(YELLOW);
14

    
15
        initializeData();        
16
        
17
        if (getTurnIntType(INTERSECTION_DOUBLE_C) == DOUBLE) orb1_set_color(GREEN);
18

    
19
        delay_ms(500);
20
        orb1_set_color(PINK);
21
        delay_ms(500);
22

    
23
        if (getTurnIntType(INTERSECTION_DOUBLE_T) == DOUBLE) orb1_set_color(GREEN);
24

    
25
        delay_ms(500);
26
        orb1_set_color(BLUE);
27
        delay_ms(500);
28

    
29
        if (getTurnIntType(INTERSECTION_SINGLE) == SINGLE) orb1_set_color(GREEN);
30

    
31
        delay_ms(500);
32
        orb1_set_color(PINK);
33
        delay_ms(500);
34

    
35
        if (getTurnIntType(INTERSECTION_ON_RAMP) == ON_RAMP) orb1_set_color(GREEN);
36

    
37
        delay_ms(500);
38
        orb1_set_color(BLUE);
39
        delay_ms(500);
40

    
41
        if( getTurnIntType(getIntersectType(0)) == DOUBLE) orb1_set_color(GREEN);
42

    
43
        delay_ms(500);
44
        orb1_set_color(PINK);
45
        delay_ms(500);
46

    
47
/*****************************TEST FOR validTurns.c
48
        int barcode = 0;
49
        
50
        if (validateTurn(barcode, ILEFT)==ILEFT) orb1_set_color(GREEN);
51

52
        delay_ms(100);
53
        orb1_set_color(PINK);
54
        delay_ms(50);
55

56
        if (validateTurn(barcode, IUTURN)==IUTURN) orb1_set_color(GREEN);
57
        
58
        delay_ms(100);
59
        orb1_set_color(RED);
60
        delay_ms(50);
61
*/
62
        while (1){}
63

    
64
}
65

    
66
#endif