Revision 538
Non-working update to wireless, sending separate packet for passing the token.
wl_token_logger.c | ||
---|---|---|
77 | 77 |
if (seconds >= endTime) |
78 | 78 |
exit(0); |
79 | 79 |
int temp = (int)(seconds - startTime); |
80 |
printf("%d:%.2d.%.3d: ", temp / 60, temp % 60, millis);
|
|
80 |
printf("%d:%.2d.%.3d:\n", temp / 60, temp % 60, millis);
|
|
81 | 81 |
|
82 | 82 |
switch (type) |
83 | 83 |
{ |
84 | 84 |
case WL_TOKEN_PASS: |
85 |
if (length < 1) |
|
86 |
{ |
|
87 |
WL_DEBUG_PRINT("Malformed Token Pass packet received.\r\n"); |
|
88 |
return; |
|
89 |
} |
|
90 |
printf("Robot %d passed the token to robot %d. Sensor matrix:\n", source, packet[0]); |
|
85 |
printf("We were passed the token from robot %d.\n", source); |
|
86 |
break; |
|
87 |
case WL_TOKEN_SENSOR_MATRIX: |
|
88 |
printf("Robot %d sent sensor matrix:\n", source); |
|
91 | 89 |
int i; |
92 |
for (i = 1; i < length; i+=2)
|
|
90 |
for (i = 0; i < length; i+=2)
|
|
93 | 91 |
printf("(%d %d)", packet[i], packet[i+1]); |
94 | 92 |
printf("\n"); |
95 | 93 |
break; |
Also available in: Unified diff