]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/navradio.hxx
Merge to get true base of James' recent gps changes
[flightgear.git] / src / Instrumentation / navradio.hxx
index 0337bf219d34e0fd9e7380dba5325eb0f6077ee1..5cc368f1b47f3119540eab5b75a62a23de132c53 100644 (file)
@@ -39,7 +39,7 @@ class SGSampleGroup;
 class FGNavRecord;
 typedef SGSharedPtr<FGNavRecord> FGNavRecordPtr;
 
-class FGNavRadio : public SGSubsystem
+class FGNavRadio : public SGSubsystem, public SGPropertyChangeListener
 {
     FGMorse morse;
 
@@ -168,7 +168,7 @@ class FGNavRadio : public SGSubsystem
     double _gsNeedleDeflectionNorm;
     
     SGSharedPtr<SGSampleGroup> _sgr;
-    std::vector<SGPropertyNode*> _tiedNodes;
+    std::vector<SGPropertyNode_ptr> _tiedNodes;
     
     bool updateWithPower(double aDt);
 
@@ -208,10 +208,13 @@ class FGNavRadio : public SGSubsystem
     template <typename T>
     void tie(const char* aRelPath, const SGRawValue<T>& aRawValue)
     {
-      SGPropertyNode* nd = _radio_node->getNode(aRelPath, true);
+      SGPropertyNode_ptr nd = _radio_node->getNode(aRelPath, true);
       _tiedNodes.push_back(nd);
       nd->tie(aRawValue);
     }
+    
+  // implement SGPropertyChangeListener
+    virtual void valueChanged (SGPropertyNode * prop);
 public:
 
     FGNavRadio(SGPropertyNode *node);