Project

General

Profile

Revision 1166

Added # to the beginning of every USB output line, as it should not be interpreted by the server.

View differences:

trunk/code/projects/diagnostic_station/station/station_hardware.c
2 2

  
3 3
void hardware_init ()
4 4
{
5
	usb_puts ("Initializing station hardware" NL);
5
	usb_puts ("# Initializing station hardware" NL);
6 6
	
7 7
	// FIXME implement
8 8
}
9 9

  
10 10
void rotate_to_position (uint16_t position)
11 11
{
12
	usb_puts ("Rotating to position ");
12
	usb_puts ("# Rotating to position ");
13 13
	usb_puti (position);
14 14
	usb_puts (NL);
15 15
	
16 16
	// FIXME implement
17 17
	
18
	usb_puts ("Robot position reached");
18
	usb_puts ("# Robot position reached");
19 19
}
20 20

  
21 21
void set_rbom (bool on)
22 22
{
23 23
	if (on)
24 24
	{
25
		usb_puts ("Turning RBOM light on" NL);
25
		usb_puts ("# Turning RBOM light on" NL);
26 26
		// FIXME implement
27 27
	}
28 28
	else
29 29
	{
30
		usb_puts ("Turning RBOM light off" NL);
30
		usb_puts ("# Turning RBOM light off" NL);
31 31
		// FIXME implement
32 32
	}
33 33
}
34 34

  
35 35
void read_rbom (uint16_t *values)
36 36
{
37
	usb_puts ("Reading RBOM" NL);
37
	usb_puts ("# Reading RBOM" NL);
38 38
	// FIXME implement
39 39
}
40 40

  
41 41
void set_wall_position (uint16_t position)
42 42
{
43
	usb_puts ("Moving wall to position ");
43
	usb_puts ("# Moving wall to position ");
44 44
	usb_puti (position);
45 45
	usb_puts (NL);
46 46
	
47 47
	// FIXME implement
48 48
	
49
	usb_puts ("Wall position reached");
49
	usb_puts ("# Wall position reached");
50 50
}
51 51

  
52 52
void read_encoders (uint16_t *values)
53 53
{
54
	usb_puts ("Reading encoder values");
54
	usb_puts ("# Reading encoder values");
55 55
	// FIXME implement
56 56
}
trunk/code/projects/diagnostic_station/station/test_encoders.c
36 36

  
37 37
void test_encoders (void)
38 38
{
39
	usb_puts("Testing encoders" NL);
39
	usb_puts("# Testing encoders" NL);
40 40

  
41 41
	test_encoders_direction (FORWARD, BACKWARD);
42 42
	test_encoders_direction (BACKWARD, FORWARD);
43 43

  
44 44
	//send data
45 45
	
46
	usb_puts("Testing encoders finished" NL);
46
	usb_puts("# Testing encoders finished" NL);
47 47
}
48 48

  
trunk/code/projects/diagnostic_station/station/test_rangefinders.c
3 3

  
4 4
void test_rangefinders (void)
5 5
{
6
	usb_puts("Testing rangefinders" NL);
6
	usb_puts("# Testing rangefinders" NL);
7 7
	
8 8
	for (int n=0; n<5; ++n)
9 9
	{
10
		usb_puts("Testing rangefinder ");
10
		usb_puts("# Testing rangefinder ");
11 11
		usb_puti(n);
12 12
		usb_puts(NL);
13 13

  
......
24 24

  
25 25
	//send data
26 26
	
27
	usb_puts("Testing rangefinders finished" NL);
27
	usb_puts("# Testing rangefinders finished" NL);
28 28
}
29 29

  
trunk/code/projects/diagnostic_station/station/test_bom.c
3 3

  
4 4
void test_bom (bool test_emitters, bool test_detectors)
5 5
{
6
	usb_puts("Testing BOM" NL);
6
	usb_puts("# Testing BOM" NL);
7 7
	
8 8
	for (uint8_t n=0; n<15; ++n)
9 9
	{
10 10
		if (test_emitters)
11 11
		{
12
			usb_puts("Testing BOM emitter ");
12
			usb_puts("# Testing BOM emitter ");
13 13
			usb_puti(n);
14 14
			usb_puts(NL);
15 15
	//		rotate (emitter position)
......
22 22
		
23 23
		if (test_detectors)
24 24
		{
25
			usb_puts("Testing BOM detector ");
25
			usb_puts("# Testing BOM detector ");
26 26
			usb_puti(n);
27 27
			usb_puts(NL);
28 28
	//		rotate (detector position)
......
40 40
	
41 41
	//send data
42 42

  
43
	usb_puts("Testing BOM finished" NL);
43
	usb_puts("# Testing BOM finished" NL);
44 44
}
trunk/code/projects/diagnostic_station/station/test_motors.c
39 39

  
40 40
void test_motors (void)
41 41
{
42
	usb_puts("Testing motors" NL);
42
	usb_puts("# Testing motors" NL);
43 43

  
44 44
	test_motors_direction (FORWARD, BACKWARD);
45 45
	test_motors_direction (BACKWARD, FORWARD);
......
49 49
	//send data
50 50
	
51 51
	
52
	usb_puts("Testing motors finished" NL);
52
	usb_puts("# Testing motors finished" NL);
53 53
}
trunk/code/projects/diagnostic_station/station/main.c
21 21
		communication_ok=test_comm ();
22 22

  
23 23
	if (!communication_ok)
24
		usb_puts ("Communications required. Stop." NL);
24
		usb_puts ("# Communications required. Stop." NL);
25 25

  
26 26
	return communication_ok;
27 27
}
......
32 32
	// succeeded before (that's what test_all means).
33 33
	if (!test_comm ())
34 34
	{
35
		usb_puts ("Communications require. Stop." NL);
35
		usb_puts ("# Communications required. Stop." NL);
36 36
		return;
37 37
	}
38 38
	
......
50 50
		orbs_set (0,255,0, 0,255,0);
51 51

  
52 52
		usb_puts (NL);
53
		usb_puts ("Diagnostic station interactive mode" NL);
54
		usb_puts ("Test (s)elf, (a)ll, (c)omm, (b)om, (r)angefinders, (m)otors, (e)ncoders" NL);
53
		usb_puts ("# Diagnostic station interactive mode" NL);
54
		usb_puts ("# Test (s)elf, (a)ll, (c)omm, (b)om, (r)angefinders, (m)otors, (e)ncoders" NL);
55 55

  
56 56
		char choice = usb_getc ();
57 57
		switch (choice) {
......
63 63
			case 'e': case 'E': if (require_comm ()) test_encoders ();      break;
64 64
			case 's': case 'S': self_test ();                               break;
65 65
			default: break; // ignore it
66
//				usb_puts("Received invalid input ");
67
//				usb_putc(choice);
68
//				usb_puts(NL);
69 66
		}
70 67
	}
71 68
}
......
88 85
    usb_init ();
89 86

  
90 87
	usb_puts(NL NL NL);
91
	usb_puts("Diagnostic station version " version_string " starting" NL);
88
	usb_puts("# Diagnostic station version " version_string " starting" NL);
92 89

  
93 90
    orb_init_pwm ();
94 91
	hardware_init ();
95 92

  
96
	orb1_set (255, 0, 0); usb_puts("Initializing wireless" NL);
93
	orb1_set (255, 0, 0); usb_puts("# Initializing wireless" NL);
97 94
	xbee_init ();
98 95
	wl_init();
99
	orb2_set (255, 0, 0); usb_puts("Done" NL);
96
	orb2_set (255, 0, 0); usb_puts("# Done" NL);
100 97

  
101 98
	if (button1_read ())
102 99
			test_all ();
trunk/code/projects/diagnostic_station/station/self_test.c
3 3

  
4 4
void self_test ()
5 5
{
6
	usb_puts("Doing self test" NL);
6
	usb_puts("# Doing self test" NL);
7 7
	
8 8
	// FIXME implement
9 9
	// move all movable parts a bit, and flahsh the lights
10 10
	
11
	usb_puts("Self test finished" NL);
11
	usb_puts("# Self test finished" NL);
12 12
}
trunk/code/projects/diagnostic_station/station/test_comm.c
4 4
/** Returns whether we have communication **/
5 5
bool test_comm ()
6 6
{
7
	usb_puts("Testing communications" NL);
7
	usb_puts("# Testing communications" NL);
8 8

  
9 9
	// FIXME implement
10 10

  
11 11
	bool success=true;
12 12

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

  
18 18
	return success;
19 19
}

Also available in: Unified diff