1
0
Fork 0

Maintenance: Yasim

unused static const char* warning.
Eliminate the variable since it is the only one defined.
This commit is contained in:
Scott Giese 2021-02-20 11:12:15 -06:00
parent 20c386a2f4
commit dd60a041b1
3 changed files with 5 additions and 5 deletions

View file

@ -900,16 +900,17 @@ void Airplane::solveAirplane(bool verbose)
_solutionIterations = 0; _solutionIterations = 0;
_failureMsg = 0; _failureMsg = 0;
if (_approachElevator == nullptr) { if (_approachElevator == nullptr) {
setElevatorControl(DEF_PROP_ELEVATOR_TRIM); setElevatorControl("/controls/flight/elevator-trim");
} }
if (_tailIncidence == nullptr) { if (_tailIncidence == nullptr) {
// no control mapping from XML parser, so we just create "local" // no control mapping from XML parser, so we just create "local"
// variables for solver instead of full mapping / property // variables for solver instead of full mapping / property
_tailIncidence = new ControlSetting; _tailIncidence = new ControlSetting;
_tailIncidenceCopy = new ControlSetting; _tailIncidenceCopy = new ControlSetting;
} }
if (verbose) { if (verbose) {
fprintf(stdout,"i\tdAoa\tdTail\tcl0\tcp1\n"); fprintf(stdout,"i\tdAoa\tdTail\tcl0\tcp1\n");
} }

View file

@ -38,7 +38,6 @@ namespace yasim {
static const float INCIDENCE_MIN = -20*DEG2RAD; static const float INCIDENCE_MIN = -20*DEG2RAD;
static const float INCIDENCE_MAX = 20*DEG2RAD; static const float INCIDENCE_MAX = 20*DEG2RAD;
static const char* DEF_PROP_ELEVATOR_TRIM = "/controls/flight/elevator-trim";
}; //namespace yasim }; //namespace yasim
#endif // ifndef _YASIM_COMMON_HPP #endif // ifndef _YASIM_COMMON_HPP

View file

@ -211,7 +211,7 @@ void yasim_show_best_speed_at_heights(Airplane* a, Airplane::Configuration cfgID
void findMinSpeed(Airplane* a, float alt) 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); _setup(a, Airplane::CRUISE, alt);
float acc[3]; float acc[3];