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:
Balduin
2025-11-24 09:12:13 -08:00
committed by Ramon Roche
parent 64dc071c34
commit 790b60f027
2 changed files with 5 additions and 1 deletions
@@ -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);
}
+4
View File
@@ -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{};