{
bool result;
+ // Set up the debugging level
+ // FIXME: this will not respond to
+ // runtime changes
+
+ // if flight is excluded, don't bother
+ if ((logbuf::get_log_classes() & SG_FLIGHT) != 0) {
+
+ // do a rough-and-ready mapping to
+ // the levels documented in FGFDMExec.h
+ switch (logbuf::get_log_priority()) {
+ case SG_BULK:
+ FGJSBBase::debug_lvl = 0x1f;
+ break;
+ case SG_DEBUG:
+ FGJSBBase::debug_lvl = 0x0f;
+ case SG_INFO:
+ FGJSBBase::debug_lvl = 0x01;
+ break;
+ case SG_WARN:
+ case SG_ALERT:
+ FGJSBBase::debug_lvl = 0x00;
+ break;
+ }
+ }
+
fdmex = new FGFDMExec( (FGPropertyManager*)globals->get_props() );
-
+
State = fdmex->GetState();
Atmosphere = fdmex->GetAtmosphere();
FCS = fdmex->GetFCS();
} else {
trimmed->setBoolValue(true);
}
- State->ReportState();
+ if (FGJSBBase::debug_lvl > 0)
+ State->ReportState();
delete fgtrim;
pitch_trim->setDoubleValue( FCS->GetPitchTrimCmd() );
throttle_trim->setDoubleValue( FCS->GetThrottleCmd(0) );