1
0
Fork 0
Commit graph

14215 commits

Author SHA1 Message Date
Ganael Laplanche
66e6afb449 Avoid crashing when udev_device_get_parent() returns a NULL pointer 2019-05-29 12:06:07 +02:00
James Turner
84c5ea976b Try to make UDev detection quieter 2019-05-28 09:14:49 -07:00
James Turner
396d9e4c3b Soften the HID dependency, so we can build
without HID if the necessary 3rdparty libs are not found.
2019-05-28 17:09:58 +01:00
James Turner
db8985fc76 Fix a typo on Windows 2019-05-27 17:47:24 +01:00
James Turner
bd2c524b21 HID input: more debug output 2019-05-27 16:06:27 +01:00
James Turner
d8b6fbfef0 macOS / DBus : avoid abort on startup
Don’t do the fgOSDisableScreensave DBus stuff on macOS - there is no
global DBus daemon configured by default.
2019-05-27 16:05:19 +01:00
James Turner
88a78dd314 Remove last hard-coded default airport ID
Neither Torsten nor I can recall why we continued to hard-code this,
so make it dynamic for now. When we remember why we hard-code it,
we can add a BigComment from future-James to future-future-James about
why not to do this again :)
2019-05-27 11:42:53 +01:00
James Turner
4ed410dc09 Adjust code for some older GCC versions
Implicit conversion from raw-pointer to std::unique_ptr<T> was failing,
use a stub replacement for std::make_unqiue to wrap this up cleanly.
2019-05-27 11:38:37 +01:00
James Turner
7738f33306 Adjust FindDBus to use imported targets
This is necessary on macOS where DBus is typically installed using
Homebrew, and hence we need additional linker flags to find the
library. Using the PkgConfig::DBUS imported target handles all this
transparently, but then we need to define an imported target for
Windows to work.
2019-05-27 11:37:35 +01:00
James Turner
59ec70dfea Default Swift to ON, adjust checks
Default Swift to on, and disable it if we fail to find DBus or
libEvent.
2019-05-24 11:57:01 +01:00
James Turner
c6feaafe2a Merge /u/fgarlin/flightgear-src/ branch next into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/164/
2019-05-22 12:54:52 +00:00
James Turner
50cd7d3253 Merge /u/ltoenning/flightgear_sim/ branch swift into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/161/
2019-05-22 12:50:57 +00:00
Fernando García Liñán
fa4ef2ab52 Added a property to indicate compositor support 2019-05-20 23:44:16 +02:00
Fernando García Liñán
b9e3ed67f0 Compositor: Fixed intersection checking for hotspots 2019-05-20 22:53:16 +02:00
Erik Hofman
8e2b2ff327 Add cstring 2019-05-20 14:17:36 +02:00
James Turner
4915b7d3a5 Merge /u/dancliff/flightgear/ branch fix_for_AI_radius into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/163/
2019-05-18 15:41:28 +00:00
Dan Wickstrom
c6e91d8751 Check for valid value when updating AI lod radius. 2019-05-18 11:30:37 -04:00
James Turner
910bd2c0fd Fix for sub-model initial offsets
The offset in body coordinates is needed by the FGAIBallistic in some
cases, restore this.
2019-05-18 16:20:31 +01:00
Dan Wickstrom
35c24ce5d4 Update radius of AI model after model data is loaded - prevents rendering artifacts at near/far camera boundary. 2019-05-18 07:10:40 -04:00
James Turner
2266c27930 Merge /u/legoboyvdlp/flightgear-src/ branch tcasPatch into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/162/
2019-05-17 09:03:52 +00:00
Lars Toenning
5a662d97fd Fix broken libevent/dbus cmake module 2019-05-17 10:19:38 +02:00
legoboyvdlp R
ee4f4a1273 TCAS: adjust property names to correct format 2019-05-17 08:48:26 +01:00
James Turner
955138d06e Avoid a crash on HID devices with no name. 2019-05-16 11:11:19 +02:00
Stuart Buchanan
5f2f72a4eb Fix AI Scenarios
Due to e43fe82094 models in AI scenarios were
being searched down the AI/Aircraft and Aircraft paths, where in fact
they are by default a full path from FGDATA.

