diff --git a/AirLib/include/vehicles/multirotor/firmwares/simple_flight/firmware/PidController.hpp b/AirLib/include/vehicles/multirotor/firmwares/simple_flight/firmware/PidController.hpp index 96a9dfd24d..af9d2161c3 100644 --- a/AirLib/include/vehicles/multirotor/firmwares/simple_flight/firmware/PidController.hpp +++ b/AirLib/include/vehicles/multirotor/firmwares/simple_flight/firmware/PidController.hpp @@ -91,7 +91,7 @@ class PidController : public IUpdatable { const T error = goal_ - measured_; float dt = clock_ == nullptr ? 1 : - (static_cast(clock_->millis()) - last_time_) + (clock_->millis() - last_time_) * config_.time_scale; float pterm = error * config_.kp; @@ -135,4 +135,4 @@ class PidController : public IUpdatable { }; -} //namespace \ No newline at end of file +} //namespace