Revision 1255
renamed the _encoders files to _dynamos
hardware_turntable.c | ||
---|---|---|
1 | 1 |
#include "hardware_turntable.h" |
2 |
#include <encoders.h> |
|
2 | 3 |
|
3 | 4 |
void turntable_init () |
4 | 5 |
{ |
5 |
// FIXME implement
|
|
6 |
encoders_init();
|
|
6 | 7 |
} |
7 | 8 |
|
8 |
void turntable_rotate_to_position (uint16_t position)
|
|
9 |
void turntable_rotate_to_position (int16_t position) |
|
9 | 10 |
{ |
10 |
usb_puts ("# Turntable rotating to ");
|
|
11 |
usb_puti (position);
|
|
12 |
usb_puts (NL);
|
|
11 |
usb_puts ("# Turntable rotating to ");
|
|
12 |
usb_puti (position);
|
|
13 |
usb_puts (NL);
|
|
13 | 14 |
|
14 |
// FIXME implement
|
|
15 |
// FIXME implement
|
|
15 | 16 |
|
16 |
usb_puts ("# Turntable position reached" NL);
|
|
17 |
usb_puts ("# Turntable position reached" NL);
|
|
17 | 18 |
} |
18 | 19 |
|
19 | 20 |
uint16_t turntable_get_position (void) |
20 | 21 |
{ |
21 |
// FIXME implement |
|
22 |
|
|
23 |
return 42; |
|
22 |
//TODO: convert units |
|
23 |
return encoder_read(RIGHT); |
|
24 | 24 |
} |
Also available in: Unified diff