]> git.mxchange.org Git - flightgear.git/blobdiff - src/Cockpit/kr_87.hxx
Begin interfacing the navcom's to the electrical model.
[flightgear.git] / src / Cockpit / kr_87.hxx
index 80171ded1183af93eddf51abb976df50854f5cc0..5b6069e991a5a12d72c6168fd2570bb806b82946 100644 (file)
 #include <simgear/timing/timestamp.hxx>
 
 #include <Navaids/navlist.hxx>
-#include <Sound/beacon.hxx>
 #include <Sound/morse.hxx>
 
 
 class FGKR_87 : public FGSubsystem
 {
-    FGBeacon beacon;
     FGMorse morse;
 
     SGInterpTable *term_tbl;
@@ -81,7 +79,8 @@ class FGKR_87 : public FGSubsystem
 
     // input and buttons
     double rotation;            // compass faceplace rotation
-    double on_off_vol_btn;
+    bool power_btn;             // 0 = off, 1 = powered
+    double vol_btn;
     bool adf_btn;               // 0 = normal, 1 = depressed
     bool bfo_btn;               // 0 = normal, 1 = depressed
     bool frq_btn;               // 0 = normal, 1 = depressed
@@ -90,7 +89,7 @@ class FGKR_87 : public FGSubsystem
     bool last_flt_et_btn;
     bool set_rst_btn;           // 0 = normal, 1 = depressed
     bool last_set_rst_btn;      // 0 = normal, 1 = depressed
-    bool ident_btn;             // ???
+    bool ident_btn;             // turn audio morse code on/off
 
     // outputs
     double freq;
@@ -122,9 +121,12 @@ public:
     void search ();
 
     // internal values
+    inline string get_ident() const { return ident; }
+    inline bool get_valid() const { return valid; }
     inline bool get_inrange() const { return inrange; }
     inline double get_stn_lon() const { return stn_lon; }
     inline double get_stn_lat() const { return stn_lat; }
+    inline double get_dist() const { return dist; }
     inline double get_heading() const { return heading; }
 
     // modes
@@ -136,11 +138,15 @@ public:
     // input and buttons
     inline double get_rotation () const { return rotation; }
     inline void set_rotation( double rot ) { rotation = rot; }
-    inline double get_on_off_vol_btn() const { return on_off_vol_btn; }
-    inline void set_on_off_vol_btn( double val ) {
+    inline bool get_power_btn() const { return power_btn; }
+    inline void set_power_btn( bool val ) {
+       power_btn = val;
+    }
+    inline double get_vol_btn() const { return vol_btn; }
+    inline void set_vol_btn( double val ) {
        if ( val < 0.0 ) val = 0.0;
        if ( val > 1.0 ) val = 1.0;
-       on_off_vol_btn = val;
+       vol_btn = val;
     }
     inline bool get_adf_btn() const { return adf_btn; }
     inline void set_adf_btn( bool val ) { adf_btn = val; }