Revision 645
Wireless commands to request charge and to depart station now work (don't know what was wrong). Demo is
possible...just need charge boards to work.
branches/autonomous_recharging/code/projects/autonomous_recharging/dragonfly/wl_recharge_group.c | ||
---|---|---|
365 | 365 |
break; |
366 | 366 |
//TODO: remove this, only for demo purposes |
367 | 367 |
case 9: |
368 |
if (recharge_state == NOT_RECHARGING) |
|
368 |
if (recharge_state == NOT_RECHARGING) { |
|
369 |
recharge_i2c_set_battery_full(0); |
|
369 | 370 |
wl_recharge_begin(); |
371 |
move(0,0); |
|
372 |
} |
|
370 | 373 |
break; |
371 | 374 |
case 10: |
372 | 375 |
if (recharge_state == DOCKED) |
branches/autonomous_recharging/code/projects/autonomous_recharging/dragonfly/seeking.c | ||
---|---|---|
53 | 53 |
err += 16; |
54 | 54 |
else if (err > 8) |
55 | 55 |
err -= 16; |
56 |
int w = -err * 2;
|
|
56 |
int w = -err * 4; // was *2
|
|
57 | 57 |
int v = SEEKING_BOM_VELOCITY; |
58 | 58 |
|
59 | 59 |
move(v, w); |
branches/autonomous_recharging/code/projects/libwireless/test/test.c | ||
---|---|---|
18 | 18 |
printf("Wireless initialized.\n"); |
19 | 19 |
printf("Packet groups initialized.\n"); |
20 | 20 |
|
21 |
if (c == 'g') |
|
21 |
if (c == 'g') { //command robot to requet charge
|
|
22 | 22 |
wl_send_robot_to_robot_global_packet(3, 9, NULL, 0, robot, 0); |
23 |
if (c == 'd') |
|
23 |
} |
|
24 |
if (c == 'd') { // command robot to depart station |
|
24 | 25 |
wl_send_robot_to_robot_global_packet(3, 10, NULL, 0, robot, 0); |
25 |
|
|
26 |
} |
|
26 | 27 |
wl_terminate(); |
27 | 28 |
|
28 | 29 |
return 0; |
Also available in: Unified diff