]> git.mxchange.org Git - flightgear.git/commitdiff
Roy Vegard Ovesen:
authorehofman <ehofman>
Sun, 24 Oct 2004 11:05:14 +0000 (11:05 +0000)
committerehofman <ehofman>
Sun, 24 Oct 2004 11:05:14 +0000 (11:05 +0000)
I've added two new debug log types for the instrumentation and systems. They
used to use the autopilot debug log, because I couldn't figure out how to
make new log types. Well, now I have figured it out.  ;-)

17 files changed:
src/FDM/JSBSim/FGEngine.cpp
src/Instrumentation/adf.cxx
src/Instrumentation/airspeed_indicator.cxx
src/Instrumentation/altimeter.cxx
src/Instrumentation/attitude_indicator.cxx
src/Instrumentation/clock.cxx
src/Instrumentation/dme.cxx
src/Instrumentation/gps.cxx
src/Instrumentation/heading_indicator.cxx
src/Instrumentation/mag_compass.cxx
src/Instrumentation/slip_skid_ball.cxx
src/Instrumentation/turn_indicator.cxx
src/Instrumentation/vertical_speed_indicator.cxx
src/Main/fg_props.cxx
src/Systems/pitot.cxx
src/Systems/static.cxx
src/Systems/vacuum.cxx

index edf834ba3c46f837662c28c661d8a09f800a7650..38193a2a2856680fb5a42f0e208dc111803185c8 100644 (file)
@@ -107,6 +107,9 @@ FGEngine::FGEngine(FGFDMExec* exec, int engine_number) : EngineNumber(engine_num
 
 FGEngine::~FGEngine()
 {
+  if (Thruster)
+    delete Thruster;
+
   Debug(1);
 }
 
index e6d02a1400dd0ce2fafa028ac52ab19c2d70e3e2..9d15b2bbd023b6e09c020c8f19e90121989fdba9 100644 (file)
@@ -75,9 +75,9 @@ ADF::ADF (SGPropertyNode *node )
         } else if ( cname == "number" ) {
             num = child->getIntValue();
         } else {
-            SG_LOG( SG_AUTOPILOT, SG_WARN, "Error in adf config logic" );
+            SG_LOG( SG_INSTR, SG_WARN, "Error in adf config logic" );
             if ( name.length() ) {
-                SG_LOG( SG_AUTOPILOT, SG_WARN, "Section = " << name );
+                SG_LOG( SG_INSTR, SG_WARN, "Section = " << name );
             }
         }
     }
index cbdd75902d19e59487604cc3ff56abc70610ce58..dbec719fadea20d10e56d4002db7003bb5080db2 100644 (file)
@@ -36,9 +36,9 @@ AirspeedIndicator::AirspeedIndicator ( SGPropertyNode *node )
         } else if ( cname == "static-port" ) {
             static_port = cval;
         } else {
-            SG_LOG( SG_AUTOPILOT, SG_WARN, "Error in aispeed-indicator config logic" );
+            SG_LOG( SG_INSTR, SG_WARN, "Error in aispeed-indicator config logic" );
             if ( name.length() ) {
-                SG_LOG( SG_AUTOPILOT, SG_WARN, "Section = " << name );
+                SG_LOG( SG_INSTR, SG_WARN, "Section = " << name );
             }
         }
     }
index 86190d25379f252be182609fb929f906877ae050..2a82ee7a031f95a659806ee6a64b7935a698a097 100644 (file)
@@ -66,9 +66,9 @@ Altimeter::Altimeter ( SGPropertyNode *node )
         } else if ( cname == "static-port" ) {
             static_port = cval;
         } else {
-            SG_LOG( SG_AUTOPILOT, SG_WARN, "Error in altimeter config logic" );
+            SG_LOG( SG_INSTR, SG_WARN, "Error in altimeter config logic" );
             if ( name.length() ) {
-                SG_LOG( SG_AUTOPILOT, SG_WARN, "Section = " << name );
+                SG_LOG( SG_INSTR, SG_WARN, "Section = " << name );
             }
         }
     }
index 82cb4c6a0f24bc871d2b412184d363eadcbc80bc..d958de25df39d361ed4047a391d357221f9a75d2 100644 (file)
@@ -31,9 +31,9 @@ AttitudeIndicator::AttitudeIndicator ( SGPropertyNode *node )
         } else if ( cname == "vacuum-system" ) {
             vacuum_system = cval;
         } else {
-            SG_LOG( SG_AUTOPILOT, SG_WARN, "Error in attitude-indicator config logic" );
+            SG_LOG( SG_INSTR, SG_WARN, "Error in attitude-indicator config logic" );
             if ( name.length() ) {
-                SG_LOG( SG_AUTOPILOT, SG_WARN, "Section = " << name );
+                SG_LOG( SG_INSTR, SG_WARN, "Section = " << name );
             }
         }
     }
