Revision 661
virtual wall reported to robots
Command.cpp | ||
---|---|---|
242 | 242 |
return -1; |
243 | 243 |
} |
244 | 244 |
|
245 |
int up_x, up_y, low_x, low_y; |
|
246 |
|
|
245 | 247 |
//figure out which command was sent |
246 | 248 |
switch (second_token) { |
247 | 249 |
case REQUEST_BOM_MATRIX: |
... | ... | |
267 | 269 |
break; |
268 | 270 |
|
269 | 271 |
case CLIENT_SET_VIRTUAL_WALL: |
270 |
colonet_server->getVirtualWall()->set_coordinates(atoi(tokens[2]), atoi(tokens[3]), atoi(tokens[4]), atoi(tokens[5])); |
|
272 |
up_x = atoi(tokens[2]); |
|
273 |
up_y = atoi(tokens[3]); |
|
274 |
low_x = atoi(tokens[4]); |
|
275 |
low_y = atoi(tokens[5]); |
|
276 |
|
|
277 |
if (colonet_server->getVirtualWall()->set_coordinates(up_x, up_y, low_x, low_y) == 0) { |
|
278 |
fprintf(stderr, "Wall set to ((%d, %d), (%d, %d)).\n", up_x, up_y, low_x, low_y); |
|
279 |
} else { |
|
280 |
fprintf(stderr, "Set wall failed ((%d, %d), (%d, %d)).\n", up_x, up_y, low_x, low_y); |
|
281 |
} |
|
271 | 282 |
break; |
272 | 283 |
|
273 | 284 |
default: |
Also available in: Unified diff