Subversion Repositories NaviCtrl

Rev

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

Rev 318 Rev 320
Line 237... Line 237...
237
                ErrorCode = 19;
237
                ErrorCode = 19;
238
        }
238
        }
239
        else if(CheckDelay(UBX_Timeout))
239
        else if(CheckDelay(UBX_Timeout))
240
        {
240
        {
241
                LED_RED_ON;
241
                LED_RED_ON;
-
 
242
        if(!(Parameter.GlobalConfig & FC_CFG_GPS_AKTIV)) sprintf(ErrorMSG,"GPS disconnected ");
-
 
243
                else
-
 
244
                 {
242
                sprintf(ErrorMSG,"no GPS communication ");
245
                  sprintf(ErrorMSG,"no GPS communication ");
-
 
246
                  UART_VersionInfo.HardwareError[0] |= NC_ERROR0_GPS_RX;
243
                ErrorCode = 5;
247
              ErrorCode = 5;
-
 
248
                 }
244
                StopNavigation = 1;
249
                StopNavigation = 1;
245
                UART_VersionInfo.HardwareError[0] |= NC_ERROR0_GPS_RX;
250
//              UBX_Timeout = SetDelay(500);
246
        }
251
        }
247
        else if(Compass_Heading < 0)
252
        else if(Compass_Heading < 0)
248
        {
253
        {
249
                LED_RED_ON;
254
                LED_RED_ON;
250
                sprintf(ErrorMSG,"bad compass value ");
255
                sprintf(ErrorMSG,"bad compass value ");
Line 393... Line 398...
393
                        if(FC.StatusFlags & FC_STATUS_FLY) NaviData.FlyingTime++; // we want to count the battery-time
398
                        if(FC.StatusFlags & FC_STATUS_FLY) NaviData.FlyingTime++; // we want to count the battery-time
394
//                      else NaviData.FlyingTime = 0; // not the time per flight
399
//                      else NaviData.FlyingTime = 0; // not the time per flight
395
                        if(SerialLinkOkay) SerialLinkOkay--;
400
                        if(SerialLinkOkay) SerialLinkOkay--;
396
                        if(SerialLinkOkay < 250 - 5) NCFlags |= NC_FLAG_NOSERIALLINK; // 5 seconds timeout for serial communication
401
                        if(SerialLinkOkay < 250 - 5) NCFlags |= NC_FLAG_NOSERIALLINK; // 5 seconds timeout for serial communication
397
                        else NCFlags &= ~NC_FLAG_NOSERIALLINK;
402
                        else NCFlags &= ~NC_FLAG_NOSERIALLINK;
398
                        if(StopNavigation && (Parameter.NaviGpsModeControl >=  50)) BeepTime = 1000;
403
                        if(StopNavigation && (Parameter.NaviGpsModeControl >=  50) && (Parameter.GlobalConfig & FC_CFG_GPS_AKTIV)) BeepTime = 1000;
399
                }
404
                }
400
                // ---------------- Logging  ---------------------------------------
405
                // ---------------- Logging  ---------------------------------------
401
                Logging_Update();  // could be block some time for at max. 2 seconds, therefore move time critical part of the mainloop into the ISR of timer 1
406
                Logging_Update();  // could be block some time for at max. 2 seconds, therefore move time critical part of the mainloop into the ISR of timer 1
402
        }
407
        }
403
}
408
}