1
0
Fork 0
Commit graph

15977 commits

Author SHA1 Message Date
James Turner
2342ad49b5 Use new SGPickCallback drag option
Patch from Colin Geniet, optimise performance of dragging on
most objects which don't need picked position for each drag.
2023-02-28 11:01:28 +00:00
Erik Hofman
2401232969 Parse the path of fgdata to Canvas 2023-02-26 10:29:30 +01:00
Erik Hofman
098300bb51 Use mmapping when reading Nasal scripts saving two memory copies out of for (copy from disk to the i/o buffer, copy from the i/o buffer tot the ifstream, copy from the ifstreamto a string and copy from a string to Nasal). 2023-02-25 10:03:03 +01:00
Stuart Buchanan
d00c95f0e8 Fix fgelev - don't flatten WS2.0 tiles. 2023-02-23 19:50:43 +00:00
James Turner
9a4bfaed0f Clang: remove obsolete libc++ linkage flag 2023-02-20 09:52:55 +00:00
portree_kid
a2b10c1ee3 AI Flightplan Leg 4 departure curve 2023-02-08 19:37:33 +01:00
Stuart Buchanan
ac8c5386a9 Default loading threads to 4 with 0 HTTP-dedicated 2023-01-30 23:03:58 +00:00
Stuart Buchanan
af8f71db40 WS30 - Autogenerate 70% of earth surface
Generate Ocean tiles where no scenery is available.

As a side-effect, this also fixes bug which caused
sim to hang if unable to find WS3.0 scenery at
starting location.
2023-01-29 21:50:04 +00:00
Stuart Buchanan
aae2d5d095 WS3.0 : Fix fgelev by forcing load of detailed LoD
Previously the BVH tree used by fgelev did not load the
lowest LOD tiles in WS3.0 resulting in incorrec elevation
values being returned.

This changes forces the BVH tree to flatten and load all
the nodes of the tree.
2023-01-29 21:19:56 +00:00
portree_kid
78797e28aa AI Fixes
* Better runway exit
* Bug in approach
* Test east/west approach downwind
2023-01-28 20:48:11 +01:00
Erik Hofman
20fc979a52 Move more code to C++, use SGPath and SGMMapFile to map the Nasal file instead of copying it. 2023-01-24 09:50:54 +01:00
Florent Rougon
7ddb78a648 Nasal standalone interpreter: make SGPath::validate() accept everything
Allow the standalone Nasal interpreter to read and write files or
directories everywhere, as long as permitted by the operating system.
2023-01-23 18:20:51 +01:00
Erik Hofman
484f1da20e Fix the build for systems without a system wide sqlite lubrary 2023-01-23 15:35:24 +01:00
Erik Hofman
f492f9bf6e sqlite_open_v2 requires sqlite3_close_v2 (I think, not really clear). 2023-01-23 14:50:51 +01:00
Erik Hofman
446cf2eb05 Run the SQLite path through the path validation mechanism 2023-01-23 11:52:17 +01:00
Erik Hofman
e3fd08dd82 Add SQLite support to Nasal and copy the nasal-bin utility over from SimGear, make it C++11 and add it as an installable nasal interpreter for standalone testing and debugging of local nasal scripts. 2023-01-23 09:53:07 +01:00
James Turner
98958af2a3 GUI: add explicit close hook to FGDialog
Allow triggering close of dialogs explicitly, rather than relying on
ref-count drop to delete them. Compat dialogs have a Nasal peer and
we can't rely on GC to cause a timely close of the dialog.
2023-01-20 16:08:54 +00:00
Florent Rougon
437ebfd272 nasal_api_doc.py: encoding fixes (mostly)
This allows the script to run fine again (we assume UTF-8 encoding for
the parsed Nasal files). Thanks to Huntley Palmer for the report and a
patch. Fixes: https://sourceforge.net/p/flightgear/codetickets/2788/
2023-01-19 17:28:14 +01:00
James Turner
029ce8f0df WS3: add tags+breadcrumbs for Sentry
Record some key values to help understand differing WS3 performance
results by some testers, and add a tag when WS3 is enabled.
2023-01-16 11:07:56 +00:00
Erik Hofman
c872b8b4b2 CycloneDDS aparrently stopped supporting booleans 2023-01-15 14:32:42 +01:00
James Turner
2be54f9eae PUICompat: fix default value in configValue() 2023-01-11 11:45:01 +00:00
James Turner
de40779109 Canvas: Expose raw image dimensions to Nasal 2023-01-10 14:18:19 +00:00
James Turner
f463a0405e Fix some dumb paths in the code
Replace hard-coded path to my desktop with calls to
SGPath::desktop() helper
2023-01-10 10:34:14 +00:00
James Turner
016e1c89bc CMake: avoid invoking Git in Dev builds
Avoid running FindGit and git process on every build, when in Developer
mode: this feature is only useful for CI builds, and remove it makes
the edit-and-debug cycle slightly faster. This means buildId.h contains
dummy values when FG_BUILD_TYPE=Dev
2023-01-09 15:07:03 +00:00
James Turner
36df4c38de More snprintf conversions 2023-01-09 15:04:07 +00:00
James Turner
01b93cb8a0 Sprintf: make buffer size explicit in replay 2023-01-09 12:55:31 +00:00
James Turner
0f71686388 Another sprintf fix in PVE protocol this time 2023-01-09 10:57:21 +00:00
James Turner
f7b0b77abb PU.h sprintf fixing
Adjust our customised pu.h to use snprintf, with correct buffer
size information. Also adjust includes so our custom version is used, ]
even when including the system puAux.h.
2023-01-09 10:55:58 +00:00
James Turner
048cb38cd0 Supress a warning building Flite 2023-01-09 10:36:18 +00:00
James Turner
dc467ebdfa Cmake Improve Finder for CppUnit
Define an imported target for the system CppUnit, so we can
correctly pass includes locations to FgfsTestSuite
2023-01-08 19:36:44 +00:00
James Turner
4c42600898 Sprintf to snprintf fixes
Reduce warning from Clang about use of sprintf.
2023-01-08 19:36:44 +00:00
James Turner
0fbe3547fb Nasal: test for hash creation from kw args 2023-01-08 19:36:44 +00:00
James Turner
3b36379c5c Nasal: improve module delete/reload
Allow modules to define an unload callback, and also drive
the 'loaded' property to false, to give modules the ability to clean
up when being unloaded. This makes reloading work without
errors for Canvas.

