Project

General

Profile

Revision 771

Added by Brad Neuman over 13 years ago

control law for speed starting to work.
WARNING: can't use delay_ms with encoders_init

View differences:

encoders.h
12 12
#define INVALID 1024
13 13
#define MAGNET_FAILURE 1025
14 14

  
15

  
16
//delay_ms argument after a full read is complete
17
#define ENCODER_DELAY 20
18

  
19
#define MIN_V (-100)
20
#define MAX_V 100
21

  
15 22
//Data invalid flags (hardware failure):
16 23
#define OCF _BV(4)
17 24
#define COF _BV(3)
......
33 40
int encoder_get_tc(void);
34 41
void encoder_rst_tc(void);
35 42

  
43
int encoder_get_v(char encoder);
44

  
45
//waits for the next encoder reading, then returns
46
void encoder_wait( int nReadings );
47

  
36 48
#endif

Also available in: Unified diff