Project

General

Profile

Revision 1605

Added by Ryan Cahoon over 14 years ago

View differences:

wl_token_ring.c
745 745
{
746 746
	SensorReading r;
747 747

  
748
		int i, j, max = -1;
749
		int vals[16];
750

  
748 751
	WL_DEBUG_PRINT("Robot ");
749 752
	WL_DEBUG_PRINT_INT(source);
750 753
	WL_DEBUG_PRINT(" has flashed its bom.\r\n");
......
752 755
	bom_on_count = 0;
753 756

  
754 757
	r = get_max_bom_function();
758

  
759
		/* Record values into an array */
760
		for (i = 0; i < 16; i++) {
761
			vals[i] = bom_get(i);
762
			if (max < vals[i])
763
				max = vals[i];
764
		}
765

  
766
		/* Display results */
767
		for (i = 0; i < 16; i++) {
768
			
769
			usb_puti(vals[i]);
770
			usb_putc('\t');
771

  
772
			for (j = 0; j < (int)((max - vals[i]) / 5); j++) {
773
				usb_putc('#');
774
			}
775

  
776
			usb_putc('\n');
777

  
778
		}
779

  
780

  
781

  
755 782
	sensor_matrix_set_reading(wl_get_xbee_id(),
756 783
		source, r);
757 784

  

Also available in: Unified diff