]> git.mxchange.org Git - flightgear.git/blobdiff - src/Cockpit/marker_beacon.hxx
Yank out all the glut dependencies and concentrate them in a (easily
[flightgear.git] / src / Cockpit / marker_beacon.hxx
index 1a49844dd4591125b2444872be7e9fc86489ef97..aa6d930bf02b7f46abfd8666d29d85b82cd1c753 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;
 
@@ -78,6 +81,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);
+    }
 };