From 9156544566244e3e360f483071e3d1fccc7c453a Mon Sep 17 00:00:00 2001 From: david Date: Thu, 11 Apr 2002 17:11:22 +0000 Subject: [PATCH] Add support for /controls/parking-brake -- it effective overrides the individual braking commands for the main gear. --- src/FDM/JSBSim/JSBSim.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/FDM/JSBSim/JSBSim.cxx b/src/FDM/JSBSim/JSBSim.cxx index 39686f17c..fd8259f22 100644 --- a/src/FDM/JSBSim/JSBSim.cxx +++ b/src/FDM/JSBSim/JSBSim.cxx @@ -328,9 +328,14 @@ bool FGJSBsim::copy_to_JSBsim() { FCS->SetDfCmd( globals->get_controls()->get_flaps() ); FCS->SetDsbCmd( 0.0 ); //speedbrakes FCS->SetDspCmd( 0.0 ); //spoilers - FCS->SetLBrake( globals->get_controls()->get_brake( 0 ) ); - FCS->SetRBrake( globals->get_controls()->get_brake( 1 ) ); + + // Parking brake sets minimum braking + // level for mains. + double parking_brake = globals->get_controls()->get_parking_brake(); + FCS->SetLBrake(fmax(globals->get_controls()->get_brake(0), parking_brake)); + FCS->SetRBrake(fmax(globals->get_controls()->get_brake(1), parking_brake)); FCS->SetCBrake( globals->get_controls()->get_brake( 2 ) ); + FCS->SetGearCmd( globals->get_controls()->get_gear_down()); for (i = 0; i < Propulsion->GetNumEngines(); i++) { FGEngine * eng = Propulsion->GetEngine(i);