Ejemplo n.º 1
0
//----------------------------------------
static  void Task_Led3(void* p_arg)//负责显示
{
	INT8U err; 
	//INT16U *s; 
	int ADC_tmp=0;
   	//unsigned int tmp=0;

	//s=OSMboxPend(SeMbox,0,&err);

	(void) p_arg;	    
	while (1)
	{
		//ADC_tmp= (int)(fb[0] * 10);
		ADC_tmp= (int)(EulerAngle_Current.Repx * 10000);
		LED_P8x16Str(0 + 32 ,0 , ".", 1);
		LED_PrintChar(0 + 0 ,0,ADC_tmp/10);
		LED_P8x16Char(0 + 40,0,(unsigned int)(abs(ADC_tmp)%10)+48); 
		//ADC_tmp= (int)(fb[1] * 10);
		ADC_tmp= (int)(EulerAngle_Current.Repy * 10000);
		LED_PrintChar(0  + 64,0,ADC_tmp/10);
		LED_P8x16Char(64 + 40,0,(unsigned int)(abs(ADC_tmp)%10)+48); 
		LED_P8x16Str(64 + 32 ,0 , ".", 1);
		ADC_tmp= (int)(EulerAngle_Current.Repz * 10000);
		//ADC_tmp= (int)(fb[2] * 10);
		LED_P8x16Str(0 + 32 ,1 , ".", 1);
		LED_PrintChar(0  + 0,1,ADC_tmp/10);
		LED_P8x16Char(0 + 40,1,(unsigned int)(abs(ADC_tmp)%10)+48);   	
		ADC_tmp=(int)(EulerAngle_Current.YAW * 10);//hmc5883l.m_a;//EulerAngle_Current
		LED_P8x16Str(0 + 32 ,2 , ".", 1);
		LED_PrintChar(0 + 0,2,ADC_tmp/10);
		LED_P8x16Char(0 + 40,2,(unsigned int)(abs(ADC_tmp)%10)+48); 
		ADC_tmp=(int)(EulerAngle_Current.PITCH * 10);//hmc5883l.m_a;//EulerAngle_Current
		LED_PrintChar(0  + 64,2,ADC_tmp/10);
		LED_P8x16Char(64 + 40,2,(unsigned int)(abs(ADC_tmp)%10)+48); 
		LED_P8x16Str(64 + 32 ,2 , ".", 1);
		ADC_tmp=(int)(EulerAngle_Current.ROLL*10);//hmc5883l.m_a;//EulerAngle_Current
		LED_P8x16Str(0 + 32 ,3 , ".", 1);
		LED_PrintChar(0  + 0,3,ADC_tmp/10);
		LED_P8x16Char(0 + 40,3,(unsigned int)(abs(ADC_tmp)%10)+48);   
					
	}
}
Ejemplo n.º 2
0
 void loop()
 {
    LED_P8x16Str(19,0,"Bem vindo a");
    LED_P8x16Str(40,3,"uProc");
 }