root / trunk / code / projects / diagnostic_station / station / dump_station.c @ 1251
History | View | Annotate | Download (1012 Bytes)
1 | 1244 | deffi | #include "dump_station.h" |
---|---|---|---|
2 | |||
3 | #include "hardware.h" |
||
4 | |||
5 | 1251 | deffi | void dump_station_dynamos (void) |
6 | 1244 | deffi | { |
7 | int16_t left, right; |
||
8 | char c;
|
||
9 | |||
10 | 1251 | deffi | // TODO implement resetting the dynamos (r key, for example)
|
11 | 1244 | deffi | while (usb_getc_nb (&c)==-1) |
12 | { |
||
13 | 1251 | deffi | dynamos_read (&left, &right); |
14 | 1244 | deffi | 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 | while (usb_getc_nb (&c)==-1) |
||
53 | { |
||
54 | rbom_update (); |
||
55 | rbom_read (&top, &left, &right); |
||
56 | usb_puti (top); |
||
57 | usb_puts (" ");
|
||
58 | usb_puti (left); |
||
59 | usb_puts (" ");
|
||
60 | usb_puti (right); |
||
61 | usb_puts (NL); |
||
62 | } |
||
63 | } |