mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-14 02:03:34 +08:00
mavsdk tests: use tester sleep function
the original std::this_thread::sleep_for is with respect to host system time which is different from autopilot time if speed factor != 1, if some component runs slower than real time, or if debugging. tester.sleep_for (which already existed) correctly sleeps w.r.t. px4/simulation time.
This commit is contained in:
@@ -153,7 +153,7 @@ void SensorAirspeedSim::Run()
|
||||
|
||||
if (_airspeed_blocked_timestamp > 0) {
|
||||
airspeed_blockage_scale = math::constrain(1.f - (hrt_absolute_time() - _airspeed_blocked_timestamp) /
|
||||
airspeed_blockage_rampup_time, 1.f - blockage_fraction, 1.f);
|
||||
airspeed_blockage_rampup_time, 1.f - blockage_fraction, 1.f);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -283,7 +283,11 @@ private:
|
||||
}
|
||||
|
||||
|
||||
<<<<<<< HEAD
|
||||
mavsdk::Mavsdk _mavsdk{Mavsdk::Configuration{ComponentType::GroundStation}};
|
||||
=======
|
||||
mavsdk::Mavsdk _mavsdk{};
|
||||
>>>>>>> 5a03cfb986e (mavsdk tests: use tester sleep function)
|
||||
std::unique_ptr<mavsdk::Action> _action{};
|
||||
std::unique_ptr<mavsdk::Failure> _failure{};
|
||||
std::unique_ptr<mavsdk::Info> _info{};
|
||||
|
||||
Reference in New Issue
Block a user