Tie the engine0 rpm to the property manager.
This commit is contained in:
parent
137da58a70
commit
83d06fb4d6
2 changed files with 27 additions and 0 deletions
|
@ -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 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Velocities
|
||||
|
|
|
@ -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 ();
|
||||
|
|
Loading…
Add table
Reference in a new issue