Project

General

Profile

Statistics
| Revision:

root / trunk / code / projects / mapping / odometry / encoders.h @ 872

History | View | Annotate | Download (568 Bytes)

1 723 justin
#define RIGHT 1
2
#ifndef LEFT
3
        #define LEFT 0
4
#endif
5
#ifndef LEFT
6
        #define LEFT 0
7
#endif
8
#define INVALID 1024
9
#define MAGNET_FAILURE 1025
10
11
//Data invalid flags (hardware failure):
12
#define OCF _BV(4)
13
#define COF _BV(3)
14
15
//Data invlalid alarm (May be invalid):
16
#define LIN _BV(2)
17
18
#define MagINCn _BV(1)
19
#define MagDECn _BV(0)
20
21
#define BUFFER_SIZE 23
22
23
void encoder_init(void);
24
int encoder_read(char encoder);
25
char encoder_direction(char encoder);
26
27
int encoder_get_dx(char encoder);
28
void encoder_rst_dx(char encoder);
29
int encoder_get_tc(void);
30 730 justin
void encoder_rst_tc(void);