Revision 120
Seems to work until we get to seeking, where there may be issues with the motors.
wl_recharge_group.c | ||
---|---|---|
40 | 40 |
//timer ticks between polls |
41 | 41 |
#define POLL_DELAY 4 |
42 | 42 |
#define REQUEST_DELAY 6 |
43 |
#define VERIFY_DELAY 8
|
|
44 |
#define VERIFY_FREQUENCY 4
|
|
43 |
#define VERIFY_DELAY 32
|
|
44 |
#define VERIFY_FREQUENCY 11
|
|
45 | 45 |
|
46 | 46 |
//frames |
47 | 47 |
#define REQUEST_FRAME 1 |
... | ... | |
90 | 90 |
**/ |
91 | 91 |
void wl_recharge_begin(void) |
92 | 92 |
{ |
93 |
RECHARGE_DEBUG_PRINT("Beginning to recharge.\n"); |
|
93 | 94 |
recharge_state = POLLING; |
94 | 95 |
station = -1; |
95 | 96 |
pollCount = 0; |
... | ... | |
252 | 253 |
case REQUESTING: |
253 | 254 |
if (requestCount <= 0) |
254 | 255 |
{ |
256 |
RECHARGE_DEBUG_PRINT("Station timed out "); |
|
257 |
RECHARGE_DEBUG_PRINT("on request.\n"); |
|
255 | 258 |
//request failed |
256 | 259 |
station = -1; |
257 | 260 |
recharge_state = POLLING; |
... | ... | |
263 | 266 |
case SEEKING: |
264 | 267 |
if (verifyCount <= 0) |
265 | 268 |
{ |
269 |
RECHARGE_DEBUG_PRINT("Station timed out "); |
|
270 |
RECHARGE_DEBUG_PRINT("on seeking verify.\n"); |
|
266 | 271 |
//station is down |
267 | 272 |
station = -1; |
268 | 273 |
recharge_state = POLLING; |
... | ... | |
431 | 436 |
return; |
432 | 437 |
} |
433 | 438 |
|
439 |
RECHARGE_DEBUG_PRINT("Received cancellation from the charging station.\n"); |
|
440 |
|
|
434 | 441 |
verifyCount = VERIFY_DELAY; |
435 | 442 |
switch (recharge_state) |
436 | 443 |
{ |
Also available in: Unified diff