Subversion Repositories FlightCtrl

Rev

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

Rev 854 Rev 855
Line 186... Line 186...
186
                                ToNaviCtrl.Param.Byte[3] = (char) tmp;
186
                                ToNaviCtrl.Param.Byte[3] = (char) tmp;
187
                                ToNaviCtrl.Param.Byte[4] = (unsigned char) Poti1;
187
                                ToNaviCtrl.Param.Byte[4] = (unsigned char) Poti1;
188
                                ToNaviCtrl.Param.Byte[5] = (unsigned char) Poti2;
188
                                ToNaviCtrl.Param.Byte[5] = (unsigned char) Poti2;
189
                                ToNaviCtrl.Param.Byte[6] = (unsigned char) Poti3;
189
                                ToNaviCtrl.Param.Byte[6] = (unsigned char) Poti3;
190
                    ToNaviCtrl.Param.Byte[7] = (unsigned char) Poti4;
190
                    ToNaviCtrl.Param.Byte[7] = (unsigned char) Poti4;
-
 
191
                    ToNaviCtrl.Param.Byte[8] = (unsigned char) SenderOkay;
Line 191... Line 192...
191
 
192
 
192
            break;
193
            break;
-
 
194
         case SPI_CMD_CAL_COMPASS:
-
 
195
                if(WinkelOut.CalcState > 5)  
-
 
196
                  {
-
 
197
                    WinkelOut.CalcState = 0;    
-
 
198
                    ToNaviCtrl.Param.Byte[0] = 5;
193
         case SPI_CMD_CAL_COMPASS:
199
                  }  
194
                                ToNaviCtrl.Param.Byte[0] = WinkelOut.CalcState;
200
                                else ToNaviCtrl.Param.Byte[0] = WinkelOut.CalcState;
195
            break;
201
            break;
196
   }
-
 
Line 197... Line 202...
197
 
202
   }
198
 
-
 
199
  sei();
203
 
200
 
-
 
201
 
204
  sei();
202
 
205
     
203
  if (SPI_RxDataValid)
206
  if (SPI_RxDataValid)
204
  {
207
  {
205
   if(abs(FromNaviCtrl.GPS_Nick) < 100 && abs(FromNaviCtrl.GPS_Roll) < 100)
208
   if(abs(FromNaviCtrl.GPS_Nick) < 512 && abs(FromNaviCtrl.GPS_Roll) < 512 && (EE_Parameter.GlobalConfig & CFG_GPS_AKTIV))
206
   {
209
   {
207
    GPS_Nick = FromNaviCtrl.GPS_Nick;
210
    GPS_Nick = FromNaviCtrl.GPS_Nick;
208
    GPS_Roll = FromNaviCtrl.GPS_Roll;
211
    GPS_Roll = FromNaviCtrl.GPS_Roll;
209
   }
212
   }
Line 210... Line 213...
210
    if(FromNaviCtrl.CompassValue <= 360)   KompassValue = FromNaviCtrl.CompassValue;
213
    if(FromNaviCtrl.CompassValue <= 360)   KompassValue = FromNaviCtrl.CompassValue;
Line 211... Line 214...
211
    KompassRichtung = ((540 + KompassValue - KompassStartwert) % 360) - 180;
214
    KompassRichtung = ((540 + KompassValue - KompassStartwert) % 360) - 180;
212
 
215
 
213
    if (FromNaviCtrl.BeepTime > beeptime) beeptime = FromNaviCtrl.BeepTime;
216
    if(FromNaviCtrl.BeepTime > beeptime && !WinkelOut.CalcState) beeptime = FromNaviCtrl.BeepTime;
214
       
217