Revision 887
Updated trunk branch of wireless... Still won't work though because of Makefile.
sensor_matrix.c | ||
---|---|---|
55 | 55 |
for (i = 0; i < MAXIMUM_XBEE_ID; i++) |
56 | 56 |
{ |
57 | 57 |
m.joined[i] = 0; |
58 |
#ifndef BAYBOARD |
|
58 | 59 |
for (j = 0; j < MAXIMUM_XBEE_ID; j++) |
59 | 60 |
m.matrix[i][j] = READING_UNKNOWN; |
61 |
#endif |
|
60 | 62 |
} |
61 | 63 |
} |
62 | 64 |
|
... | ... | |
69 | 71 |
*/ |
70 | 72 |
void sensor_matrix_set_reading(int observer, int robot, int reading) |
71 | 73 |
{ |
74 |
#ifndef BAYBOARD |
|
72 | 75 |
if (robot >= MAXIMUM_XBEE_ID || observer >= MAXIMUM_XBEE_ID) |
73 | 76 |
{ |
74 | 77 |
WL_DEBUG_PRINT("ID too large."); |
... | ... | |
76 | 79 |
} |
77 | 80 |
|
78 | 81 |
m.matrix[observer][robot] = (unsigned char)reading; |
82 |
#endif |
|
79 | 83 |
} |
80 | 84 |
|
81 | 85 |
/** |
... | ... | |
88 | 92 |
**/ |
89 | 93 |
int sensor_matrix_get_reading(int observer, int robot) |
90 | 94 |
{ |
95 |
#ifndef BAYBOARD |
|
91 | 96 |
if (observer >= MAXIMUM_XBEE_ID || robot >= MAXIMUM_XBEE_ID) |
92 | 97 |
return -1; |
93 | 98 |
|
94 | 99 |
return (int)m.matrix[observer][robot]; |
100 |
#else |
|
101 |
return -1; |
|
102 |
#endif |
|
95 | 103 |
} |
96 | 104 |
|
97 | 105 |
/** |
Also available in: Unified diff