Project

General

Profile

Revision 1153

View differences:

trunk/code/projects/diagnostic_station/station/main.c
24 24

  
25 25
void test_all (void)
26 26
{
27
	// test_all tests comm itself because we want to test comm, even if it
28
	// succeeded before (that's what test_all means).
29
	if (!test_comm ())
30
	{
31
		usb_puts ("Communications require. Stop." NL);
32
		return;
33
	}
34
	
27 35
	test_bom (true, true);
28 36
	test_rangefinders ();
29 37
	test_encoders ();
......
44 52
		char choice = usb_getc ();
45 53
		switch (choice) {
46 54
			case 'c': case 'C': test_comm ();                               break;
47
			case 'a': case 'A': if (require_comm ()) test_all ();           break;
55
			case 'a': case 'A': test_all ();                                break; // test_all will test comm itself
48 56
			case 'b': case 'B': if (require_comm ()) test_bom (true, true); break;
49 57
			case 'r': case 'R': if (require_comm ()) test_rangefinders ();  break;
50 58
			case 'e': case 'E': if (require_comm ()) test_encoders ();      break;
trunk/code/projects/diagnostic_station/station/test_comm.c
11 11
	bool success=true;
12 12

  
13 13
	if (success)
14
		usb_puts("Communication test succeeded" NL);
14
		usb_puts("Testing communication finished (communication succeeded)" NL);
15 15
	else
16
		usb_puts("Communication test failed" NL);
16
		usb_puts("Testing communication finished (communication failed)" NL);
17 17

  
18 18
	return success;
19 19
}

Also available in: Unified diff