]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/encoder.cxx
Add support for drawing target markers (circles on top of any AI/MP aircraft)
[flightgear.git] / src / Instrumentation / encoder.cxx
index 725daa7999787df03dfa15d2b14e45b1767f674a..5fd5504e7d859c4d9118a35041dfbf963cea3520 100644 (file)
@@ -16,7 +16,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
 #ifdef HAVE_CONFIG_H
 #  include <config.h>
@@ -62,15 +62,15 @@ int round (double value, int nearest=1)
 
 Encoder::Encoder(SGPropertyNode *node)
     :
-    altitudeTable(new SGInterpTable),
     name("encoder"),
     num(0),
-    staticPort("/systems/static")
+    staticPort("/systems/static"),
+    altitudeTable(new SGInterpTable)
 {
-    for (int i = 0; altitude_data[i][0] != -1; i++)
+    int i;
+    for ( i = 0; altitude_data[i][0] != -1; i++ )
         altitudeTable->addEntry(altitude_data[i][0], altitude_data[i][1]);
 
-    int i;
     for ( i = 0; i < node->nChildren(); ++i ) {
         SGPropertyNode *child = node->getChild(i);
         string cname = child->getName();
@@ -112,8 +112,6 @@ void Encoder::init()
     // Outputs
     pressureAltitudeNode = node->getChild("pressure-alt-ft", 0, true);
     modeCAltitudeNode = node->getChild("mode-c-alt-ft", 0, true);
-    // Init
-    serviceableNode->setBoolValue(true);
 }