Project

General

Profile

Statistics
| Revision:

root / trunk / code / projects / diagnostic_station / stationCode / UI / main_old.c @ 1118

History | View | Annotate | Download (771 Bytes)

1 1118 erhart
#include <dragonfly_lib.h>
2
3
int main(void);
4
void test_rangefinders(void);
5
void test_BOM(void);
6
void test_motors(void);
7
8
int main(void)
9
{
10
        /* initialize components */
11
        dragonfly_init(ALL_ON);
12
        usb_init();
13
14
        usb_puts("Waiting for instructions");
15
        usb_putc('\0');
16
        while(1){
17
                char c;
18
                if(usb_getc_nb(&c) != -1){
19
                        switch( c ){
20
                        case 'r' : test_rangefinders();
21
                        case 'b' : test_BOM();
22
                        case 'm' : test_motors();
23
                     }
24
                }
25
        }
26
        return 0;
27
}
28
29
/*
30
 * Change these later, of course
31
 */
32
33
void test_rangefinders(void){
34
        usb_puts("Instructed to test rangefinders");
35
        usb_putc('\0' );
36
}
37
38
void test_BOM(void){
39
        usb_puts("Instructed to test BOM");
40
        usb_putc('\0' );
41
}
42
43
void test_motors(void){
44
        usb_puts("Instructed to test motor");
45
        usb_putc('\0' );
46
}