dump_valve( false ),
brake_left( 0.0 ),
brake_right( 0.0 ),
+ copilot_brake_left( 0.0 ),
+ copilot_brake_right( 0.0 ),
brake_parking( 0.0 ),
steering( 0.0 ),
gear_down( true ),
condition[engine] = 1.0;
}
- brake_left = brake_right = brake_parking = 0.0;
+ brake_left = brake_right
+ = copilot_brake_left = copilot_brake_right
+ = brake_parking = 0.0;
for ( int wheel = 0; wheel < MAX_WHEELS; wheel++ ) {
alternate_extension[wheel] = false;
}
&FGControls::set_brake_right);
fgSetArchivable("/controls/gear/brake-right");
+ fgTie("/controls/gear/copilot-brake-left", this,
+ &FGControls::get_copilot_brake_left,
+ &FGControls::set_copilot_brake_left);
+ fgSetArchivable("/controls/gear/copilot-brake-left");
+
+ fgTie("/controls/gear/copilot-brake-right", this,
+ &FGControls::get_copilot_brake_right,
+ &FGControls::set_copilot_brake_right);
+ fgSetArchivable("/controls/gear/copilot-brake-right");
+
fgTie("/controls/gear/brake-parking", this,
&FGControls::get_brake_parking,
&FGControls::set_brake_parking);
CLAMP( &brake_right, 0.0, 1.0 );
}
+void
+FGControls::set_copilot_brake_left( double pos )
+{
+ copilot_brake_left = pos;
+ CLAMP(&brake_left, 0.0, 1.0);
+}
+
+void
+FGControls::set_copilot_brake_right( double pos )
+{
+ copilot_brake_right = pos;
+ CLAMP(&brake_right, 0.0, 1.0);
+}
+
void
FGControls::set_brake_parking( double pos )
{
// controls/gear/
double brake_left;
double brake_right;
+ double copilot_brake_left;
+ double copilot_brake_right;
double brake_parking;
double steering;
bool gear_down;
// controls/gear/
inline double get_brake_left() const { return brake_left; }
inline double get_brake_right() const { return brake_right; }
+ inline double get_copilot_brake_left() const { return copilot_brake_left; }
+ 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_gear_down() const { return gear_down; }
void move_brake_left( double amt );
void set_brake_right( double pos );
void move_brake_right( double amt );
+ void set_copilot_brake_left( double pos );
+ void set_copilot_brake_right( double pos );
void set_brake_parking( double pos );
void set_steering( double pos );
void move_steering( double amt );
node = fgGetNode("/controls/gear", true);
net->brake_left = node->getChild("brake-left")->getDoubleValue();
net->brake_right = node->getChild("brake-right")->getDoubleValue();
+ net->copilot_brake_left
+ = node->getChild("copilot-brake-left")->getDoubleValue();
+ net->copilot_brake_right
+ = node->getChild("copilot-brake-right")->getDoubleValue();
net->brake_parking = node->getChild("brake-parking")->getDoubleValue();
net->gear_handle = fgGetBool( "controls/gear/gear-down" );
net->num_tanks = htonl(net->num_tanks);
htond(net->brake_left);
htond(net->brake_right);
+ htond(net->copilot_brake_left);
+ htond(net->copilot_brake_right);
htond(net->brake_parking);
net->gear_handle = htonl(net->gear_handle);
net->master_avionics = htonl(net->master_avionics);
}
htond(net->brake_left);
htond(net->brake_right);
+ htond(net->copilot_brake_left);
+ htond(net->copilot_brake_right);
htond(net->brake_parking);
net->gear_handle = htonl(net->gear_handle);
net->master_avionics = htonl(net->master_avionics);
if ( node != NULL ) {
node->getChild( "brake-left" )->setDoubleValue( net->brake_left );
node->getChild( "brake-right" )->setDoubleValue( net->brake_right );
+ node->getChild( "copilot-brake-left" )
+ ->setDoubleValue( net->copilot_brake_left );
+ node->getChild( "copilot-brake-right" )
+ ->setDoubleValue( net->copilot_brake_right );
node->getChild( "brake-parking" )->setDoubleValue( net->brake_parking );
}
# error This library requires C++
#endif
-const int FG_NET_CTRLS_VERSION = 22;
+const int FG_NET_CTRLS_VERSION = 23;
// Define a structure containing the control parameters
// Brake controls
double brake_left;
double brake_right;
+ double copilot_brake_left;
+ double copilot_brake_right;
double brake_parking;
// Landing Gear