index 6f1db3e391dcbc86343ee42d3f2519575d961a53..b850d18ebd03caceec12fbc425d6578eaf82985f 100644 (file)
@@ -33,9 +33,9 @@ Clock::Clock ( SGPropertyNode *node )
         } else if ( cname == "number" ) {
             num = child->getIntValue();
         } else {
-            SG_LOG( SG_AUTOPILOT, SG_WARN, "Error in clock config logic" );
+            SG_LOG( SG_INSTR, SG_WARN, "Error in clock config logic" );
             if ( name.length() ) {
-                SG_LOG( SG_AUTOPILOT, SG_WARN, "Section = " << name );
+                SG_LOG( SG_INSTR, SG_WARN, "Section = " << name );
             }
         }
     }
index 0164888a170f5fc67c37a174ab8c1865c444918c..e74977399de06eef51791c748d3fc0bb20464cd8 100644 (file)
@@ -57,9 +57,9 @@ DME::DME ( SGPropertyNode *node )
         } else if ( cname == "number" ) {
             num = child->getIntValue();
         } else {
-            SG_LOG( SG_AUTOPILOT, SG_WARN, "Error in dme config logic" );
+            SG_LOG( SG_INSTR, SG_WARN, "Error in dme config logic" );
             if ( name.length() ) {
-                SG_LOG( SG_AUTOPILOT, SG_WARN, "Section = " << name );
+                SG_LOG( SG_INSTR, SG_WARN, "Section = " << name );
             }
         }
     }
index 9e2e9cdf493d1de2e819a8fcb9db38cbc5f120a3..5ebfafcba95302d24d871a30da6c1e012e17acbe 100644 (file)
@@ -44,9 +44,9 @@ GPS::GPS ( SGPropertyNode *node)
         } else if ( cname == "number" ) {
             num = child->getIntValue();
         } else {
-            SG_LOG( SG_AUTOPILOT, SG_WARN, "Error in gps config logic" );
+            SG_LOG( SG_INSTR, SG_WARN, "Error in gps config logic" );
             if ( name.length() ) {
-                SG_LOG( SG_AUTOPILOT, SG_WARN, "Section = " << name );
+                SG_LOG( SG_INSTR, SG_WARN, "Section = " << name );
             }
         }
     }
index beeef54e95767f6502901d40b49ebaa9bafc735a..8878e3ba13c79f25f311a3fb33d4a1478fbe10aa 100644 (file)
@@ -26,9 +26,9 @@ HeadingIndicator::HeadingIndicator ( SGPropertyNode *node )
         } else if ( cname == "vacuum-system" ) {
             vacuum_system = cval;
         } else {
-            SG_LOG( SG_AUTOPILOT, SG_WARN, "Error in heading-indicator config logic" );
+            SG_LOG( SG_INSTR, SG_WARN, "Error in heading-indicator config logic" );
             if ( name.length() ) {
-                SG_LOG( SG_AUTOPILOT, SG_WARN, "Section = " << name );
+                SG_LOG( SG_INSTR, SG_WARN, "Section = " << name );
             }
         }
     }
index 378dd4bdd3efeac168723179341ff3bc460f3597..c7b13553c37f2d9793eb47c00620590de4341945 100644 (file)
@@ -33,9 +33,9 @@ MagCompass::MagCompass ( SGPropertyNode *node )
         } else if ( cname == "number" ) {
             num = child->getIntValue();
         } else {
-            SG_LOG( SG_AUTOPILOT, SG_WARN, "Error in magnetic-compass config logic" );
+            SG_LOG( SG_INSTR, SG_WARN, "Error in magnetic-compass config logic" );
             if ( name.length() ) {
-                SG_LOG( SG_AUTOPILOT, SG_WARN, "Section = " << name );
+                SG_LOG( SG_INSTR, SG_WARN, "Section = " << name );
             }
         }
     }
index d0ec8886fc76639e3b7e11dcf042d224b657ba03..ba470bd1c3d8a7eab8806c5ad8a345ffbb19a9fd 100644 (file)
@@ -23,9 +23,9 @@ SlipSkidBall::SlipSkidBall ( SGPropertyNode *node)
         } else if ( cname == "number" ) {
             num = child->getIntValue();
         } else {
-            SG_LOG( SG_AUTOPILOT, SG_WARN, "Error in slip-skid-ball config logic" );
+            SG_LOG( SG_INSTR, SG_WARN, "Error in slip-skid-ball config logic" );
             if ( name.length() ) {
-                SG_LOG( SG_AUTOPILOT, SG_WARN, "Section = " << name );
+                SG_LOG( SG_INSTR, SG_WARN, "Section = " << name );
             }
         }
     }
