Subversion Repositories FlightCtrl

Rev

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

Rev 190 Rev 209
Line 765... Line 765...
765
           }
765
           }
766
           else magkompass_ok = 0;
766
           else magkompass_ok = 0;
767
        }
767
        }
768
// Salvo End *************************
768
// Salvo End *************************
Line 769... Line 769...
769
 
769
 
770
// Salvo 15.9.2007 GPS Hold Aktiveren mit dem Hoehenschalter aber nur wenn Knueppel in Ruhelage sind
-
 
771
 //if  ((Parameter_MaxHoehe > 200) && ( (abs(StickRoll)) < GPS_STICK_HOLDOFF) && ( (abs(StickNick)) < GPS_STICK_HOLDOFF))
770
// Salvo 2.10.2007 GPS Hold Aktiveren wenn Knueppel in Ruhelage sind
772
 if ((EE_Parameter.GlobalConfig & CFG_GPS_AKTIV) && ((abs(StickRoll)) < GPS_STICK_HOLDOFF)
771
 if ((EE_Parameter.GlobalConfig & CFG_GPS_AKTIV) && ((abs(StickRoll)) < GPS_STICK_HOLDOFF)
773
        && ( (abs(StickNick)) < GPS_STICK_HOLDOFF) && (gps_alive_cnt > 0))
772
        && ( (abs(StickNick)) < GPS_STICK_HOLDOFF) && (gps_alive_cnt > 0))
774
 {
773
 {
775
        short int n;
774
        short int n;
Line 818... Line 817...
818
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++                
817
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++                
819
DebugOut.Sekunden++;
818
DebugOut.Sekunden++;
820
  if(!TimerWerteausgabe--)
819
  if(!TimerWerteausgabe--)
821
   {
820
   {
822
    TimerWerteausgabe = 49;
821
    TimerWerteausgabe = 49;
823
//    DebugOut.Analog[0] = MesswertNick;
822
    DebugOut.Analog[0] = MesswertNick;
824
//    DebugOut.Analog[1] = MesswertRoll;
823
    DebugOut.Analog[1] = MesswertRoll;
825
//    DebugOut.Analog[2] = MesswertGier;
824
//   DebugOut.Analog[2] = MesswertGier;
826
//    DebugOut.Analog[0] = IntegralNick / EE_Parameter.GyroAccFaktor;
825
//    DebugOut.Analog[0] = IntegralNick / EE_Parameter.GyroAccFaktor;
827
//    DebugOut.Analog[1] = IntegralRoll / EE_Parameter.GyroAccFaktor;
826
//    DebugOut.Analog[1] = IntegralRoll / EE_Parameter.GyroAccFaktor;
828
//    DebugOut.Analog[2] = Mittelwert_AccNick;
827
    DebugOut.Analog[2] = Mittelwert_AccNick;
829
//    DebugOut.Analog[3] = Mittelwert_AccRoll;
828
    DebugOut.Analog[3] = Mittelwert_AccRoll;
830
    DebugOut.Analog[4] = MesswertGier;
829
    DebugOut.Analog[4] = MesswertGier;
831
    DebugOut.Analog[5] = HoehenWert;
830
    DebugOut.Analog[5] = HoehenWert;
832
    DebugOut.Analog[6] = (Mess_Integral_Hoch / 512);
831
    DebugOut.Analog[6] = (Mess_Integral_Hoch / 512);
833
/*
832
 
834
    DebugOut.Analog[7] = GasMischanteil;
833
    DebugOut.Analog[7] = GasMischanteil;
835
    DebugOut.Analog[8] = KompassValue;
834
    DebugOut.Analog[8] = KompassValue;
836
*/
835
 
837
    DebugOut.Analog[0] = GPS_hdng_rel_2trgt;
836
/*    DebugOut.Analog[0] = GPS_hdng_rel_2trgt;
838
    DebugOut.Analog[1] = GPS_dist_2trgt;
837
    DebugOut.Analog[1] = GPS_dist_2trgt;
839
    DebugOut.Analog[2] = GPS_Nick;
838
    DebugOut.Analog[2] = GPS_Nick;
840
    DebugOut.Analog[3] = GPS_Roll;
839
    DebugOut.Analog[3] = GPS_Roll;
841
        DebugOut.Analog[7] = GyroKomp_Int/GYROKOMP_INC_GRAD_DEFAULT;
840
        DebugOut.Analog[7] = GyroKomp_Int/GYROKOMP_INC_GRAD_DEFAULT;
842
    DebugOut.Analog[8] = KompassValue;
841
    DebugOut.Analog[8] = KompassValue;
-
 
842
*/
843
/*
843
/*
844
        DebugOut.Analog[7] =  gps_rel_act_position.utm_east;
844
        DebugOut.Analog[7] =  gps_rel_act_position.utm_east;
845
        DebugOut.Analog[8] =  gps_rel_act_position.utm_north;
845
        DebugOut.Analog[8] =  gps_rel_act_position.utm_north;
846
*/
846
*/
847
        DebugOut.Analog[9] =  gps_reg_x;
847
        DebugOut.Analog[9] =  gps_reg_x;
848
        DebugOut.Analog[10] = gps_reg_y;
848
        DebugOut.Analog[10] = gps_reg_y;
849
//      DebugOut.Analog[11]     = gps_alive_cnt;
-
 
850
        DebugOut.Analog[11] = GPS_hdng_abs_2trgt;
849
        DebugOut.Analog[11] = GPS_hdng_abs_2trgt;
Line 851... Line 850...
851
 
850
 
852
 
851
 
Line 904... Line 903...
904
 if((EE_Parameter.GlobalConfig & CFG_HOEHENREGELUNG))  // Höhenregelung
903
 if((EE_Parameter.GlobalConfig & CFG_HOEHENREGELUNG))  // Höhenregelung
905
  {
904
  {
906
    int tmp_int;
905
    int tmp_int;
907
    if(EE_Parameter.GlobalConfig & CFG_HOEHEN_SCHALTER)  // Regler wird über Schalter gesteuert
906
    if(EE_Parameter.GlobalConfig & CFG_HOEHEN_SCHALTER)  // Regler wird über Schalter gesteuert
908
    {
907
    {
909
// Salvo 15.9.2007 Grenzwert fuer Hoehenschalter kleiner, damit 
-
 
910
// mit dem Schalter die Zusatende AUS- Hoehenregler AN -- Hoehenreger und GPS an
-
 
911
//durchlaufen werden koennen
-
 
912
     if(Parameter_MaxHoehe < 50)
908
     if(Parameter_MaxHoehe < 50)
913
// Salvo End
-
 
914
      {
909
      {
915
       SollHoehe = HoehenWert - 20;  // Parameter_MaxHoehe ist der PPM-Wert des Schalters
910
       SollHoehe = HoehenWert - 20;  // Parameter_MaxHoehe ist der PPM-Wert des Schalters
916
       HoehenReglerAktiv = 0;
911
       HoehenReglerAktiv = 0;
917
      }
912
      }
918
      else  
913
      else