Project

General

Profile

Statistics
| Revision:

root / trunk / code / projects / diagnostic_station / station / tests.c @ 1169

History | View | Annotate | Download (651 Bytes)

1
#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
        test_bom (true, true);
30
        test_rangefinders ();
31
        test_encoders ();
32
        test_motors ();
33
}
34

    
35

    
36

    
37