diff --git a/libraries/AP_HAL_SITL/SITL_cmdline.cpp b/libraries/AP_HAL_SITL/SITL_cmdline.cpp index a6ae629d21..a6cabb0954 100644 --- a/libraries/AP_HAL_SITL/SITL_cmdline.cpp +++ b/libraries/AP_HAL_SITL/SITL_cmdline.cpp @@ -232,6 +232,9 @@ void SITL_State::_parse_command_line(int argc, char * const argv[]) break; case 's': speedup = strtof(gopt.optarg, nullptr); + char speedup_string[18]; + snprintf(speedup_string, sizeof(speedup_string), "SIM_SPEEDUP=%s", gopt.optarg); + _set_param_default(speedup_string); break; case 'r': _framerate = (unsigned)atoi(gopt.optarg);