VTOL: remove _dt passing as it's no longer used (and was wrong)

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer
2024-05-28 14:54:33 +02:00
parent f8fe7c7aa3
commit 032ae69eee
3 changed files with 5 additions and 18 deletions
@@ -284,10 +284,10 @@ VtolAttitudeControl::Run()
return;
}
const hrt_abstime now = hrt_absolute_time();
#if !defined(ENABLE_LOCKSTEP_SCHEDULER)
const hrt_abstime now = hrt_absolute_time();
// prevent excessive scheduling (> 500 Hz)
if (now - _last_run_timestamp < 2_ms) {
return;
@@ -295,9 +295,6 @@ VtolAttitudeControl::Run()
#endif // !ENABLE_LOCKSTEP_SCHEDULER
const float dt = math::min((now - _last_run_timestamp) / 1e6f, kMaxVTOLAttitudeControlTimeStep);
_last_run_timestamp = now;
if (!_initialized) {
if (_vtol_type->init()) {
@@ -309,8 +306,6 @@ VtolAttitudeControl::Run()
}
}
_vtol_type->setDt(dt);
perf_begin(_loop_perf);
bool updated_fw_in = _vehicle_torque_setpoint_virtual_fw_sub.update(&_vehicle_torque_setpoint_virtual_fw);