]> git.mxchange.org Git - flightgear.git/blobdiff - src/Cockpit/kr_87.cxx
Attempt #1 to sort out confusion between left / right / parking brake
[flightgear.git] / src / Cockpit / kr_87.cxx
index 9c06f9a491968290c22d87464032793af1e714c6..94e7acca310d90b3aa221485f53db645c92892c3 100644 (file)
@@ -32,7 +32,6 @@
 
 #include <Aircraft/aircraft.hxx>
 #include <Navaids/navlist.hxx>
-#include <Time/FGEventMgr.hxx>
 
 #include "kr_87.hxx"
 
@@ -74,7 +73,7 @@ FGKR_87::FGKR_87() :
     lat_node(fgGetNode("/position/latitude-deg", true)),
     alt_node(fgGetNode("/position/altitude-ft", true)),
     bus_power(fgGetNode("/systems/electrical/outputs/adf", true)),
-    servicable(fgGetNode("/instrumentation/adf/servicable", true)),
+    serviceable(fgGetNode("/instrumentation/adf/serviceable", true)),
     need_update(true),
     valid(false),
     inrange(false),
@@ -114,7 +113,7 @@ FGKR_87::~FGKR_87() {
 
 
 void FGKR_87::init () {
-    servicable->setBoolValue( true );
+    serviceable->setBoolValue( true );
     morse.init();
 }
 
@@ -249,7 +248,7 @@ void FGKR_87::update( double dt ) {
     // Radio
     ////////////////////////////////////////////////////////////////////////
 
-    if ( has_power() && servicable->getBoolValue() ) {
+    if ( has_power() && serviceable->getBoolValue() ) {
         // buttons
         if ( adf_btn == 0 ) {
             ant_mode = 1;
@@ -284,7 +283,7 @@ void FGKR_87::update( double dt ) {
         if ( set_rst_btn == 1 && set_rst_btn == last_set_rst_btn ) {
             // button depressed and was last iteration too
             tmp_timer += dt;
-            cout << "tmp_timer = " << tmp_timer << endl;
+            // cout << "tmp_timer = " << tmp_timer << endl;
             if ( tmp_timer > 2.0 ) {
                 // button held depressed for 2 seconds
                 cout << "entering elapsed count down mode" << endl;
@@ -441,11 +440,11 @@ void FGKR_87::update( double dt ) {
     // cout << "flt = " << flight_timer << " et = " << elapsed_timer 
     //      << " needle = " << needle_deg << endl;
 
-    if ( valid && inrange && servicable->getBoolValue() ) {
+    if ( valid && inrange && serviceable->getBoolValue() ) {
        // play station ident via audio system if on + ant mode,
        // otherwise turn it off
        if ( vol_btn >= 0.01 && audio_btn ) {
-           FGSimpleSound *sound;
+           SGSimpleSound *sound;
            sound = globals->get_soundmgr()->find( "adf-ident" );
             if ( sound != NULL ) {
                 if ( !adf_btn ) {
@@ -514,7 +513,7 @@ void FGKR_87::search() {
            if ( globals->get_soundmgr()->exists( "adf-ident" ) ) {
                globals->get_soundmgr()->remove( "adf-ident" );
            }
-           FGSimpleSound *sound;
+           SGSimpleSound *sound;
            sound = morse.make_ident( trans_ident, LO_FREQUENCY );
            sound->set_volume( 0.3 );
            globals->get_soundmgr()->add( sound, "adf-ident" );