Subversion Repositories FlightCtrl

Rev

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

Rev 436 Rev 437
Line 461... Line 461...
461
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++                
461
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++                
462
// auf Nullwerte kalibrieren
462
// auf Nullwerte kalibrieren
463
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++                
463
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++                
464
                if(PPM_in[EE_Parameter.Kanalbelegung[K_GIER]] > 75)  // Neutralwerte
464
                if(PPM_in[EE_Parameter.Kanalbelegung[K_GIER]] > 75)  // Neutralwerte
465
                    {
465
                    {
466
                    unsigned char setting = 2;
-
 
467
                    if(++delay_neutral > 200)  // nicht sofort
466
                    if(++delay_neutral > 200)  // nicht sofort
468
                        {
467
                        {
469
                        GRN_OFF;
468
                        GRN_OFF;
470
                        MotorenEin = 0;
469
                        MotorenEin = 0;
471
                        delay_neutral = 0;
470
                        delay_neutral = 0;
Line 831... Line 830...
831
    if(Mess_Integral_Gier <-50000) Mess_Integral_Gier =-50000;
830
    if(Mess_Integral_Gier <-50000) Mess_Integral_Gier =-50000;
Line 832... Line 831...
832
 
831
 
833
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++                
832
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++                
834
//  Kompass
833
//  Kompass
835
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++                
834
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++                
836
    if(KompassValue && (EE_Parameter.GlobalConfig & CFG_KOMPASS_AKTIV))
835
    if(EE_Parameter.GlobalConfig & CFG_KOMPASS_AKTIV)
837
     {
836
     {
838
       int w,v;
837
       int w,v;
839
       static int SignalSchlecht = 0;
838
       static int SignalSchlecht = 0;
840
       w = abs(IntegralNick /512); // mit zunehmender Neigung den Einfluss drosseln
839
       w = abs(IntegralNick /1024); // mit zunehmender Neigung den Einfluss drosseln
841
       v = abs(IntegralRoll /512);
840
       v = abs(IntegralRoll /1024);
842
       if(v > w) w = v; // grösste Neigung ermitteln
841
       if(v > w) w = v; // grösste Neigung ermitteln
843
       if(w < 25 && NeueKompassRichtungMerken && !SignalSchlecht)    
842
       if(w < 35 && NeueKompassRichtungMerken && !SignalSchlecht)    
844
        {
843
        {
845
         KompassStartwert = KompassValue;
844
         KompassStartwert = KompassValue;
846
         NeueKompassRichtungMerken = 0;
845
         NeueKompassRichtungMerken = 0;
847
        }
846
        }