Modified Files:
controls.cxx controls.hxx: Add nose wheel steering control switch
This commit is contained in:
parent
ee30992e55
commit
4c1c10ffef
2 changed files with 18 additions and 1 deletions
|
@ -78,6 +78,7 @@ FGControls::FGControls() :
|
|||
copilot_brake_right( 0.0 ),
|
||||
brake_parking( 0.0 ),
|
||||
steering( 0.0 ),
|
||||
nose_wheel_steering( true ),
|
||||
gear_down( true ),
|
||||
antiskid( true ),
|
||||
tailhook( false ),
|
||||
|
@ -157,6 +158,7 @@ void FGControls::reset_all()
|
|||
set_fuel_selector( ALL_TANKS, true );
|
||||
dump_valve = false;
|
||||
steering = 0.0;
|
||||
nose_wheel_steering = true;
|
||||
gear_down = true;
|
||||
tailhook = false;
|
||||
launchbar = false;
|
||||
|
@ -468,6 +470,11 @@ FGControls::bind ()
|
|||
&FGControls::get_steering, &FGControls::set_steering);
|
||||
fgSetArchivable("/controls/gear/steering");
|
||||
|
||||
fgTie("/controls/gear/nose-wheel-steering", this,
|
||||
&FGControls::get_nose_wheel_steering,
|
||||
&FGControls::set_nose_wheel_steering);
|
||||
fgSetArchivable("/controls/gear/nose-wheel-steering");
|
||||
|
||||
fgTie("/controls/gear/gear-down", this,
|
||||
&FGControls::get_gear_down, &FGControls::set_gear_down);
|
||||
fgSetArchivable("/controls/gear/gear-down");
|
||||
|
@ -915,7 +922,8 @@ void FGControls::unbind ()
|
|||
fgUntie("/controls/gear/brake-right");
|
||||
fgUntie("/controls/gear/brake-parking");
|
||||
fgUntie("/controls/gear/steering");
|
||||
fgUntie("/controls/gear/gear_down");
|
||||
fgUntie("/controls/gear/nose-wheel-steering");
|
||||
fgUntie("/controls/gear/gear-down");
|
||||
fgUntie("/controls/gear/antiskid");
|
||||
fgUntie("/controls/gear/tailhook");
|
||||
fgUntie("/controls/gear/launchbar");
|
||||
|
@ -1710,6 +1718,12 @@ FGControls::set_steering( double angle )
|
|||
CLAMP(&steering, -80.0, 80.0);
|
||||
}
|
||||
|
||||
void
|
||||
FGControls::set_nose_wheel_steering( bool nws )
|
||||
{
|
||||
nose_wheel_steering = nws;
|
||||
}
|
||||
|
||||
void
|
||||
FGControls::move_steering( double angle )
|
||||
{
|
||||
|
|
|
@ -161,6 +161,7 @@ private:
|
|||
double copilot_brake_right;
|
||||
double brake_parking;
|
||||
double steering;
|
||||
bool nose_wheel_steering;
|
||||
bool gear_down;
|
||||
bool antiskid;
|
||||
bool tailhook;
|
||||
|
@ -346,6 +347,7 @@ public:
|
|||
inline double get_copilot_brake_right() const { return copilot_brake_right; }
|
||||
inline double get_brake_parking() const { return brake_parking; }
|
||||
inline double get_steering() const { return steering; }
|
||||
inline bool get_nose_wheel_steering() const { return nose_wheel_steering; }
|
||||
inline bool get_gear_down() const { return gear_down; }
|
||||
inline bool get_antiskid() const { return antiskid; }
|
||||
inline bool get_tailhook() const { return tailhook; }
|
||||
|
@ -533,6 +535,7 @@ public:
|
|||
void set_brake_parking( double pos );
|
||||
void set_steering( double pos );
|
||||
void move_steering( double amt );
|
||||
void set_nose_wheel_steering( bool nws );
|
||||
void set_gear_down( bool gear );
|
||||
void set_antiskid( bool val );
|
||||
void set_tailhook( bool val );
|
||||
|
|
Loading…
Reference in a new issue