Subversion Repositories FlightCtrl

Rev

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

Rev 974 Rev 980
Line 112... Line 112...
112
  IMU_Main();
112
  IMU_Main();
113
  return (1);
113
  return (1);
114
}
114
}
Line 115... Line -...
115
 
-
 
116
 
115
 
117
 
116
 
118
/* ****************************************************************************
117
/* ****************************************************************************
Line 119... Line 118...
119
  Functionname:     IMU_Main                      */ /*!
118
  Functionname:     IMU_Main                      */ /*!
Line 180... Line 179...
180
    /* Send Debug Data over RS232 */
179
    /* Send Debug Data over RS232 */
181
    SendDebugData();
180
    SendDebugData();
182
    /* Check the Batery for Undervoltage */
181
    /* Check the Batery for Undervoltage */
183
    TestBattery();
182
    TestBattery();
184
    /* DeployRescue */
183
    /* DeployRescue */
185
    /* DeployRescue(); */
184
    DeployRescue();
186
  }
185
  }
187
}
186
}
Line 188... Line 187...
188
 
187
 
189
/* ****************************************************************************
188
/* ****************************************************************************
Line 195... Line 194...
195
  @post             -
194
  @post             -
196
  @author           Michael Walter
195
  @author           Michael Walter
197
**************************************************************************** */
196
**************************************************************************** */
198
void DeployRescue()
197
void DeployRescue()
199
{
198
{
200
#if 0
199
  static int InvalidAttitude = 0;
201
  /* Yaw or pitch are greater than  60 Deg abs */
200
  /* Yaw or pitch are greater than 90 Deg abs */
202
  if (((abs(status.iTheta10) > 600) || (abs(status.iPhi10) > 600)) &&
201
  if (((abs(status.iTheta10) > 900) || (abs(status.iPhi10) > 900)) &&
203
            ((abs(AverageRoll) > Threshhold) ||
202
     ((abs(AverageRoll) > 400) ||
204
            (abs(AverageNick) > Threshhold) ||
203
      (abs(AverageNick) > 400) ||
205
            (abs(AverageGier) > Threshhold) ))
204
      (abs(AverageGier) > 400) ))
206
  {
205
  {
207
    MotorenEin = 0;
206
    //MotorenEin = 0;
208
    Delay_ms(1000);
207
    Delay_ms(500);
-
 
208
    InvalidAttitude = 1;
-
 
209
  }
-
 
210
 
-
 
211
  if (InvalidAttitude)
-
 
212
  {
-
 
213
    ServoValue = 150;
-
 
214
  }
-
 
215
  else
-
 
216
  {
209
    ReleaseServo();
217
    ServoValue = 0;
210
  }
218
  }
211
#endif
-
 
212
}
219
}
Line 213... Line 220...
213
 
220
 
214
/* ****************************************************************************
221
/* ****************************************************************************
215
Functionname:     ReadParameterSet                      */ /*!
222
Functionname:     ReadParameterSet                      */ /*!