1
0
Fork 0

Yank the "castering" attribute and replace it with a ControlMap-enabled

control that can be set via the property system.  This allows implementation
of the DC-3 wheel lock.
This commit is contained in:
andy 2002-05-23 19:30:56 +00:00
parent 69189afd23
commit 6af60f7462
3 changed files with 3 additions and 3 deletions

View file

@ -192,6 +192,7 @@ void ControlMap::applyControls(float dt)
case BRAKE: ((Gear*)obj)->setBrake(lval); break;
case STEER: ((Gear*)obj)->setRotation(lval); break;
case EXTEND: ((Gear*)obj)->setExtension(lval); break;
case CASTERING:((Gear*)obj)->setCastering(lval != 0); break;
case SLAT: ((Wing*)obj)->setSlat(lval); break;
case FLAP0: ((Wing*)obj)->setFlap0(lval, rval); break;
case FLAP1: ((Wing*)obj)->setFlap1(lval, rval); break;

View file

@ -13,7 +13,7 @@ public:
ADVANCE, REHEAT, PROP,
BRAKE, STEER, EXTEND,
INCIDENCE, FLAP0, FLAP1, SLAT, SPOILER, VECTOR,
BOOST };
BOOST, CASTERING };
enum { OPT_SPLIT = 0x01,
OPT_INVERT = 0x02,

View file

@ -174,8 +174,6 @@ void FGFDM::startElement(const char* name, const XMLAttributes &atts)
g->setBrake(attrf(a, "skid", 0));
g->setStaticFriction(attrf(a, "sfric", 0.8));
g->setDynamicFriction(attrf(a, "dfric", 0.7));
if(a->hasAttribute("castering"))
g->setCastering(true);
_airplane.addGear(g);
} else if(eq(name, "fuselage")) {
float b[3];
@ -500,6 +498,7 @@ int FGFDM::parseOutput(const char* name)
if(eq(name, "FLAP1")) return ControlMap::FLAP1;
if(eq(name, "SLAT")) return ControlMap::SLAT;
if(eq(name, "SPOILER")) return ControlMap::SPOILER;
if(eq(name, "CASTERING")) return ControlMap::CASTERING;
SG_LOG(SG_FLIGHT,SG_ALERT,"Unrecognized control type '"
<< name << "' in YASim aircraft description.");
exit(1);