From dd60a041b195003e3452b3bbbcfab78725d4fcd9 Mon Sep 17 00:00:00 2001 From: Scott Giese Date: Sat, 20 Feb 2021 11:12:15 -0600 Subject: [PATCH] Maintenance: Yasim unused static const char* warning. Eliminate the variable since it is the only one defined. --- src/FDM/YASim/Airplane.cpp | 7 ++++--- src/FDM/YASim/yasim-common.hpp | 1 - src/FDM/YASim/yasim-test.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/FDM/YASim/Airplane.cpp b/src/FDM/YASim/Airplane.cpp index 231a4f401..6eec6fe8a 100644 --- a/src/FDM/YASim/Airplane.cpp +++ b/src/FDM/YASim/Airplane.cpp @@ -900,16 +900,17 @@ void Airplane::solveAirplane(bool verbose) _solutionIterations = 0; _failureMsg = 0; - if (_approachElevator == nullptr) { - setElevatorControl(DEF_PROP_ELEVATOR_TRIM); + if (_approachElevator == nullptr) { + setElevatorControl("/controls/flight/elevator-trim"); } - + if (_tailIncidence == nullptr) { // no control mapping from XML parser, so we just create "local" // variables for solver instead of full mapping / property _tailIncidence = new ControlSetting; _tailIncidenceCopy = new ControlSetting; } + if (verbose) { fprintf(stdout,"i\tdAoa\tdTail\tcl0\tcp1\n"); } diff --git a/src/FDM/YASim/yasim-common.hpp b/src/FDM/YASim/yasim-common.hpp index 7a5925365..c591d19ba 100644 --- a/src/FDM/YASim/yasim-common.hpp +++ b/src/FDM/YASim/yasim-common.hpp @@ -38,7 +38,6 @@ namespace yasim { static const float INCIDENCE_MIN = -20*DEG2RAD; static const float INCIDENCE_MAX = 20*DEG2RAD; - static const char* DEF_PROP_ELEVATOR_TRIM = "/controls/flight/elevator-trim"; }; //namespace yasim #endif // ifndef _YASIM_COMMON_HPP diff --git a/src/FDM/YASim/yasim-test.cpp b/src/FDM/YASim/yasim-test.cpp index 3e05f0102..f402698be 100644 --- a/src/FDM/YASim/yasim-test.cpp +++ b/src/FDM/YASim/yasim-test.cpp @@ -211,7 +211,7 @@ void yasim_show_best_speed_at_heights(Airplane* a, Airplane::Configuration cfgID void findMinSpeed(Airplane* a, float alt) { - a->addControlSetting(Airplane::CRUISE, DEF_PROP_ELEVATOR_TRIM, 0.7f); + a->addControlSetting(Airplane::CRUISE, "/controls/flight/elevator-trim", 0.7f); _setup(a, Airplane::CRUISE, alt); float acc[3];