Revision 1220
comm_robot.c | ||
---|---|---|
83 | 83 |
// When the reply is received, the receive handler will set received_data to the buffer containing the data. Wait |
84 | 84 |
// until this happens, periodically calling the wl_do function to handle incoming messages. |
85 | 85 |
|
86 |
// FIXME pretend that we received the data right away |
|
87 |
// received_data=true; |
|
88 |
// received_length=0; |
|
89 |
|
|
90 | 86 |
while(!received_data) |
91 | 87 |
{ |
92 | 88 |
wl_do(); |
... | ... | |
203 | 199 |
static void robot_station_receive (char type, int source, unsigned char* packet, int length) |
204 | 200 |
{ |
205 | 201 |
// Dump the raw packet |
206 |
//usb_putc ('[');
|
|
202 |
//usb_puts ("# [");
|
|
207 | 203 |
//for (uint8_t i=0; i<length; ++i) |
208 | 204 |
//{ |
209 | 205 |
// if (i!=0) usb_putc (' '); |
... | ... | |
212 | 208 |
//usb_putc (']'); |
213 | 209 |
|
214 | 210 |
// We received some data from the robot. It is not handled immediately as some function is waiting for it. |
215 |
// TODO introduce a separate packet group for done/data/commands (commands are things to be handled immediately). |
|
216 | 211 |
|
217 | 212 |
// Note the fact that we received some data |
218 | 213 |
received_data=true; |
Also available in: Unified diff