1
0
Fork 0
fgdata/Nasal
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
..
canvas Gilberto Agostinho: 2015-12-30 17:13:18 +01:00
console Nasal REPL: integrate with Canvas keyboard 2014-11-28 09:29:28 -06:00
FailureMgr Bugfixes and improvements to the Failure Manager 2014-12-21 12:39:52 +01:00
jetways Fix elevation bug for jetways 2015-10-11 22:32:25 +02:00
jetways_edit Fix elevation bug for jetways 2015-10-11 22:32:25 +02:00
local_weather AW sets parameters for scattering phenomena 2015-12-21 13:49:23 +02:00
performance_monitor Close dialogs with Esc-key 2013-12-02 21:32:05 +01:00
std Nasal: std.Vector: add 'contains' method (by onox). 2014-12-23 14:40:29 +01:00
towing Hitch/aertow updates fro D-NXKT 2015-01-04 08:58:20 +00:00
tutorial Switch GUI to use new reposition command. 2014-03-05 16:46:10 +00:00
aircraft.nas Speed-up fix; now included in /sim/time/delta-sec 2016-01-05 23:25:55 -06:00
bits.nas string(): make zero padding work if arg is 0 2008-12-22 01:50:48 +00:00
checklist.nas Support <marker> and <page> tags in the conversion of checklists to tutorials. 2013-02-27 22:46:37 +00:00
contrail.nas Nasal/*.nas: named arguments 2013-10-20 13:07:09 -05:00
controls.nas Add condition axis as per issue 1249 2013-11-05 14:38:43 -06:00
debug.nas Nasal: respect color argument for debug._dump_prop 2014-06-21 12:09:34 +02:00
dynamic_view.nas revert init signal change -- better fix the real problem 2008-12-19 20:52:22 +00:00
earthview.nas Earthview loads only texture sheets actually used 2015-11-08 20:42:20 +02:00
environment.nas Change some Nasal logging to use logprint() 2015-06-08 10:33:31 +01:00
events.nas Bugfixes and improvements to the Failure Manager 2014-12-21 12:39:52 +01:00
fuel.nas #705: add sanity checks to fuel tank update 2012-04-22 15:19:20 +02:00
geo.nas Many MapStructure/NavDisplay updates 2014-04-28 21:39:00 -05:00
glide_slope_tunnel.nas fgdata/Nasal: avoid performance drop after sim reset/relocate 2012-03-20 21:18:20 +01:00
globals.nas Adds assert() for Nasal and fixes io.include internal marking 2014-06-06 21:41:10 -05:00
gui.nas Added possibility to specify position to gui.popupTip 2015-01-04 18:36:18 +01:00
io.nas Nasal: remove obsolete io.nas security 2015-11-22 11:22:22 +00:00
joystick.nas Fix nuking of property-scale's default factor by joystick-config dialog 2016-01-08 12:04:39 +01:00
lag_adjust.nas minor correction in lag_adjust.nas (mp patch) 2015-06-15 01:11:59 +02:00
material.nas Fix #1310 - typo in material.nas 2014-01-19 15:52:38 -06:00
math.nas Remove items implement natively in Nasal. 2013-10-03 17:42:20 +01:00
mp_broadcast.nas Nasal/mp_broadcast.nas: Handle joining/leaving the MP network at run time. 2013-02-03 19:27:35 +01:00
multikey.nas - let F12 pop up radio settings dialog (used to be Ctrl-r) 2008-10-08 21:59:31 +00:00
multiplayer.nas Close dialogs with Esc-key 2013-12-02 21:32:05 +01:00
prop_key_handler.nas Initial Nasal REPL work (canvas-based) 2014-04-18 16:49:11 -05:00
props.nas Add props.compileCondition to actually use exposed SGCondition. 2014-06-23 21:12:57 +02:00
redout.nas fgdata/Nasal: avoid performance drop after sim reset/relocate 2012-03-20 21:18:20 +01:00
route_manager.nas Procedures: be defensive about STAR/approach choice. 2015-01-10 19:38:29 +00:00
scenery.nas Nasal/scenery.nas: Handle joining/leaving the MP network at run time. 2013-02-03 19:27:47 +01:00
screen.nas Add ability to clear screen.window, and use it. 2014-01-12 19:52:30 +00:00
seaport.nas don't use printlog before nasal-dir-initialized 2010-10-13 20:46:31 +02:00
string.nas Nasal: remove obsolete io.nas security 2015-11-22 11:22:22 +00:00
tanker.nas Normalize angles for bearings on tanker. 2013-04-12 20:52:04 +01:00
track_target.nas Tomaskom writes: 2015-05-28 10:29:38 -05:00
view.nas Fix screen width compensation 2014-11-27 22:17:22 -06:00
weather_scenario.nas Correct use of getprop() so that --enable-real-weather-fetch works. 2012-06-12 11:09:50 +01:00
wildfire.nas GUI Cleanup from Michael HABARTA. Part 3/3 2015-05-03 17:13:50 +01:00