Revision 1291
Fixed left/right (for real this time)
hardware_dynamos.c | ||
---|---|---|
32 | 32 |
uint8_t temp = PINE; |
33 | 33 |
|
34 | 34 |
if(((temp&_BV(PE4))>>2)^(temp&_BV(PE2))) |
35 |
count_l--;
|
|
35 |
count_r--;
|
|
36 | 36 |
else |
37 |
count_l++;
|
|
37 |
count_r++;
|
|
38 | 38 |
} |
39 | 39 |
|
40 | 40 |
ISR(INT5_vect) |
... | ... | |
42 | 42 |
uint8_t temp = PINE; |
43 | 43 |
|
44 | 44 |
if(((temp&_BV(PE5))>>2)^(temp&_BV(PE3))) |
45 |
count_r++;
|
|
45 |
count_l++;
|
|
46 | 46 |
else |
47 |
count_r--;
|
|
47 |
count_l--;
|
|
48 | 48 |
} |
49 | 49 |
|
50 | 50 |
|
51 |
void dynamos_read (int16_t *right, int16_t *left)
|
|
51 |
void dynamos_read (int16_t *left, int16_t *right)
|
|
52 | 52 |
{ |
53 | 53 |
SYNC |
54 | 54 |
{ |
55 |
*right= count_l;
|
|
56 |
*left = count_r;
|
|
55 |
*left= count_l;
|
|
56 |
*right = count_r;
|
|
57 | 57 |
} |
58 | 58 |
} |
59 | 59 |
|
Also available in: Unified diff