tecs: also fix the bug in update_vehicle_state_estimates()

This commit is contained in:
CarlOlsson 2021-02-24 13:20:17 +01:00 committed by Lorenz Meier
parent 0f461f7f60
commit b4b424bf7d

View File

@ -60,7 +60,7 @@ void TECS::update_vehicle_state_estimates(float equivalent_airspeed, const float
{
// calculate the time lapsed since the last update
uint64_t now = hrt_absolute_time();
float dt = constrain((now - _state_update_timestamp) * 1.0e-6f, DT_MIN, DT_MAX);
float dt = fmaxf((now - _state_update_timestamp) * 1e-6f, DT_MIN);
bool reset_altitude = false;