Subversion Repositories FlightCtrl

Rev

Rev 838 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 838 Rev 839
Line 75... Line 75...
75
  @post             -
75
  @post             -
76
  @author           Michael Walter
76
  @author           Michael Walter
77
**************************************************************************** */
77
**************************************************************************** */
78
void OsdClear(void)
78
void OsdClear(void)
79
{
79
{
80
 unsigned char i;
80
        unsigned char i;
81
 for(i=0;i<80;i++) OSDBuff[i] = ' ';
81
        for(i=0;i<80;i++) OSDBuff[i] = ' ';
82
}
82
}
Line 83... Line 83...
83
 
83
 
84
/* ****************************************************************************
84
/* ****************************************************************************
85
  Functionname:     LcdClear                      */ /*!
85
  Functionname:     LcdClear                      */ /*!
Line 92... Line 92...
92
  @post             -
92
  @post             -
93
  @author          
93
  @author          
94
**************************************************************************** */
94
**************************************************************************** */
95
void LcdClear(void)
95
void LcdClear(void)
96
{
96
{
97
 unsigned char i;
97
        unsigned char i;
98
 for(i=0;i<80;i++) DisplayBuff[i] = ' ';
98
        for(i=0;i<80;i++) DisplayBuff[i] = ' ';
99
}
99
}
Line 100... Line 100...
100
 
100
 
101
 
101
 
Line 160... Line 160...
160
  @post             -
160
  @post             -
161
  @author           Michael Walter
161
  @author           Michael Walter
162
**************************************************************************** */
162
**************************************************************************** */
163
SIGNAL(SIG_USART1_TRANS)
163
SIGNAL(SIG_USART1_TRANS)
164
{
164
{
165
 static unsigned int ptr = 0;
165
        static unsigned int ptr = 0;
166
 
166
       
167
 unsigned char tmp_tx;
167
        unsigned char tmp_tx;
168
 if(!UART2PrintAbgeschlossen)  
168
        if(!UART2PrintAbgeschlossen)  
169
 {
169
        {
170
   ptr++;   // die [0] wurde schon gesendet
170
                ptr++;   // die [0] wurde schon gesendet
171
   tmp_tx = OSDBuff[ptr];  
171
                tmp_tx = OSDBuff[ptr];  
172
   if((tmp_tx == '\r')  /* tmp_tx == 0 */)
172
                if((tmp_tx == '\r')  /* tmp_tx == 0 */)
173
   {
173
                {
174
     ptr = 0;
174
                        ptr = 0;
175
     UART2PrintAbgeschlossen = 1;
175
                        UART2PrintAbgeschlossen = 1;
176
    }
176
                }
177
    UDR1 = tmp_tx;
177
                UDR1 = tmp_tx;
178
 }
178
        }
179
 else ptr = 0;
179
        else ptr = 0;
180
}
180
}
Line 181... Line 181...
181
 
181
 
182
 
182
 
Line 279... Line 279...
279
                sinPhi_P_cosTheta_P =  sinPhi_P * cosTheta_P;          
279
                sinPhi_P_cosTheta_P =  sinPhi_P * cosTheta_P;          
280
                Theta45 = c_asin_8192((int)(sin45 * (-sinTheta_P + sinPhi_P_cosTheta_P ) * 8192.F));
280
                Theta45 = c_asin_8192((int)(sin45 * (-sinTheta_P + sinPhi_P_cosTheta_P ) * 8192.F));
281
                Phi45 = c_atan2((int)(100.F * sin45 * (-sinTheta_P - sinPhi_P_cosTheta_P) / (cosPhi_P * cosTheta_P)) , 100);
281
                Phi45 = c_atan2((int)(100.F * sin45 * (-sinTheta_P - sinPhi_P_cosTheta_P) / (cosPhi_P * cosTheta_P)) , 100);
282
                dx = c_cos_8192(Phi45) / 128;                  
282
                dx = c_cos_8192(Phi45) / 128;                  
283
                dy = c_sin_8192(Phi45) / 128;
283
                dy = c_sin_8192(Phi45) / 128;
284
        x1 = 180 - dx;
284
                x1 = 180 - dx;
285
                y1 = 120 + 2 * Theta45 + dy;
285
                y1 = 120 + 2 * Theta45 + dy;
286
                x2 = 180 + dx;
286
                x2 = 180 + dx;
287
                y2 = y1 - 2 * dy;
287
                y2 = y1 - 2 * dy;
288
                               
288
               
289
                OSDPtr = 0;  
289
                OSDPtr = 0;  
290
                OSD_printf_("\33[%d;%d.r\33[%d;%d+r\33[0/r",x1_old,y1_old,x2_old,y2_old);
290
                OSD_printf_("\33[%d;%d.r\33[%d;%d+r\33[0/r",x1_old,y1_old,x2_old,y2_old);
291
#endif  
291
#endif  
292
                iState++;
292
                iState++;
293
                break;
293
                break;