Project

General

Profile

Revision 1245

Changed some function signatures for robot communication

View differences:

trunk/code/projects/diagnostic_station/station/test_rangefinders.c
39 39
	{
40 40
		wall_set_position (wall);
41 41
		
42
		data_wall       [i]=wall_get_position      ();
43
		data_rangefinder[i]=robot_read_rangefinder (num);
42
		data_wall[i]=wall_get_position      ();
43
		robot_read_rangefinder (num, &data_rangefinder[i]);
44 44
		
45 45
		wall+=wall_step;
46 46
	}
trunk/code/projects/diagnostic_station/station/test_bom.c
78 78
			usb_puts(NL);
79 79
			turntable_rotate_to_position (bom_detector_position (n));
80 80

  
81
			uint16_t on_value, off_value;
82

  
81 83
			rbom_set (true);
82
			uint16_t on_value=robot_read_bom (n);
84
			robot_read_bom (n, &on_value);
83 85
			rbom_set (false);
84
			uint16_t off_value=robot_read_bom (n);
86
			robot_read_bom (n, &off_value);
85 87

  
86 88
			// Send data
87 89
			usb_puts ("data bom detector ");
trunk/code/projects/diagnostic_station/station/comm_robot.c
191 191
	}
192 192
}
193 193

  
194
uint16_t robot_read_bom (uint8_t num)
194
bool robot_read_bom (uint8_t num, uint16_t *value)
195 195
{
196
	*value=0;
196 197
	// FIXME implement
197
	return 0;
198
	return true;
198 199
}
199 200

  
200
uint16_t robot_read_rangefinder (uint8_t num)
201
bool robot_read_rangefinder (uint8_t num, uint16_t *value)
201 202
{
203
	*value=0;
202 204
	// FIXME implement
203
	return 0;
205
	return true;
204 206
}
205 207

  
206 208

  
trunk/code/projects/diagnostic_station/station/comm_robot.h
15 15
void robot_reset_encoders (void);
16 16

  
17 17
bool robot_read_encoders (int16_t *left, int16_t *right);
18
uint16_t robot_read_bom (uint8_t num);
19
uint16_t robot_read_rangefinder (uint8_t num);
18
bool robot_read_bom (uint8_t num, uint16_t *value);
19
bool robot_read_rangefinder (uint8_t num, uint16_t *value);
20 20

  
21 21
#define motor_direction_off 0
22 22
#define motor_direction_forward 1

Also available in: Unified diff