]> git.mxchange.org Git - flightgear.git/commitdiff
Annunciators cannot work if electrical system is not serviceable.
authorcurt <curt>
Fri, 1 Aug 2003 00:22:14 +0000 (00:22 +0000)
committercurt <curt>
Fri, 1 Aug 2003 00:22:14 +0000 (00:22 +0000)
src/Instrumentation/annunciator.cxx
src/Instrumentation/annunciator.hxx

index 45ced6d18afa5849821e9ef0778eb9328fa68866..97a2cc9ae2641470bc597e1b0aa6e6ceeb6493a5 100644 (file)
@@ -33,6 +33,7 @@ Annunciator::init ()
     _fuel_l = fgGetNode( "/consumables/fuel/tank[0]/level-gal_us", true );
     _fuel_r = fgGetNode( "/consumables/fuel/tank[1]/level-gal_us", true );
     _oil_px = fgGetNode( "/engines/engine[0]/oil-pressure-psi", true );
+    _elec_serv = fgGetNode( "/systems/electrical/serviceable", true );
 
     _ann_volts = fgGetNode( "/instrumentation/annunciator/volts", true );
     _ann_vac_l = fgGetNode( "/instrumentation/annunciator/vacuum-left", true );
@@ -52,7 +53,7 @@ Annunciator::update (double dt)
     timer3 += dt;
     timer4 += dt;
 
-    if ( _volts->getDoubleValue() < 5.0 ) {
+    if ( _volts->getDoubleValue() < 5.0 || !_elec_serv->getBoolValue() ) {
         // Not enough juice to illuminate the display
         _ann_volts->setBoolValue( false );
         _ann_vac_l->setBoolValue( false );
index 861b9306f35f91635c47f0f84261b4ca1d13229b..8938de4c466b6fd7d8bd390f84fc403c19e923af 100644 (file)
@@ -45,7 +45,8 @@ class Annunciator : public FGSubsystem
     SGPropertyNode *_fuel_l;
     SGPropertyNode *_fuel_r;
     SGPropertyNode *_oil_px;
-    
+    SGPropertyNode *_elec_serv;
+
     // outputs
     SGPropertyNode *_ann_volts;  // VOLTS        (red)
     SGPropertyNode *_ann_vac_l;  // L VAC        (amber)