Make more output honour debug_lvl.
This commit is contained in:
parent
5fa04adf68
commit
5644f22513
6 changed files with 18 additions and 12 deletions
|
@ -140,8 +140,7 @@ FGFDMExec::FGFDMExec(FGPropertyManager* root)
|
|||
|
||||
try {
|
||||
char* num = getenv("JSBSIM_DEBUG");
|
||||
if (!num) debug_lvl = 1;
|
||||
else debug_lvl = atoi(num); // set debug level
|
||||
if (num) debug_lvl = atoi(num); // set debug level
|
||||
} catch (...) { // if error set to 1
|
||||
debug_lvl = 1;
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ FGJSBBase::Message FGJSBBase::localMsg;
|
|||
unsigned int FGJSBBase::messageId = 0;
|
||||
unsigned int FGJSBBase::frame = 0;
|
||||
|
||||
short FGJSBBase::debug_lvl = 0;
|
||||
short FGJSBBase::debug_lvl = 1;
|
||||
|
||||
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
|
|
@ -215,6 +215,8 @@ public:
|
|||
|
||||
void disableHighLighting(void);
|
||||
|
||||
static short debug_lvl;
|
||||
|
||||
protected:
|
||||
static Message localMsg;
|
||||
|
||||
|
@ -222,7 +224,6 @@ protected:
|
|||
|
||||
virtual void Debug(int from) {};
|
||||
|
||||
static short debug_lvl;
|
||||
static unsigned int frame;
|
||||
static unsigned int messageId;
|
||||
|
||||
|
|
|
@ -226,7 +226,6 @@ bool FGPropulsion::Load(FGConfigFile* AC_cfg)
|
|||
if (Eng_cfg.IsOpen()) {
|
||||
Eng_cfg.GetNextConfigLine();
|
||||
engType = Eng_cfg.GetValue();
|
||||
cout << engType << endl;
|
||||
|
||||
FCS->AddThrottle();
|
||||
ThrottleAdded = true;
|
||||
|
|
|
@ -341,9 +341,11 @@ bool FGTrim::DoTrim(void) {
|
|||
} while((axis_count < TrimAxes.size()) && (!trim_failed));
|
||||
if((!trim_failed) && (axis_count >= TrimAxes.size())) {
|
||||
total_its=N;
|
||||
if (debug_lvl > 0)
|
||||
cout << endl << " Trim successful" << endl;
|
||||
} else {
|
||||
total_its=N;
|
||||
if (debug_lvl > 0)
|
||||
cout << endl << " Trim failed" << endl;
|
||||
}
|
||||
for(i=0;i < fdmex->GetGroundReactions()->GetNumGearUnits();i++){
|
||||
|
@ -620,6 +622,7 @@ void FGTrim::SetMode(TrimMode tt) {
|
|||
mode=tt;
|
||||
switch(tt) {
|
||||
case tFull:
|
||||
if (debug_lvl > 0)
|
||||
cout << " Full Trim" << endl;
|
||||
TrimAxes.push_back(new FGTrimAxis(fdmex,fgic,tWdot,tAlpha ));
|
||||
TrimAxes.push_back(new FGTrimAxis(fdmex,fgic,tUdot,tThrottle ));
|
||||
|
@ -630,12 +633,14 @@ void FGTrim::SetMode(TrimMode tt) {
|
|||
TrimAxes.push_back(new FGTrimAxis(fdmex,fgic,tRdot,tRudder ));
|
||||
break;
|
||||
case tLongitudinal:
|
||||
if (debug_lvl > 0)
|
||||
cout << " Longitudinal Trim" << endl;
|
||||
TrimAxes.push_back(new FGTrimAxis(fdmex,fgic,tWdot,tAlpha ));
|
||||
TrimAxes.push_back(new FGTrimAxis(fdmex,fgic,tUdot,tThrottle ));
|
||||
TrimAxes.push_back(new FGTrimAxis(fdmex,fgic,tQdot,tPitchTrim ));
|
||||
break;
|
||||
case tGround:
|
||||
if (debug_lvl > 0)
|
||||
cout << " Ground Trim" << endl;
|
||||
TrimAxes.push_back(new FGTrimAxis(fdmex,fgic,tWdot,tAltAGL ));
|
||||
TrimAxes.push_back(new FGTrimAxis(fdmex,fgic,tQdot,tTheta ));
|
||||
|
|
|
@ -337,8 +337,10 @@ bool FGTrimAxis::initTheta(void) {
|
|||
i++;
|
||||
}
|
||||
//cout << i << endl;
|
||||
if (debug_lvl > 0) {
|
||||
cout << " Initial Theta: " << fdmex->GetRotation()->Gettht()*radtodeg << endl;
|
||||
cout << " Used gear unit " << iAft << " as aft and " << iForward << " as forward" << endl;
|
||||
}
|
||||
control_min=(theta+5)*degtorad;
|
||||
control_max=(theta-5)*degtorad;
|
||||
fgic->SetAltitudeAGLFtIC(saveAlt);
|
||||
|
|
Loading…
Add table
Reference in a new issue