root / trunk / code / projects / diagnostic_station / station / tests.c @ 1298
History | View | Annotate | Download (664 Bytes)
1 | 1169 | deffi | #include "tests.h" |
---|---|---|---|
2 | |||
3 | #include <dragonfly_lib.h> |
||
4 | #include "global.h" |
||
5 | |||
6 | bool communication_ok=false; |
||
7 | |||
8 | bool require_comm (void) |
||
9 | { |
||
10 | if (!communication_ok)
|
||
11 | communication_ok=test_comm (); |
||
12 | |||
13 | if (!communication_ok)
|
||
14 | usb_puts ("# Communications required. Stop." NL);
|
||
15 | |||
16 | return communication_ok;
|
||
17 | } |
||
18 | |||
19 | void test_all (void) |
||
20 | { |
||
21 | // test_all tests comm itself because we want to test comm, even if it
|
||
22 | // succeeded before (that's what test_all means).
|
||
23 | if (!test_comm ())
|
||
24 | { |
||
25 | usb_puts ("# Communications required. Stop." NL);
|
||
26 | return;
|
||
27 | } |
||
28 | |||
29 | 1202 | deffi | test_bom_all (true, true); |
30 | test_rangefinder_all (); |
||
31 | test_encoder_all (); |
||
32 | test_motor_all (); |
||
33 | 1169 | deffi | } |
34 | |||
35 | |||
36 |