Maik: add ROTORBALANCE axis. Fix spelling of ROTORRELTARGET.
This commit is contained in:
parent
b0cd31415a
commit
57918533eb
5 changed files with 15 additions and 4 deletions
|
@ -214,12 +214,14 @@ void ControlMap::applyControls(float dt)
|
|||
case TILTPITCH: ((Rotor*)obj)->setTiltPitch(lval); break;
|
||||
case TILTYAW: ((Rotor*)obj)->setTiltYaw(lval); break;
|
||||
case TILTROLL: ((Rotor*)obj)->setTiltRoll(lval); break;
|
||||
case ROTORBALANCE:
|
||||
((Rotor*)obj)->setRotorBalance(lval); break;
|
||||
case ROTORBRAKE: ((Rotorgear*)obj)->setRotorBrake(lval); break;
|
||||
case ROTORENGINEON:
|
||||
((Rotorgear*)obj)->setEngineOn((int)lval); break;
|
||||
case ROTORENGINEMAXRELTORQUE:
|
||||
((Rotorgear*)obj)->setRotorEngineMaxRelTorque(lval); break;
|
||||
case ROTORELTARGET:
|
||||
case ROTORRELTARGET:
|
||||
((Rotorgear*)obj)->setRotorRelTarget(lval); break;
|
||||
case REVERSE_THRUST: ((Jet*)obj)->setReverse(lval != 0); break;
|
||||
case BOOST:
|
||||
|
|
|
@ -16,8 +16,8 @@ public:
|
|||
BOOST, CASTERING, PROPPITCH, PROPFEATHER,
|
||||
COLLECTIVE, CYCLICAIL, CYCLICELE, ROTORENGINEON,
|
||||
TILTYAW, TILTPITCH, TILTROLL,
|
||||
ROTORBRAKE, ROTORENGINEMAXRELTORQUE, ROTORELTARGET,
|
||||
REVERSE_THRUST, WASTEGATE,
|
||||
ROTORBRAKE, ROTORENGINEMAXRELTORQUE, ROTORRELTARGET,
|
||||
ROTORBALANCE, REVERSE_THRUST, WASTEGATE,
|
||||
WINCHRELSPEED, HITCHOPEN, PLACEWINCH, FINDAITOW};
|
||||
|
||||
enum { OPT_SPLIT = 0x01,
|
||||
|
|
|
@ -964,7 +964,8 @@ int FGFDM::parseOutput(const char* name)
|
|||
if(eq(name, "ROTORBRAKE")) return ControlMap::ROTORBRAKE;
|
||||
if(eq(name, "ROTORENGINEMAXRELTORQUE"))
|
||||
return ControlMap::ROTORENGINEMAXRELTORQUE;
|
||||
if(eq(name, "ROTORRELTARGET")) return ControlMap::ROTORELTARGET;
|
||||
if(eq(name, "ROTORRELTARGET")) return ControlMap::ROTORRELTARGET;
|
||||
if(eq(name, "ROTORBALANCE")) return ControlMap::ROTORBALANCE;
|
||||
if(eq(name, "REVERSE_THRUST")) return ControlMap::REVERSE_THRUST;
|
||||
if(eq(name, "WASTEGATE")) return ControlMap::WASTEGATE;
|
||||
if(eq(name, "WINCHRELSPEED")) return ControlMap::WINCHRELSPEED;
|
||||
|
|
|
@ -791,6 +791,13 @@ void Rotor::setCyclicail(float lval,float rval)
|
|||
_cyclicail=-(_mincyclicail+(lval+1)/2*(_maxcyclicail-_mincyclicail));
|
||||
}
|
||||
|
||||
void Rotor::setRotorBalance(float lval)
|
||||
{
|
||||
lval = Math::clamp(lval, -1, 1);
|
||||
int i;
|
||||
_balance2 = lval;
|
||||
}
|
||||
|
||||
void Rotor::getPosition(float* out)
|
||||
{
|
||||
int i;
|
||||
|
|
|
@ -93,6 +93,7 @@ public:
|
|||
void setCyclicail(float lval,float rval);
|
||||
void setCyclicele(float lval,float rval);
|
||||
void setCollective(float lval);
|
||||
void setRotorBalance(float lval);
|
||||
void setAlphaoutput(int i, const char *text);
|
||||
void setCcw(int ccw);
|
||||
int getCcw() {return _ccw;};
|
||||
|
|
Loading…
Add table
Reference in a new issue