Revision 336
Updated wireless to use a circular buffer instead of a queue using malloc. Tested on both the computer and robots with a token ring, and was successful.
sensor_matrix.h | ||
---|---|---|
56 | 56 |
/** |
57 | 57 |
* The size of the sensor matrix. |
58 | 58 |
**/ |
59 |
unsigned int size;
|
|
59 |
int size; |
|
60 | 60 |
/** |
61 | 61 |
* The matrix. Each row represents the readings of one |
62 | 62 |
* robot. |
... | ... | |
78 | 78 |
/**@brief Destroy a sensor matrix **/ |
79 | 79 |
void sensor_matrix_destroy(SensorMatrix* m); |
80 | 80 |
/**@brief Add a robot to a sensor matrix **/ |
81 |
void sensor_matrix_add_robot(SensorMatrix* m, unsigned int id);
|
|
81 |
void sensor_matrix_add_robot(SensorMatrix* m, int id); |
|
82 | 82 |
/**@brief Remove a robot from a sensor matrix **/ |
83 |
void sensor_matrix_remove_robot(SensorMatrix* m, unsigned int id);
|
|
83 |
void sensor_matrix_remove_robot(SensorMatrix* m, int id); |
|
84 | 84 |
/**@brief Set a reading in a sensor matrix **/ |
85 | 85 |
void sensor_matrix_set_reading(SensorMatrix* m, int observer, int robot, int reading); |
86 | 86 |
/**@brief Get a reading in a sensor matrix **/ |
Also available in: Unified diff