Subversion Repositories NaviCtrl

Rev

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

Rev 397 Rev 399
Line 287... Line 287...
287
        static u32 timeout = 0;
287
        static u32 timeout = 0;
288
        static u8 counter = 50,hott_index = 0;
288
        static u8 counter = 50,hott_index = 0;
289
        s16 tmp;
289
        s16 tmp;
290
        s32 i1,i2;
290
        s32 i1,i2;
Line 291... Line -...
291
       
-
 
292
       
291
       
293
    SPIWatchDog = 3500;    // stop communication to FC after this timeout
292
    SPIWatchDog = 3500;    // stop communication to FC after this timeout
294
        if(SPI_RxBuffer_Request)
293
        if(SPI_RxBuffer_Request)
295
        {
294
        {
296
                // avoid sending data via SPI during the update of the  ToFlightCtrl structure
295
                // avoid sending data via SPI during the update of the  ToFlightCtrl structure
Line 303... Line 302...
303
                ToFlightCtrl.MagVecZ = MagVector.Z;
302
                ToFlightCtrl.MagVecZ = MagVector.Z;
304
                ToFlightCtrl.NCStatus = 0;
303
                ToFlightCtrl.NCStatus = 0;
305
                // cycle spi commands
304
                // cycle spi commands
306
                ToFlightCtrl.Command = SPI_CommandSequence[SPI_CommandCounter++];
305
                ToFlightCtrl.Command = SPI_CommandSequence[SPI_CommandCounter++];
307
                // restart command cycle at the end
306
                // restart command cycle at the end
308
                if (SPI_CommandCounter >= sizeof(SPI_CommandSequence)) SPI_CommandCounter = 0;
307
                if(SPI_CommandCounter >= sizeof(SPI_CommandSequence)) SPI_CommandCounter = 0;
-
 
308
 
309
#define FLAG_GPS_AID 0x01
309
#define FLAG_GPS_AID 0x01
310
                switch (ToFlightCtrl.Command)
310
                switch (ToFlightCtrl.Command)
311
                {
311
                {
312
                        case  SPI_NCCMD_KALMAN:  // wird am häufigsten betätigt
312
                        case  SPI_NCCMD_KALMAN:  // wird am häufigsten betätigt
313
                                ToFlightCtrl.Param.sByte[0] = (s8) Kalman_K;
313
                                ToFlightCtrl.Param.sByte[0] = (s8) Kalman_K;