root / trunk / code / projects / diagnostic_station / station / test_bom.c @ 1166
History | View | Annotate | Download (807 Bytes)
1 |
#include "test_bom.h" |
---|---|
2 |
#include "global.h" |
3 |
|
4 |
void test_bom (bool test_emitters, bool test_detectors) |
5 |
{ |
6 |
usb_puts("# Testing BOM" NL);
|
7 |
|
8 |
for (uint8_t n=0; n<15; ++n) |
9 |
{ |
10 |
if (test_emitters)
|
11 |
{ |
12 |
usb_puts("# Testing BOM emitter ");
|
13 |
usb_puti(n); |
14 |
usb_puts(NL); |
15 |
// rotate (emitter position)
|
16 |
// send (turn on only light i)
|
17 |
// wait (done)
|
18 |
// read values
|
19 |
// send (turn off lights)
|
20 |
// wait (done)
|
21 |
} |
22 |
|
23 |
if (test_detectors)
|
24 |
{ |
25 |
usb_puts("# Testing BOM detector ");
|
26 |
usb_puti(n); |
27 |
usb_puts(NL); |
28 |
// rotate (detector position)
|
29 |
//
|
30 |
// turn light on
|
31 |
// send (read data)
|
32 |
// receive (data)
|
33 |
// turn lights off
|
34 |
// send (read data)
|
35 |
// receive (data)
|
36 |
} |
37 |
|
38 |
// turn lights off
|
39 |
} |
40 |
|
41 |
//send data
|
42 |
|
43 |
usb_puts("# Testing BOM finished" NL);
|
44 |
} |