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 ),
|
copilot_brake_right( 0.0 ),
|
||||||
brake_parking( 0.0 ),
|
brake_parking( 0.0 ),
|
||||||
steering( 0.0 ),
|
steering( 0.0 ),
|
||||||
|
nose_wheel_steering( true ),
|
||||||
gear_down( true ),
|
gear_down( true ),
|
||||||
antiskid( true ),
|
antiskid( true ),
|
||||||
tailhook( false ),
|
tailhook( false ),
|
||||||
|
@ -157,6 +158,7 @@ void FGControls::reset_all()
|
||||||
set_fuel_selector( ALL_TANKS, true );
|
set_fuel_selector( ALL_TANKS, true );
|
||||||
dump_valve = false;
|
dump_valve = false;
|
||||||
steering = 0.0;
|
steering = 0.0;
|
||||||
|
nose_wheel_steering = true;
|
||||||
gear_down = true;
|
gear_down = true;
|
||||||
tailhook = false;
|
tailhook = false;
|
||||||
launchbar = false;
|
launchbar = false;
|
||||||
|
@ -468,6 +470,11 @@ FGControls::bind ()
|
||||||
&FGControls::get_steering, &FGControls::set_steering);
|
&FGControls::get_steering, &FGControls::set_steering);
|
||||||
fgSetArchivable("/controls/gear/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,
|
fgTie("/controls/gear/gear-down", this,
|
||||||
&FGControls::get_gear_down, &FGControls::set_gear_down);
|
&FGControls::get_gear_down, &FGControls::set_gear_down);
|
||||||
fgSetArchivable("/controls/gear/gear-down");
|
fgSetArchivable("/controls/gear/gear-down");
|
||||||
|
@ -915,7 +922,8 @@ void FGControls::unbind ()
|
||||||
fgUntie("/controls/gear/brake-right");
|
fgUntie("/controls/gear/brake-right");
|
||||||
fgUntie("/controls/gear/brake-parking");
|
fgUntie("/controls/gear/brake-parking");
|
||||||
fgUntie("/controls/gear/steering");
|
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/antiskid");
|
||||||
fgUntie("/controls/gear/tailhook");
|
fgUntie("/controls/gear/tailhook");
|
||||||
fgUntie("/controls/gear/launchbar");
|
fgUntie("/controls/gear/launchbar");
|
||||||
|
@ -1710,6 +1718,12 @@ FGControls::set_steering( double angle )
|
||||||
CLAMP(&steering, -80.0, 80.0);
|
CLAMP(&steering, -80.0, 80.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
FGControls::set_nose_wheel_steering( bool nws )
|
||||||
|
{
|
||||||
|
nose_wheel_steering = nws;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
FGControls::move_steering( double angle )
|
FGControls::move_steering( double angle )
|
||||||
{
|
{
|
||||||
|
|
|
@ -161,6 +161,7 @@ private:
|
||||||
double copilot_brake_right;
|
double copilot_brake_right;
|
||||||
double brake_parking;
|
double brake_parking;
|
||||||
double steering;
|
double steering;
|
||||||
|
bool nose_wheel_steering;
|
||||||
bool gear_down;
|
bool gear_down;
|
||||||
bool antiskid;
|
bool antiskid;
|
||||||
bool tailhook;
|
bool tailhook;
|
||||||
|
@ -346,6 +347,7 @@ public:
|
||||||
inline double get_copilot_brake_right() const { return copilot_brake_right; }
|
inline double get_copilot_brake_right() const { return copilot_brake_right; }
|
||||||
inline double get_brake_parking() const { return brake_parking; }
|
inline double get_brake_parking() const { return brake_parking; }
|
||||||
inline double get_steering() const { return steering; }
|
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_gear_down() const { return gear_down; }
|
||||||
inline bool get_antiskid() const { return antiskid; }
|
inline bool get_antiskid() const { return antiskid; }
|
||||||
inline bool get_tailhook() const { return tailhook; }
|
inline bool get_tailhook() const { return tailhook; }
|
||||||
|
@ -533,6 +535,7 @@ public:
|
||||||
void set_brake_parking( double pos );
|
void set_brake_parking( double pos );
|
||||||
void set_steering( double pos );
|
void set_steering( double pos );
|
||||||
void move_steering( double amt );
|
void move_steering( double amt );
|
||||||
|
void set_nose_wheel_steering( bool nws );
|
||||||
void set_gear_down( bool gear );
|
void set_gear_down( bool gear );
|
||||||
void set_antiskid( bool val );
|
void set_antiskid( bool val );
|
||||||
void set_tailhook( bool val );
|
void set_tailhook( bool val );
|
||||||
|
|
Loading…
Add table
Reference in a new issue