]> git.mxchange.org Git - flightgear.git/commitdiff
Tie the engine0 rpm to the property manager.
authorcurt <curt>
Fri, 29 Sep 2000 22:02:32 +0000 (22:02 +0000)
committercurt <curt>
Fri, 29 Sep 2000 22:02:32 +0000 (22:02 +0000)
src/Main/bfi.cxx
src/Main/bfi.hxx

index 7a492938e185b86c506e99b2e0f687e6c4a38fc4..c124e0dfd8b6be79ae22f48f6dca661c328927e7 100644 (file)
@@ -123,6 +123,10 @@ FGBFI::init ()
   current_properties.tieDouble("/orientation/roll",
                               getRoll, setRoll);
 
+                               // Engine
+  current_properties.tieDouble("/engine0/rpm",
+                              getRPM, setRPM);
+
                                // Velocities
   current_properties.tieDouble("/velocities/airspeed",
                               getAirspeed, 0);
@@ -658,6 +662,26 @@ FGBFI::setRoll (double roll)
 }
 
 
+/**
+ * Return the current engine0 rpm
+ */
+double
+FGBFI::getRPM ()
+{
+  return current_aircraft.fdm_state->get_engine(0)->get_RPM();
+}
+
+
+/**
+ * Set the current engine0 rpm
+ */
+void
+FGBFI::setRPM (double rpm)
+{
+  current_aircraft.fdm_state->get_engine(0)->set_RPM( rpm );
+}
+
+
 \f
 ////////////////////////////////////////////////////////////////////////
 // Velocities
index 42635639a34dce95ad7d69ba3cee5b341acc231d..bc3c9d674aae18e0531440742bfd6f74274d3b6c 100644 (file)
@@ -90,6 +90,9 @@ public:
   static void setPitch (double pitch);
   static void setRoll (double roll);
 
+                               // Engine
+  static double getRPM ();
+  static void setRPM ( double rpm );
 
                                // Velocities
   static double getAirspeed ();