This fixes the problem by setting DATA_ONLY as the search order.
Other search orders can be set in the scenario file by setting
the search-order tag to "DATA_ONLY", "PREFER_AI", "PREFER_DATA"
2019-05-15 21:09:49 +01:00
legoboyvdlp R
16b178a2d9 TCAS Instrument: add configuration options 2019-05-14 19:03:26 +01:00
James Turner
f159b98224 Fix some warnings from procedures loader 2019-05-13 14:41:28 +01:00
Bertrand Coconnier
b486273e0b [JSBSim] Add Windmilling flag
The flag allows to disable the windmilling of Turbine engines.
2019-05-08 16:39:26 +02:00
Bertrand Coconnier
0635380708 Restored humidity simulation in atmosphere.
Based on the dew point temperature supplied by FG, JSBSim updates the atmosphere density and computes all the usual parameters (RH, vapor pressure, saturated vapor pressure, etc.)

The mass fraction of water per unit of air mass is capped according to the record high from ISA 1976 standard atmosphere. As a consequence, at very high altitudes, air is always extremely dry (approx. 30 ppm i.e. 30 parts per million) whatever the conditions at sea level.
2019-05-08 16:11:06 +02:00
Bertrand Coconnier
c934348513 Remove the MSIS and Mars atmosphere files since they are not used. 2019-05-08 15:04:31 +02:00
Richard Harrison
50d4b37a7d Nasal timestamp - add elapsed uSec 2019-05-07 05:16:37 +02:00
Stuart Buchanan
1d1096d6f7 All start from parking position with no ground net
Fix for https://sourceforge.net/p/flightgear/codetickets/2125/

Previously, selecting a non-pushback parking position from the l
auncher that did not have a ground network resulted in the
aircraft being placed in the center of the airport.

This resolves the problem by creating a default segment simply
moving forward 2m.
2019-05-04 17:43:33 +01:00
Florent Rougon
df352346ad jsWindows: fail gracefully when joyGetDevCaps() returns undocumented values
According to Pfeffer's report[1] and many other messages on the
Internet, joyGetDevCaps() can return the (so far) undocumented value
165, which some say is JOYERR_PARMS. Since this is a valid return code
for joyGetPosEx() (not joyGetDevCaps()!), handle a few return codes from
that function too, and don't throw an exception when joyGetDevCaps()'s
return value is not one of the documented ones (we simply can't trust
its documentation).

[1] https://sourceforge.net/p/flightgear/mailman/message/36657149/
2019-05-04 08:58:15 +02:00
Richard Harrison
7db06300c0 Nasal binding for SGTimeStamp via maketimestamp
usage:

var timer = maketimestamp();

timer.stamp(); # start timing

print("elapsed ",timer.elapsedMSec(),"ms");
2019-05-02 07:31:37 +02:00
Lars Toenning
ff7db27cd1 swift: Add version number check 2019-04-30 10:35:30 +02:00
Lars Toenning
cea342a064 swift: Getting pressure altitude 2019-04-30 08:16:38 +02:00
Florent Rougon
a5792617f7 jsWindows: throw exception instead of using an assert
Since asserts can be compiled as no-ops, throw an exception rather than
doing assert(false), in case the code passed to
joyGetDevCaps_errorString() is not one of the expected values.
2019-04-30 08:14:35 +02:00
Florent Rougon
babf0ded0c jsWindows: add debug output
Every code path that causes a joystick to report notWorking() should now
have an associated error message logged with class 'input' at level
'debug' or higher.
2019-04-29 16:38:11 +02:00
Florent Rougon
8e0271d9f6 jsWindows: remove undefined behavior when joyGetNumDevs() > INT_MAX
If joyGetNumDevs() > INT_MAX, casting it to an 'int' leads to undefined
behavior. On the other hand, after the 'ident >= 0' test succeeded, it
is perfectly safe to use static_cast<unsigned int>(ident), since 'ident'
is of type 'int'. Then we get to compare two unsigned ints, which is
well defined.
2019-04-29 13:42:32 +02:00
Florent Rougon
9b019f6b72 FGJoystickInput: increase MAX_JOYSTICKS from 10 to 16
Since PLIBjs uses joyGetDevCaps()[1] on Windows and this function
accepts joystick ids from 0 to 15 (-1 being special), setting
MAX_JOYSTICKS to 16 ensures that FGJoystickInput::init() can scan all
joysticks that joyGetDevCaps() is able to report about.

