Project

General

Profile

Revision 138

More progress on charging... Sometimes the token ring drops out.

View differences:

wl_token_ring.c
346 346
	int i, j;
347 347
	deathDelay = -1;
348 348

  
349
	WL_DEBUG_PRINT("Received the token, next robot is ");
349
	WL_DEBUG_PRINT("Received the token from robot");
350
	WL_DEBUG_PRINT_INT(source);
351
	WL_DEBUG_PRINT(", next robot is ");
350 352
	WL_DEBUG_PRINT_INT((int)nextRobot);
351 353
	WL_DEBUG_PRINT(" \r\n");
352 354
	sensor_matrix_set_in_ring(sensorMatrix, source, 1);
......
516 518
	WL_DEBUG_PRINT("Robot ");
517 519
	WL_DEBUG_PRINT_INT(source);
518 520
	WL_DEBUG_PRINT(" has flashed its bom.\r\n");
521

  
522
	//make sure we don't declare the robot dead if it's
523
	//flashing its BOM
524
	if (source == wl_token_next_robot)
525
		deathDelay = DEATH_DELAY;
519 526
	sensor_matrix_set_reading(sensorMatrix, wl_get_xbee_id(), 
520 527
		source, get_max_bom_function());
521 528
}

Also available in: Unified diff