Revision 1827
Unittests: Added test_ir.c to test new IR receivers for line following, and modified main.c to only use testir.
trunk/code/projects/unit_tests/test_ir.c | ||
---|---|---|
1 |
#include <dragonfly_lib.h> |
|
2 |
|
|
3 |
int testir(void) |
|
4 |
{ |
|
5 |
int port; |
|
6 |
analog_init(ADC_START); |
|
7 |
while(1){ |
|
8 |
for(port = 0; port <= 2; port++){ |
|
9 |
usb_puti(analog10(port)); |
|
10 |
usb_putc(','); |
|
11 |
delay_ms(575); |
|
12 |
} |
|
13 |
} |
|
14 |
return 0; |
|
15 |
} |
trunk/code/projects/unit_tests/main.c | ||
---|---|---|
19 | 19 |
// RUN_TEST(testtokenring); |
20 | 20 |
// RUN_TEST(testwireless); |
21 | 21 |
RUN_TEST(testxbee); |
22 |
RUN_TEST(testir); |
|
22 | 23 |
delay_ms(1000); |
23 | 24 |
} |
24 | 25 |
|
Also available in: Unified diff