1
0
Fork 0
Commit graph

19 commits

Author SHA1 Message Date
Richard Harrison
5f1784937e Added Joystick Sensitivity Reduction to dialog.
This allows the setting of the <power> tag - which in turn will decreases the sensitivity around the zero position
2020-04-09 23:56:37 +02:00
Richard Harrison
2a748fdc70 Add thrust reverser to joystick bindings.
This can either be a button (which toggles) or an axis (variable)
2019-05-01 13:43:16 +02:00
Richard Harrison
4c6b103293 Add support for FGCom multiple radio support
PTT now in

/controls/radios/comm-ptt as an int; non zero indicates which comm radio to use

/comm-radio-selected is the default comm channel to use. This should usually be the same as will be set by PTT into /controls/radios/comm-ptt

NOTE: that PTT will switch the FG comm inbound and outbound frequency to whichever radio was PTT'd.
2019-03-19 21:16:33 +01:00
Stuart Buchanan
3b92497769 Joystick Config fixes from Ron HAERTEL 2019-01-06 20:48:47 +00:00
Richard Harrison
939887cca1 Joystick bindings: fix confusions over trigger and pickle.
Trigger sets /controls/armament/trigger - typically for a gun, but can be used (model side) to launch anything

Pick sets /controls/armament/pickle - typically to release something (e.g. missiles), but could be bound model side to act as a trigger.
2018-09-16 17:37:25 +02:00
Richard Harrison
2322d0dbe8 Joystick binding changes;
- added extra bindings
- reworked the view axis (usually bound to the hat); to move at a better rate.
- trim to elevator position. When selected this will remember the current position and when the joystick is centered it will apply this as the trim. Very useful for carrier approaches; and also it helps to do something that is much easier with loaded controls when you can feel the pressure being reduced by the operations of the trim switch
2018-07-28 00:39:22 +02:00
Richard Harrison
d7a9b36c08 Joystick dialog changes
- Engines control now use the same axis methods as the flight controls; which allows for these to have an inverted checkbox.

- Change the axis combo boxes to instead show a popup dialog (much like the button config). This is better because the items can be grouped sensibly.

- Changed the way that the "all engines" controls work - the dialog binds these to a "engines/XXXX-all" for which there is a listener in controls.nas which propogates over all engines.

- Added extra bindings to both the buttons and the axis dialogs.

- moved the "None" button to the bottom and renamed it to the more comprehensible "Remove assignment"
2018-02-16 19:35:50 +01:00
Stuart Buchanan
5c62d4663c Add Joystick Config dialog for individual engines 2017-04-20 21:06:42 +01:00
Stuart Buchanan
221235063b Add button bindings for engine to joystick config
At the suggestion of Gilberto AGOSTINHO, add
button bindings for throttle, mixture and prop
to the joystick configuration dialog.

Specific use-case is users of game-pads, but also
useful to users with a single throttle axis on their
joystick.
2016-02-10 22:21:18 +00:00
Florent Rougon
2cf6cf4a93 joystick.PropertyScaleAxis.parse(): copy the property name too
- Since joystick.PropertyScaleAxis instances have a 'prop' attribute
  indicating the property name, it seems logical to have
  joystick.PropertyScaleAxis.parse() set this attribute based on the
  property name in its argument ('p').

- This commit also tries to improve readability by using a 'bindingNode'
  variable instead of repeatedly calling 'p.getNode("binding", 1)'.
2016-01-09 07:56:47 +01:00
Florent Rougon
769a83e64f joystick.PropertyScaleAxis.parse(): always copy 'factor' and 'inverted'
- Commit 5bcf58c7d6 forgot to set the
  'inverted' attribute when there was no 'factor' node in the argument's
  'binding' node. Fix this.

- Also copy the argument's 'factor' value to the 'factor' instance
  attribute for consistency, since joystick.PropertyScaleAxis instances
  have such an attribute initialized in the constructor.
2016-01-09 07:35:23 +01:00
Florent Rougon
703639ec68 Remove inappropriate 'deadband' attribute from joystick.PropertyScaleAxis
As far as I can tell, the dead-band setting belongs to <axis> nodes, not
to <binding> nodes using property-scale. This can be seen in
do_property_scale()'s definition (flightgear/src/Main/fg_commands.cxx)
as well as in fgdata/Docs/README.Joystick.html.

joystick.PropertyScaleAxis creates <dead-band> nodes as children of
<binding> nodes in generated joystick binding files under
$FG_HOME/Input/Joysticks which, AFAICT, are completely useless and thus
confusing. The <dead-band> nodes should be created at a different level
to be effective (cf. FGJoystickInput::postinit() in
flightgear/src/Input/FGJoystickInput.cxx).

This commit removes the 'deadband' attribute from
joystick.PropertyScaleAxis, since it has nothing to do there IMHO.
2016-01-08 15:45:58 +01:00
Florent Rougon
5bcf58c7d6 Fix nuking of property-scale's default factor by joystick-config dialog
As can be seen in do_property_scale()'s definition in
flightgear/src/Main/fg_commands.cxx, property-scale rightfully uses a
default factor of 1.0. However, if a joystick axis' property-scale
binding has no 'factor' node defined, and one opens the joystick
configuration dialog, then PropertyScaleAxis.parse() creates an empty
'factor' node that implicitely gets a value of 0. This method is called
by joystick.readConfig() when the joystick-config dialog is opened. This
has the effect of rendering the corresponding joystick axis inoperant.

How to reproduce the bug:
  - take a joystick such as the SAITEK CYBORG 3D USB, with its default
    binding file from
    fgdata/Input/Joysticks/Saitek/Cyborg-Gold-3d-USB.xml (this file uses
    property-scale for the aileron, with no explicitely defined factor);
  - start FlightGear; move the joystick left or right while looking at
    the plane wings -> the ailerons move, it works fine;
  - now, open the joystick-config dialog and do the same test -> the
    ailerons don't move anymore and the 'Aileron' value at the bottom of
    the dialog stays at 0 (0.0 or -0.0...). Just opening the dialog to
    test the joystick has "corrupted" its setup! This is very confusing
    for users.

This fix corrects the problem by avoiding the apparently unneeded
creation of an empty 'factor' node when there is none inside the
<binding>. An alternative would be to create a 'factor' node with value
1.0. In any case, if someone later expands the joystick-config dialog to
allow modification of property-scale's factor, he should make sure to
use a default value of 1.0!
2016-01-08 12:04:39 +01:00
Clément de l'Hamaide
6ca29b6fe9 Fix controls.ptt(-1) to controls.ptt(0) in Nasal/joystick.nas 2013-09-24 13:29:37 +02:00
Stuart Buchanan
fd4e61869b Add support for <nasal> blocks in the joystick nasal config library. 2013-04-12 20:24:53 +01:00
Stuart Buchanan
abcfc2073b Allow users to reset their joystick configuration from the Joystick Configuration dialog. 2012-12-07 22:42:18 +00:00
Stuart Buchanan
3656ff92c6 Fix bug where last axis of the joystick was written out with the original bindings of all buttons. 2012-09-29 21:24:12 +01:00
Stuart Buchanan
7a3d5dd0bf Updates to the Joystick Configuration dialog. 2012-08-26 21:48:53 +01:00
Stuart Buchanan
4a70a703a8 Add Joystick Configuration dialog, allowing in-sim configuration of joysticks. 2012-08-24 22:53:21 +01:00