index 26b3c8f690fd8fef3ee14964c96b4d59284a64c2..6eab60a491000987514f2894e9e1de3fccd5b0ba 100644 (file)
@@ -28,9 +28,9 @@ TurnIndicator::TurnIndicator ( SGPropertyNode *node) :
         } else if ( cname == "number" ) {
             num = child->getIntValue();
         } else {
-            SG_LOG( SG_AUTOPILOT, SG_WARN, "Error in turn-indicator config logic" );
+            SG_LOG( SG_INSTR, SG_WARN, "Error in turn-indicator config logic" );
             if ( name.length() ) {
-                SG_LOG( SG_AUTOPILOT, SG_WARN, "Section = " << name );
+                SG_LOG( SG_INSTR, SG_WARN, "Section = " << name );
             }
         }
     }
index 72ff151f41cb00322905e3a427b0d1bf000db252..fb2924600f738f27f832dacf9491252aea023a11 100644 (file)
@@ -28,9 +28,9 @@ VerticalSpeedIndicator::VerticalSpeedIndicator ( SGPropertyNode *node )
         } else if ( cname == "static-port" ) {
             static_port = cval;
         } else {
-            SG_LOG( SG_AUTOPILOT, SG_WARN, "Error in vertical-speed-indicator config logic" );
+            SG_LOG( SG_INSTR, SG_WARN, "Error in vertical-speed-indicator config logic" );
             if ( name.length() ) {
-                SG_LOG( SG_AUTOPILOT, SG_WARN, "Section = " << name );
+                SG_LOG( SG_INSTR, SG_WARN, "Section = " << name );
             }
         }
     }
index 2c93ad36cb47de433224de253cadc54726b0239e..8c603096eb7e6798823f1644e9f56b4e7221f23a 100644 (file)
@@ -82,6 +82,8 @@ LogClassMapping log_class_mappings [] = {
   LogClassMapping(SG_IO, "io"),
   LogClassMapping(SG_CLIPPER, "clipper"),
   LogClassMapping(SG_NETWORK, "network"),
+  LogClassMapping(SG_INSTR, "instrumentation"),
+  LogClassMapping(SG_SYSTEMS, "systems"),
   LogClassMapping(SG_UNDEFD, "")
 };
 
index 71b27fc7a05a3884938a6f8e95ef592635023090..7201e4f5dbee7b8d52279ac4026f3c6b3aea3ed3 100644 (file)
@@ -24,9 +24,9 @@ PitotSystem::PitotSystem ( SGPropertyNode *node )
         } else if ( cname == "number" ) {
             num = child->getIntValue();
         } else {
-            SG_LOG( SG_AUTOPILOT, SG_WARN, "Error in systems config logic" );
+            SG_LOG( SG_SYSTEMS, SG_WARN, "Error in systems config logic" );
             if ( name.length() ) {
-                SG_LOG( SG_AUTOPILOT, SG_WARN, "Section = " << name );
+                SG_LOG( SG_SYSTEMS, SG_WARN, "Section = " << name );
             }
         }
     }
index bac6ddf25aba7caa50c44d8924777d120c431ad5..59111d32233a4c4e3d6903748c1920867e31a710 100644 (file)
@@ -23,9 +23,9 @@ StaticSystem::StaticSystem ( SGPropertyNode *node )
         } else if ( cname == "number" ) {
             num = child->getIntValue();
         } else {
-            SG_LOG( SG_AUTOPILOT, SG_WARN, "Error in systems config logic" );
+            SG_LOG( SG_SYSTEMS, SG_WARN, "Error in systems config logic" );
             if ( name.length() ) {
-                SG_LOG( SG_AUTOPILOT, SG_WARN, "Section = " << name );
+                SG_LOG( SG_SYSTEMS, SG_WARN, "Section = " << name );
             }
         }
     }
index bede8ed77cf716288527e2dd8e10118f88c93cd6..fcf80d5c31838a8b15e7d98a7186fcb453276b9c 100644 (file)
@@ -29,9 +29,9 @@ VacuumSystem::VacuumSystem ( SGPropertyNode *node )
         } else if ( cname == "scale" ) {
             scale = child->getDoubleValue();
         } else {
-            SG_LOG( SG_AUTOPILOT, SG_WARN, "Error in vacuum config logic" );
+            SG_LOG( SG_SYSTEMS, SG_WARN, "Error in vacuum config logic" );
             if ( name.length() ) {
-                SG_LOG( SG_AUTOPILOT, SG_WARN, "Section = " << name );
+                SG_LOG( SG_SYSTEMS, SG_WARN, "Section = " << name );
             }
         }
     }