Additionaally, add some special code when creating the
Canvas module, to ensure the C++ defined pieces are loaded :
fortunately Canvas is the only module which needs this.
2023-01-06 10:41:01 +00:00
James Turner
3f742c1b1d Expose new Canvas methods to Nasal
Requires corresponding SimGear update
2023-01-05 14:06:46 +00:00
James Turner
fc842c17f0 Canvas: LayoutItem.setVisible can be chained
Wrap LayoutItem::setVisible so it returns self, and hence can be chained,
similar to methods implemented in Nasal.
2023-01-04 15:22:24 +00:00
James Turner
1b07851374 Canvas Layout: check arguments to add/insertItem
When the ItemRef argument is null, report a runtime error
instead of crashing.
2023-01-04 14:16:24 +00:00
D-ECHO
1889045891 YASim Hitch: correct typo brake to break 2023-01-04 10:58:37 +00:00
Roman Ludwicki
56aa2cd479 Prevent from closing the simulator just because it can't write to the logger file 2023-01-03 11:13:48 +00:00
portree_kid
3667e5de3c AI/ATC
* Added Messages for Takeoff
* Added Messages for Hold & Holdpatterns
* More enums instead of Magic Numbers
2022-12-29 22:21:23 +01:00
Gianfranco Costamagna
11eca7825d Fix build on riscv64 by using atomic int instead of atomic bool.
gcc on riscv64 is not able to compile natively atomic int, because of hw constraints, leading
to an additional to link external atomic libraries, making the code really slower to run.

Instead, using std::atomic<int> can be compiled and optimized natively without any additional -latomic linking.
2022-12-11 08:48:15 +01:00
portree_kid
097603452e Merge branch 'next' of ssh://git.code.sf.net/p/flightgear/flightgear into next 2022-12-03 21:48:42 +01:00
James Turner
e08eee587d Route-manager: is expose is-route property for UI 2022-12-02 12:22:15 +00:00
James Turner
78e6a209f1 Add some missing cases to Nasal FlightPlan binding
Expose 'between' restrictions as a 2-tuple.
2022-12-02 12:22:15 +00:00
Stuart Buchanan
56996cc01a WS30 - Clear WS30 data on tile unload
Previously WS30 data from STG files - in particular road/rail/river
data - was kept permanently.

This change unloads it with the STG-level tile.  This is the right
level to do so, as it will be reloaded from tile when the STG file
is loaded again.
2022-12-01 16:43:23 +00:00
Stuart Buchanan
ebe511439a Control number of database pager threads from prop
Previously we were hardcoded to 2 database pager threads,
one for files and one for http.

This commit adds a new property /sim/rendering/database-pager/threads
to control the number of threads on startup.

It also re-orders the code to set the database pager so that such
a setting has an effect.
2022-12-01 16:39:50 +00:00
James Turner
ff5752d1dd Mark time test as passing, with updated TZ data
Requires FGData commit  844c24a085b6f065a1d6c
2022-12-01 09:31:12 +00:00
Erik Hofman
bc3e80b2cb Sascha Reißner
Change all constant numeric values with the defined constant.
Changed the wrong '*offset-m' properties and the 'rollspeed-ms' property.

Maybe the wrong offset properties hasnt popped up because no dev used
it. This value will not be used in any animation because its normally a
fixed value that doesnt change at runtime.
2022-12-01 08:40:24 +01:00
James Turner
5800143b96 Add test case for SGTime::updateLocal crash
SF-ID: https://sourceforge.net/p/flightgear/codetickets/2780/
2022-11-30 14:13:35 +00:00
Erik Hofman
2c0b3d20a2 Sascha Reißner
With this patch, the dev can set <max-compression-ft> or <max-compression-m> in the set-file (or another
xml-file that get included from the set-file).
The code calculates also 'compression-m' for every gear.
If the 'max-compression-*' property is omitted, the code behave as before ('compression-norm' is the same as 'compression-ft').
2022-11-30 08:43:10 +01:00
Edward d'Auvergne
c8e7a019f5 Revert "SGSubsystemMgr: Switch to the new add() function with a single subsystem object argument."
This reverts commit 30d63b7209.
2022-11-29 22:23:34 +01:00