Project

General

Profile

Revision 1273

added add command to read all bom data

View differences:

trunk/code/projects/diagnostic_station/station/comm_robot.c
224 224
	}
225 225
}
226 226

  
227
bool robot_read_bom_all (uint8_t num, uint16_t *value)
228
{
229
	send_request_packet(station_robot_read_bom_all, null, 0);
230
	
231
	// Now the received data is in received_buffer/received_length
232
	if(received_length >= 32)
233
	{
234
		value[0] = WORD(received_buffer[0], received_buffer[1]);
235
		value[1] = WORD(received_buffer[2], received_buffer[3]);
236
		value[2] = WORD(received_buffer[4], received_buffer[5]);
237
		value[3] = WORD(received_buffer[6], received_buffer[7]);
238
		value[4] = WORD(received_buffer[8], received_buffer[9]);
239
		value[5] = WORD(received_buffer[10], received_buffer[11]);
240
		value[6] = WORD(received_buffer[12], received_buffer[13]);
241
		value[7] = WORD(received_buffer[14], received_buffer[15]);
242
		value[8] = WORD(received_buffer[16], received_buffer[17]);
243
		value[9] = WORD(received_buffer[18], received_buffer[19]);
244
		value[10] = WORD(received_buffer[20], received_buffer[21]);
245
		value[11] = WORD(received_buffer[22], received_buffer[23]);
246
		value[12] = WORD(received_buffer[24], received_buffer[25]);
247
		value[13] = WORD(received_buffer[26], received_buffer[27]);
248
		value[14] = WORD(received_buffer[28], received_buffer[29]);
249
		value[15] = WORD(received_buffer[30], received_buffer[31]);
250
		return true;
251
	}
252
	else
253
	{
254
		return false;
255
	}
256
}
227 257

  
258

  
228 259
// ***********************
229 260
// ** Receive callbacks **
230 261
// ***********************

Also available in: Unified diff