Exemple #1
0
void sio_newMsg( unsigned char inchar )
{
	if ( inchar == 'V' )
	{
		sio_parse = &sio_voltage_high ;
	}
	
#if ( FLIGHT_PLAN_TYPE == FP_LOGO )
	else if ( inchar == 'L' )
#else
	else if ( inchar == 'W' )
#endif
	{
		fp_high_byte = -1 ; // -1 means we don't have the high byte yet (0-15 means we do)
		fp_checksum = 0 ;
		sio_parse = &sio_fp_data ;
		flightplan_live_begin() ;
	}
#if (CAM_USE_EXTERNAL_TARGET_DATA == 1)
	else if ( inchar == 'T' )
	{
		fp_high_byte = -1 ; // -1 means we don't have the high byte yet (0-15 means we do)
		fp_checksum = 0 ;
		sio_parse = &sio_cam_data ;
		camera_live_begin() ;
	}
#endif
	else
	{
		// error ?
	}
	return ;
}
Exemple #2
0
void sio_newMsg(uint8_t inchar)
{
	switch (inchar)
	{
	case 'V':
		sio_parse = &sio_voltage_high;
		break;
	
#if (FLIGHT_PLAN_TYPE == FP_LOGO)
	case 'L':
#else
	case 'W':
#endif
		fp_high_byte = -1; // -1 means we don't have the high byte yet (0-15 means we do)
		fp_checksum = 0;
		sio_parse = &sio_fp_data;
		flightplan_live_begin();
		break;

#if (CAM_USE_EXTERNAL_TARGET_DATA == 1)
	case 'T':
		fp_high_byte = -1; // -1 means we don't have the high byte yet (0-15 means we do)
		fp_checksum = 0;
		sio_parse = &sio_cam_data;
		camera_live_begin();
		break;
#endif

#if (FLY_BY_DATALINK_ENABLED == 1)
	case 'F':
		fp_checksum = 'F';
		sio_parse = &sio_fbdl_data;
		fbdl_live_begin();
		break;
#endif

	default:
		// error ?
		break;
	} // switch
}