Subversion Repositories NaviCtrl

Rev

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

Rev 456 Rev 457
Line 100... Line 100...
100
volatile u32 PollingTimeout = 10000;
100
volatile u32 PollingTimeout = 10000;
101
Param_t Parameter;
101
Param_t Parameter;
102
volatile FC_t FC;
102
volatile FC_t FC;
103
volatile u32 SPIWatchDog = 15000; // stop Navigation if this goes to zero
103
volatile u32 SPIWatchDog = 15000; // stop Navigation if this goes to zero
104
volatile u32 SD_WatchDog = 15000; // stop Logging if this goes to zero
104
volatile u32 SD_WatchDog = 15000; // stop Logging if this goes to zero
105
u32 CountGpsProcessedFromStart = 0,CountNewGpsDataFromStart = 0, FreqGpsProcessedFromStart = 0, FreqNewGpsDataFromStart = 0;
105
u32 CountGpsProcessedIn5Sec = 0,CountNewGpsDataIn5Sec = 0, FreqGpsProcessedIn5Sec = 0, FreqNewGpsDataIn5Sec = 0;
Line 106... Line 106...
106
 
106
 
Line 107... Line 107...
107
s8 ErrorMSG[25];
107
s8 ErrorMSG[25];
108
 
108
 
Line 423... Line 423...
423
                         {
423
                         {
424
                          TimerCheckError = SetDelay(1000);
424
                          TimerCheckError = SetDelay(1000);
425
                          if(++count5sec == 5)
425
                          if(++count5sec == 5)
426
                           {
426
                           {
427
                                count5sec = 0;
427
                                count5sec = 0;
428
                                FreqGpsProcessedFromStart = CountGpsProcessedFromStart * 2;
428
                                FreqGpsProcessedIn5Sec = CountGpsProcessedIn5Sec * 2;
429
                                FreqNewGpsDataFromStart = CountNewGpsDataFromStart * 2;
429
                                FreqNewGpsDataIn5Sec = CountNewGpsDataIn5Sec * 2;
430
                                CountGpsProcessedFromStart = 0;
430
                                CountGpsProcessedIn5Sec = 0;
431
                                CountNewGpsDataFromStart = 0;  
431
                                CountNewGpsDataIn5Sec = 0;  
432
                           }
432
                           }
433
                         }
433
                         }
434
                        oldFcFlags = FC.StatusFlags;
434
                        oldFcFlags = FC.StatusFlags;
435
                        if(CheckDelay(SPI0_Timeout) && (DebugUART == UART1)) GPS_Navigation(&GPSData, &(ToFlightCtrl.GPSStick)); // process the GPS data even if the FC is not connected
435
                        if(CheckDelay(SPI0_Timeout) && (DebugUART == UART1)) GPS_Navigation(&GPSData, &(ToFlightCtrl.GPSStick)); // process the GPS data even if the FC is not connected