Subversion Repositories FlightCtrl

Rev

Rev 2168 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2168 Rev 2174
Line 66... Line 66...
66
unsigned char jetistepstep[] = {1,5,10,25,50}, jetistep = 0;
66
unsigned char jetistepstep[] = {1,5,10,25,50}, jetistep = 0;
Line 67... Line 67...
67
 
67
 
Line 68... Line 68...
68
 
68
 
69
unsigned short CurrentOffset = 0;///
69
unsigned short CurrentOffset = 0;///
70
 
70
 
71
unsigned char Motors[8];
71
unsigned char Motors[12]; //MartinR: Fehlersuche (war 8)
Line 72... Line 72...
72
unsigned char Motorsmax[8];
72
unsigned char Motorsmax[12]; //MartinR: Fehlersuche (war 8)
73
unsigned short MotorsTmax;
73
unsigned short MotorsTmax;
Line 257... Line 257...
257
#endif
257
#endif
Line 258... Line 258...
258
 
258
 
259
        DebugOut.Analog[24] = SollHoehe/5;     
259
        DebugOut.Analog[24] = SollHoehe/5;     
260
//    DebugOut.Analog[22] = FromNaviCtrl_Value.GpsZ;
260
//    DebugOut.Analog[22] = FromNaviCtrl_Value.GpsZ;
-
 
261
//    DebugOut.Analog[29] = FromNaviCtrl_Value.SerialDataOkay;
-
 
262
    DebugOut.Analog[25] = FC_StatusFlags;// MartinR: Test
-
 
263
        DebugOut.Analog[26] = FC_StatusFlags2;// MartinR: Test
261
//    DebugOut.Analog[29] = FromNaviCtrl_Value.SerialDataOkay;
264
       
262
    DebugOut.Analog[27] = KompassSollWert;
265
    DebugOut.Analog[27] = KompassSollWert;
263
        DebugOut.Analog[29] = Capacity.MinOfMaxPWM;
266
        DebugOut.Analog[29] = Capacity.MinOfMaxPWM;
264
    DebugOut.Analog[30] = GPS_Nick;
267
    DebugOut.Analog[30] = GPS_Nick;
265
    DebugOut.Analog[31] = GPS_Roll;
268
    DebugOut.Analog[31] = GPS_Roll;
Line 1067... Line 1070...
1067
    StickNick -= GPS_Nick;
1070
    StickNick -= GPS_Nick;
1068
    StickRoll -= GPS_Roll;
1071
    StickRoll -= GPS_Roll;
1069
        StickGas  = PPM_in[EE_Parameter.Kanalbelegung[K_GAS]] + 127;
1072
        StickGas  = PPM_in[EE_Parameter.Kanalbelegung[K_GAS]] + 127;
Line 1070... Line 1073...
1070
 
1073
 
1071
    GyroFaktor     = (Parameter_Gyro_P + 10.0);
1074
    GyroFaktor     = (Parameter_Gyro_P + 10.0);
1072
        // IntegralFaktor = Parameter_Gyro_I; // MartinR: verschoben um Code zu sparen
1075
        // IntegralFaktor = Parameter_Gyro_I; // MartinR: war mal hier
1073
    GyroFaktorGier     = (Parameter_Gyro_Gier_P + 10.0);
1076
    GyroFaktorGier     = (Parameter_Gyro_Gier_P + 10.0);
Line 1074... Line 1077...
1074
    IntegralFaktorGier = Parameter_Gyro_Gier_I;
1077
    IntegralFaktorGier = Parameter_Gyro_Gier_I;
1075
 
1078
 
Line 1110... Line 1113...
1110
#endif
1113
#endif
Line 1111... Line 1114...
1111
 
1114
 
1112
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1115
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1113
// Looping?
1116
// Looping?
-
 
1117
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
 
1118
#ifdef WITH_ACC_Loop            // MartinR: deaktivieren um Code zu sparen
1114
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1119
 
1115
  if((PPM_in[EE_Parameter.Kanalbelegung[K_ROLL]] > EE_Parameter.LoopThreshold) && EE_Parameter.BitConfig & CFG_LOOP_LINKS)  Looping_Links = 1;
1120
  if((PPM_in[EE_Parameter.Kanalbelegung[K_ROLL]] > EE_Parameter.LoopThreshold) && EE_Parameter.BitConfig & CFG_LOOP_LINKS)  Looping_Links = 1;
1116
  else
1121
  else
1117
   {
1122
   {
1118
     {
1123
     {
Line 1145... Line 1150...
1145
     }
1150
     }
1146
   }
1151
   }
Line 1147... Line 1152...
1147
 
1152
 
1148
   if(Looping_Links || Looping_Rechts)   Looping_Roll = 1; else Looping_Roll = 0;
1153
   if(Looping_Links || Looping_Rechts)   Looping_Roll = 1; else Looping_Roll = 0;
-
 
1154
   if(Looping_Oben  || Looping_Unten) {  Looping_Nick = 1; Looping_Roll = 0; Looping_Links = 0; Looping_Rechts = 0;} else Looping_Nick = 0;
1149
   if(Looping_Oben  || Looping_Unten) {  Looping_Nick = 1; Looping_Roll = 0; Looping_Links = 0; Looping_Rechts = 0;} else Looping_Nick = 0;
1155
   #endif
1150
  } // Ende neue Funken-Werte
-
 
-
 
1156
  } // Ende neue Funken-Werte
1151
 
1157
#ifdef WITH_ACC_Loop            // MartinR: deaktiviert um Code zu sparen
1152
  if(Looping_Roll || Looping_Nick)
1158
  if(Looping_Roll || Looping_Nick)
1153
   {
1159
   {
1154
    if(GasMischanteil > EE_Parameter.LoopGasLimit) GasMischanteil = EE_Parameter.LoopGasLimit;
1160
    if(GasMischanteil > EE_Parameter.LoopGasLimit) GasMischanteil = EE_Parameter.LoopGasLimit;
1155
        TrichterFlug = 1;
1161
        TrichterFlug = 1;
-
 
1162
   }
-
 
1163
   #else
1156
   }
1164
#warning : "### without ACC-Loop ###"   
Line 1157... Line 1165...
1157
 
1165
#endif
1158
 
1166
 
1159
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1167
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1160
// Bei Empfangsausfall im Flug
1168
// Bei Empfangsausfall im Flug
Line 1228... Line 1236...
1228
    LageKorrekturNick = 0;
1236
    LageKorrekturNick = 0;
1229
    LageKorrekturRoll = 0;
1237
    LageKorrekturRoll = 0;
1230
  }
1238
  }
Line 1231... Line 1239...
1231
 
1239
 
1232
        if((EE_Parameter.GlobalConfig & CFG_HEADING_HOLD) || (Parameter_UserParam1 > 49)) IntegralFaktor = 0; // MartinR geändert und verschoben
1240
        if((EE_Parameter.GlobalConfig & CFG_HEADING_HOLD) || (Parameter_UserParam1 > 49)) IntegralFaktor = 0; // MartinR geändert und verschoben
Line 1233... Line 1241...
1233
          else IntegralFaktor = Parameter_Gyro_I; // MartinR: verschoben um Code zu sparen
1241
          else IntegralFaktor = Parameter_Gyro_I; // MartinR: geändert
1234
 
1242
 
1235
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1243
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1236
  if(!Looping_Nick && !Looping_Roll && (Aktuell_az > 512 || MotorenEin))
1244
  if(!Looping_Nick && !Looping_Roll && (Aktuell_az > 512 || MotorenEin))