WIP on controllers

This commit is contained in:
Lorenz Meier
2013-09-07 12:53:39 +02:00
parent b6dd579e0e
commit 8398de7515
3 changed files with 13 additions and 1 deletions
@@ -51,6 +51,12 @@ ECL_PitchController::ECL_PitchController() :
float ECL_PitchController::control(float pitch_setpoint, float pitch, float pitch_rate, float roll, float scaler,
bool lock_integrator, float airspeed_min, float airspeed_max, float aspeed)
{
/* get the usual dt estimate */
uint64_t dt_micros = ecl_elapsed_time(&_last_run);
_last_run = ecl_absolute_time();
float dt = (dt_micros > 500000) ? 0.0f : dt_micros / 1000000;
return 0.0f;
}