From b3f09e5573507d5787ee1205de02a987ccae54ec Mon Sep 17 00:00:00 2001 From: Iampete1 Date: Wed, 20 Jul 2022 10:41:54 +0100 Subject: [PATCH] SITL: params always use set method --- libraries/SITL/SIM_Aircraft.cpp | 6 +++--- libraries/SITL/SIM_Precland.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libraries/SITL/SIM_Aircraft.cpp b/libraries/SITL/SIM_Aircraft.cpp index 58cb0cbb75..a4d64ad719 100644 --- a/libraries/SITL/SIM_Aircraft.cpp +++ b/libraries/SITL/SIM_Aircraft.cpp @@ -447,7 +447,7 @@ void Aircraft::fill_fdm(struct sitl_fdm &fdm) // in the first call here, if a speedup option is specified, overwrite it if (is_equal(last_speedup, -1.0f) && !is_equal(get_speedup(), 1.0f)) { - sitl->speedup = get_speedup(); + sitl->speedup.set(get_speedup()); } if (!is_equal(last_speedup, float(sitl->speedup)) && sitl->speedup > 0) { @@ -1031,7 +1031,7 @@ void Aircraft::add_shove_forces(Vector3f &rot_accel, Vector3f &body_accel) body_accel.z += sitl->shove.z; } else { sitl->shove.start_ms = 0; - sitl->shove.t = 0; + sitl->shove.t.set(0); } } @@ -1120,7 +1120,7 @@ void Aircraft::add_twist_forces(Vector3f &rot_accel) rot_accel.z += sitl->twist.z; } else { sitl->twist.start_ms = 0; - sitl->twist.t = 0; + sitl->twist.t.set(0); } } diff --git a/libraries/SITL/SIM_Precland.cpp b/libraries/SITL/SIM_Precland.cpp index 648228f73c..e2aa49d857 100644 --- a/libraries/SITL/SIM_Precland.cpp +++ b/libraries/SITL/SIM_Precland.cpp @@ -194,8 +194,8 @@ void SIM_Precland::update(const Location &loc, const Vector3d &position) void SIM_Precland::set_default_location(float lat, float lon, int16_t yaw) { if (is_zero(_origin_lat) && is_zero(_origin_lon)) { - _origin_lat = lat; - _origin_lon = lon; - _orient_yaw = yaw; + _origin_lat.set(lat); + _origin_lon.set(lon); + _orient_yaw.set(yaw); } }