From 6d315552366f9cf9190f14ac70dba10f893ec484 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Mon, 13 Jan 2025 16:16:17 +1100 Subject: [PATCH] AP_HAL_SITL: remove command-line option enabling synthetic clock it's always on, all the time this has always been set for many years --- libraries/AP_HAL_SITL/SITL_State.cpp | 7 ++----- libraries/AP_HAL_SITL/SITL_State.h | 2 -- libraries/AP_HAL_SITL/SITL_cmdline.cpp | 4 +--- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/libraries/AP_HAL_SITL/SITL_State.cpp b/libraries/AP_HAL_SITL/SITL_State.cpp index 06fe08506f..736e7091e8 100644 --- a/libraries/AP_HAL_SITL/SITL_State.cpp +++ b/libraries/AP_HAL_SITL/SITL_State.cpp @@ -106,10 +106,8 @@ void SITL_State::_sitl_setup() _sitl->rcin_port = _rcin_port; } - if (_synthetic_clock_mode) { - // start with non-zero clock - hal.scheduler->stop_clock(1); - } + // start with non-zero clock + hal.scheduler->stop_clock(1); } @@ -284,7 +282,6 @@ void SITL_State::_fdm_input_local(void) set_height_agl(); - _synthetic_clock_mode = true; _update_count++; } diff --git a/libraries/AP_HAL_SITL/SITL_State.h b/libraries/AP_HAL_SITL/SITL_State.h index b5452aceda..4a202493a6 100644 --- a/libraries/AP_HAL_SITL/SITL_State.h +++ b/libraries/AP_HAL_SITL/SITL_State.h @@ -87,8 +87,6 @@ private: uint16_t _fg_view_port; uint16_t _irlock_port; - bool _synthetic_clock_mode; - bool _use_rtscts; bool _use_fg_view; diff --git a/libraries/AP_HAL_SITL/SITL_cmdline.cpp b/libraries/AP_HAL_SITL/SITL_cmdline.cpp index 042bb2ce7f..2d747ac228 100644 --- a/libraries/AP_HAL_SITL/SITL_cmdline.cpp +++ b/libraries/AP_HAL_SITL/SITL_cmdline.cpp @@ -209,7 +209,6 @@ void SITL_State::_parse_command_line(int argc, char * const argv[]) float speedup = 1.0f; float sim_rate_hz = 0; _instance = 0; - _synthetic_clock_mode = false; // default to CMAC const char *home_str = nullptr; const char *model_str = nullptr; @@ -422,7 +421,7 @@ void SITL_State::_parse_command_line(int argc, char * const argv[]) _set_param_default(gopt.optarg); break; case 'S': - _synthetic_clock_mode = true; + printf("Ignoring stale command-line parameter '-S'"); break; case 'O': home_str = gopt.optarg; @@ -586,7 +585,6 @@ void SITL_State::_parse_command_line(int argc, char * const argv[]) sitl_model->set_instance(_instance); sitl_model->set_autotest_dir(autotest_dir); sitl_model->set_config(config); - _synthetic_clock_mode = true; break; } }