Project

General

Profile

Statistics
| Revision:

root / trunk / code / projects / diagnostic_station / station / dump_station.c @ 1244

History | View | Annotate | Download (1.05 KB)

1
#include "dump_station.h"
2

    
3
#include "hardware.h"
4

    
5
void dump_station_encoders (void)
6
{
7
        int16_t left, right;
8
        char c;
9

    
10
        // TODO implement resetting the encoders (r key, for example)
11
        while (usb_getc_nb (&c)==-1)
12
        {
13
                encoders_read (&left, &right);
14
                usb_puti (left);
15
                usb_puts (" ");
16
                usb_puti (right);
17
                usb_puts (NL);
18
        }
19
}
20

    
21
void dump_station_turntable (void)
22
{
23
        uint16_t turntable;
24
        char c;
25

    
26
        while (usb_getc_nb (&c)==-1)
27
        {
28
                turntable=turntable_get_position ();
29
                usb_puti (turntable);
30
                usb_puts (NL);
31
        }
32
}
33

    
34
void dump_station_wall (void)
35
{
36
        uint16_t wall;
37
        char c;
38

    
39
        while (usb_getc_nb (&c)==-1)
40
        {
41
                wall=turntable_get_position ();
42
                usb_puti (wall);
43
                usb_puts (NL);
44
        }
45
}
46

    
47
void dump_station_rbom (void)
48
{
49
        uint16_t top, left, right;
50
        char c;
51

    
52
        // TODO implement resetting the encoders (r key, for example)
53
        while (usb_getc_nb (&c)==-1)
54
        {
55
                rbom_update ();
56
                rbom_read (&top, &left, &right);
57
                usb_puti (top);
58
                usb_puts (" ");
59
                usb_puti (left);
60
                usb_puts (" ");
61
                usb_puti (right);
62
                usb_puts (NL);
63
        }
64
}