]> git.mxchange.org Git - flightgear.git/blobdiff - src/Cockpit/marker_beacon.hxx
Boris Koenig:
[flightgear.git] / src / Cockpit / marker_beacon.hxx
index 1a49844dd4591125b2444872be7e9fc86489ef97..2a5ac3a9fb6993479f22f4f0138101a7945fa2ea 100644 (file)
 #define _FG_MARKER_BEACON_HXX
 
 
-#include <Main/fgfs.hxx>
 #include <Main/fg_props.hxx>
 
 #include <simgear/compiler.h>
-
+#include <simgear/structure/subsystem_mgr.hxx>
 #include <simgear/math/interpolater.hxx>
 #include <simgear/timing/timestamp.hxx>
 
@@ -37,7 +36,7 @@
 #include <Sound/morse.hxx>
 
 
-class FGMarkerBeacon : public FGSubsystem
+class FGMarkerBeacon : public SGSubsystem
 {
     FGBeacon beacon;
     FGMorse morse;
@@ -49,6 +48,10 @@ class FGMarkerBeacon : public FGSubsystem
     SGPropertyNode *lon_node;
     SGPropertyNode *lat_node;
     SGPropertyNode *alt_node;
+    SGPropertyNode *bus_power;
+    SGPropertyNode *power_btn;
+    SGPropertyNode *audio_btn;
+    SGPropertyNode *serviceable;
 
     bool need_update;
 
@@ -63,6 +66,13 @@ class FGMarkerBeacon : public FGSubsystem
 
 public:
 
+    enum fgMkrBeacType {
+       NOBEACON = 0,
+       INNER,
+       MIDDLE,
+       OUTER   
+    };
+
     FGMarkerBeacon();
     ~FGMarkerBeacon();
 
@@ -78,6 +88,9 @@ public:
     inline bool get_inner_blink () const { return inner_blink; }
     inline bool get_middle_blink () const { return middle_blink; }
     inline bool get_outer_blink () const { return outer_blink; }
+    inline bool has_power() const {
+        return power_btn->getBoolValue() && (bus_power->getDoubleValue() > 1.0);
+    }
 };