]> git.mxchange.org Git - flightgear.git/commitdiff
Fix wrong throttle-position on init (trim)
authorTorsten Dreyer <Torsten@t3r.de>
Mon, 14 Feb 2011 20:01:48 +0000 (21:01 +0100)
committerTorsten Dreyer <Torsten@t3r.de>
Mon, 14 Feb 2011 20:01:48 +0000 (21:01 +0100)
src/FDM/JSBSim/JSBSim.cxx

index 1118902d654394d97b86981f9a5cf32c3b6f8475..c986cbdd92c21a1ff10abaadbfb2fffcaaf392c0 100644 (file)
@@ -1217,8 +1217,8 @@ void FGJSBsim::do_trim(void)
 
   globals->get_controls()->set_elevator_trim(FCS->GetPitchTrimCmd());
   globals->get_controls()->set_elevator(FCS->GetDeCmd());
-  globals->get_controls()->set_throttle(FGControls::ALL_ENGINES,
-  FCS->GetThrottleCmd(0));
+  for( unsigned i = 0; i < Propulsion->GetNumEngines(); i++ )
+    globals->get_controls()->set_throttle(i, FCS->GetThrottleCmd(i));
 
   globals->get_controls()->set_aileron(FCS->GetDaCmd());
   globals->get_controls()->set_rudder( FCS->GetDrCmd());