mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-25 16:03:33 +08:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user