From dee88b4ecb51770d62079a71573abd5f567d5faf Mon Sep 17 00:00:00 2001 From: Bob Long Date: Tue, 17 Dec 2024 12:46:00 +1100 Subject: [PATCH] SITL: default SIM_ENGINE_MUL to 0 This makes SIM_ENGINE_FAIL work a little more intuitively, since it is usually used to simulate a complete failure. Also, drive-by fix of the SIM_ENGINE_MUL documentation. --- Tools/autotest/default_params/vee-gull_005.param | 2 +- libraries/SITL/SITL.cpp | 4 ++-- .../examples/SilentWings/Params/Rolladen-Schneider-LS8b.param | 2 +- .../SITL/examples/SilentWings/Params/Schleicher-ASW27B.param | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Tools/autotest/default_params/vee-gull_005.param b/Tools/autotest/default_params/vee-gull_005.param index ab340c7eaf..9415f055bd 100644 --- a/Tools/autotest/default_params/vee-gull_005.param +++ b/Tools/autotest/default_params/vee-gull_005.param @@ -620,7 +620,7 @@ SIM_BATT_VOLTAGE,12.6 SIM_DRIFT_SPEED,0.05 SIM_DRIFT_TIME,5 SIM_ENGINE_FAIL,0 -SIM_ENGINE_MUL,1 +SIM_ENGINE_MUL,0 SIM_FLOAT_EXCEPT,1 SIM_FLOW_DELAY,0 SIM_FLOW_ENABLE,0 diff --git a/libraries/SITL/SITL.cpp b/libraries/SITL/SITL.cpp index b4541b822d..3adb9cc673 100644 --- a/libraries/SITL/SITL.cpp +++ b/libraries/SITL/SITL.cpp @@ -78,8 +78,8 @@ const AP_Param::GroupInfo SIM::var_info[] = { // @Param: ENGINE_MUL // @DisplayName: Engine failure thrust scaler // @Description: Thrust from Motors in SIM_ENGINE_FAIL will be multiplied by this factor - // @Units: ms - AP_GROUPINFO("ENGINE_MUL", 8, SIM, engine_mul, 1), + // @Range: 0 1 + AP_GROUPINFO("ENGINE_MUL", 8, SIM, engine_mul, 0), // @Param: WIND_SPD // @DisplayName: Simulated Wind speed // @Description: Allows you to emulate wind in sim diff --git a/libraries/SITL/examples/SilentWings/Params/Rolladen-Schneider-LS8b.param b/libraries/SITL/examples/SilentWings/Params/Rolladen-Schneider-LS8b.param index 98d5e0b7a0..ccba94be53 100644 --- a/libraries/SITL/examples/SilentWings/Params/Rolladen-Schneider-LS8b.param +++ b/libraries/SITL/examples/SilentWings/Params/Rolladen-Schneider-LS8b.param @@ -612,7 +612,7 @@ SIM_BATT_VOLTAGE,12.6 SIM_DRIFT_SPEED,0.05 SIM_DRIFT_TIME,5 SIM_ENGINE_FAIL,0 -SIM_ENGINE_MUL,1 +SIM_ENGINE_MUL,0 SIM_FLOAT_EXCEPT,1 SIM_FLOW_DELAY,0 SIM_FLOW_ENABLE,0 diff --git a/libraries/SITL/examples/SilentWings/Params/Schleicher-ASW27B.param b/libraries/SITL/examples/SilentWings/Params/Schleicher-ASW27B.param index 960c2c713c..353379fa5a 100644 --- a/libraries/SITL/examples/SilentWings/Params/Schleicher-ASW27B.param +++ b/libraries/SITL/examples/SilentWings/Params/Schleicher-ASW27B.param @@ -632,7 +632,7 @@ SIM_BATT_VOLTAGE,12.6 SIM_DRIFT_SPEED,0.05 SIM_DRIFT_TIME,5 SIM_ENGINE_FAIL,0 -SIM_ENGINE_MUL,1 +SIM_ENGINE_MUL,0 SIM_FLOAT_EXCEPT,1 SIM_FLOW_DELAY,0 SIM_FLOW_ENABLE,0