Board index FlightGear Development New features

New Throtle joystick config

Discussion and requests for new features. Please note that FlightGear developers are volunteers and may or may not be able to consider these requests.

New Throtle joystick config

Postby www2 » Sat Oct 05, 2019 3:58 am

Hi I working on an new layout for the "Joystick Axis Configuration" for Engines that make easy to setup That make easier to setup Throttle/Mixture/Propeller/Revercer settings for up to 10 Engines. (the limit is base on the Convair B-36D Peacemaker in the 6 turning 4 burning configuration with 6 prop and 4 jets Engines)

The screenshot shows how the new layout looks like:
Image
www2
 
Posts: 319
Joined: Thu Apr 16, 2009 2:58 pm
OS: Ubuntu

Re: New Throtle joystick config

Postby www2 » Sun Oct 06, 2019 12:52 am

Update 1
I have finish my work on the gui and i work now on the nasal code.
The current problem is that the that i can not add nasal code to the to the control input settings.

Code: Select all
var assignThrotleAxis = func(cmd) {
  var i = getprop("/sim/gui/dialogs/joystick-config/current-axis");
  var j = getprop("/sim/gui/dialogs/joystick-config/engine_select");
  if(j =="ALL"){
    j = "";
  }
  else{
    j = j-1;
  }
  nasalcmd = "print(\"hello world\");"; # test code for now that will be replace in in the near future.
  print(nasalcmd);
  setprop("/sim/gui/dialogs/joystick-config/axis[" ~ i ~ "]/binding", "nasal");
  setprop("/sim/gui/dialogs/joystick-config/nasal/original_script", nasalcmd);
  joystick.writeConfig();
  fgcommand("reinit", props.Node.new({"subsystem": "input"}));
  fgcommand("dialog-close", props.Node.new({"dialog-name": "button-axis-config"}));
  fgcommand("dialog-close", props.Node.new({"dialog-name": "joystick-config"}));
  fgcommand("dialog-show", props.Node.new({"dialog-name": "joystick-config"}));

}
www2
 
Posts: 319
Joined: Thu Apr 16, 2009 2:58 pm
OS: Ubuntu

Re: New Throtle joystick config

Postby www2 » Sun Oct 06, 2019 4:42 am

Update 2
Red haring.

I found out that i was on the wrong track was with my nasal code.
www2
 
Posts: 319
Joined: Thu Apr 16, 2009 2:58 pm
OS: Ubuntu

Re: New Throtle joystick config

Postby paju1986 » Thu Dec 12, 2019 3:32 pm

nice work, could you add the option of having modiffiers buttons so we can have button convinations for more controls? kinda like in DCS
paju1986
 
Posts: 246
Joined: Sun Oct 30, 2011 8:42 pm
Location: Badajoz (Spain) - LEBZ
OS: Arch Linux


Return to New features

Who is online

Users browsing this forum: No registered users and 4 guests