Project

General

Profile

Revision 1249

added rangefinder data communication

View differences:

trunk/code/projects/diagnostic_station/station/comm_robot.c
200 200

  
201 201
bool robot_read_rangefinder (uint8_t num, uint16_t *value)
202 202
{
203
	*value=0;
204
	// FIXME implement
203
	send_request_packet(station_robot_read_rangefinders, &num, 1);
204
	
205
	// Now the received data is in received_buffer/received_length
206
	if(received_length >= 2)
207
	{
208
		*value = WORD(received_buffer[0], received_buffer[1]);
209
		return true;
210
	}
211
	else
212
	{
213
		return false;
214
	}
205 215
	return true;
206 216
}
207 217

  

Also available in: Unified diff