[1] https://docs.microsoft.com/en-us/previous-versions/dd757105(v%3Dvs.85)
2019-04-29 12:54:03 +02:00
Richard Harrison
9121079cfe Disable time easing if ctrl key pressed. 2019-04-28 19:40:26 +02:00
Richard Harrison
1399640d79 Use OSG to find out the maximum supported texture size
The DDS Texture cache will auto resize textures that are larger than this value.
2019-04-28 19:40:26 +02:00
Richard Harrison
d3ce7adc95 NasalTimers; ensure unique name as this is required to identify the timer for certain operations (e.g. stop) 2019-04-28 19:40:26 +02:00
Richard Harrison
d2a179f1f3 Multiplayer: do not transmit the transmission-frequency-hz 2019-04-28 19:40:26 +02:00
James Turner
bac5d6c713 Windows: read Unicode command line
One more step in full Unicode support.
2019-04-27 18:54:13 +01:00
James Turner
9d71d09072 Enable HID-input on Windows 2019-04-27 18:54:13 +01:00
Bertrand Coconnier
3539b13985 Stricter syntax checking for JSBSim.
JSBSim was not checking the tag names inside <test> and <condition> statements and this has led to abusive use of tags unsupported by JSBSim such as <and> and <or>. The problem is that JSBSim was not interpreting the <or> statement as the user meant it: JSBSim interpreted it as <test logic="AND"> while the user obviously meant <test logic="OR">. As a result JSBSim silently swallowed the tag and gave results which were not was the user expected without any obvious indication about what was going wrong.

As a result, this commit implements stricter syntax checking and rejects illegal tags within <test> and <condition> statements.

This commit also introduces stricter checking on XML elements which allow either a real value or a property name to be used. JSBSim now rejects the statements where the property name is specified inside a <property> statement. For example, the follwoing statement is rejected:

<clipto>
  <min> <property> /fdm/jsbsim/some/property </property> </min>
...

The correct syntax being
<clipto>
  <min> /fdm/jsbsim/some/property </min>
2019-04-27 12:29:22 +02:00
Lars Toenning
aaa753d169 swift: Fixed wrong startup message 2019-04-26 09:37:37 +02:00
Lars Toenning
21124e7b7e swift: CMake adjustment 2019-04-26 09:37:17 +02:00
Florent Rougon
63f6d0b5bf Convert obsolete uses of get_filename_component(<var> <FileName> PATH)
In the context of get_filename_component(), PATH is a legacy alias for
DIRECTORY. Replace it with DIRECTORY, which is recommended[1] for
CMake versions > 2.8.11.

[1] https://cmake.org/cmake/help/latest/command/get_filename_component.html
2019-04-25 19:11:01 +02:00
Florent Rougon
b2d6acdd4d CMake changes related to FGDATA_SRC_DIR and TRANSLATIONS_SRC_DIR
- When FGDATA_SRC_DIR isn't explicitly set by the user, set it to
  ${PROJECT_SOURCE_DIR}/../fgdata if this is a directory.

- When TRANSLATIONS_SRC_DIR isn't explicitly set by the user, look for
  translations in ${FGDATA_SRC_DIR}/Translations instead of
  ${PROJECT_SOURCE_DIR}/../fgdata/Translations (i.e., honor the setting
  of FGDATA_SRC_DIR for the sake of translation lookup).

This fixes the problem explained in [1] and [2].

[1] https://sourceforge.net/p/flightgear/mailman/message/36645499/
[2] b2274fbbed/
2019-04-25 19:11:01 +02:00