Revision 681
added possibility of global client write
colonet_dragonfly.c | ||
---|---|---|
117 | 117 |
*y = robot_y; |
118 | 118 |
} |
119 | 119 |
|
120 |
static void report_arrived() { |
|
121 |
//usb_puts("requesting_abs_position\n"); |
|
122 |
ColonetRobotServerPacket pkt; |
|
123 |
pkt.client_id = -1; //global |
|
124 |
pkt.msg_code = ROBOT_REPORT_ARRIVED_AT_POSITION; |
|
125 |
wl_send_global_packet(colonet_pgh.groupCode, 0, (char*)&pkt, sizeof(ColonetRobotServerPacket), 0); |
|
126 |
} |
|
127 |
|
|
120 | 128 |
void request_abs_position() { |
121 | 129 |
//usb_puts("requesting_abs_position\n"); |
122 | 130 |
ColonetRobotServerPacket pkt; |
123 |
pkt.client_id = -1; |
|
131 |
pkt.client_id = -1; //global
|
|
124 | 132 |
pkt.msg_code = ROBOT_REQUEST_POSITION_FROM_SERVER; |
125 | 133 |
wl_send_global_packet(colonet_pgh.groupCode, 0, (char*)&pkt, sizeof(ColonetRobotServerPacket), 0); |
126 | 134 |
} |
... | ... | |
238 | 246 |
// Reached destination. |
239 | 247 |
motors_off(); |
240 | 248 |
robot_state = NO_COMMAND; |
249 |
|
|
250 |
// Notify server that robot arrived. |
|
251 |
report_arrived(); |
|
241 | 252 |
} else { |
242 | 253 |
// e is the error vector (where we want to go) |
243 | 254 |
//char buf[80]; |
Also available in: Unified diff