1
0
Fork 0
Commit graph

16100 commits

Author SHA1 Message Date
Roman Ludwicki
768d24fa17 Fix BOOL and BOOLEAN conflict name on Windows platform 2023-09-13 11:45:18 +01:00
James Turner
17c76b66bb Nasal: add nil tests for ?? 2023-09-12 22:39:34 +01:00
James Turner
bb34c0514a Remove user of in-place strutils::lowercase 2023-09-12 22:39:34 +01:00
Roman Ludwicki
f40eaa7531 Extend command line options
Values for options can be separated by both the "=" character (the old way) and a space.
The switch options enable/disable, now have a third variant with a main name that can take the values true/false, 1/0 or yes/no. E.g., in addition to the pair of options `--enable-fullscreen` and `--disable-fullscreen`, we now also have an option `--fullscreen`, which can be used with no value (the default is enable) or with true/false, 1/0 or yes/no.
All existing options work as before.
2023-09-12 22:39:34 +01:00
James Turner
da70e43d3d Fix new Clang compielr warnings
* returning bool from main
* set-but-unused variables
* mismatch of bitwise and logical 'or'
2023-09-12 21:34:55 +01:00
James Turner
e10d827918 GUI: add non-PUI menu-bar backend 2023-09-12 21:33:57 +01:00
James Turner
a7e8b682b7 GUI: catch malformed dialogs
* report a failure when the dialog fails to construct
* fail the command
2023-09-11 11:52:05 +01:00
James Turner
168373af8a tests: add empty-condition test-case 2023-09-11 11:50:59 +01:00
James Turner
6c949c30d3 Test case for re-alias-ing
* Ensure alias()ing an already alisaed node fails, but also ensure it
  doesn't deadlock.
2023-09-06 21:42:52 +01:00
James Turner
d569d72ea8 Nasal: tests for new operators
- test for nil-member-access
- test for chained nil
2023-09-06 21:23:59 +01:00
James Turner
402690d43f Submodel crash fix
- fix a crash I introduced, and remove redundant _trgger_node member
  variable as a side-effect.
2023-09-06 21:23:05 +01:00
James Turner
1e6a4f8a99 Fix compilation of tests 2023-09-05 10:22:31 +01:00
TheFGFSEagle
60d5bba0c5 Move InputValue class into SimGear 2023-09-04 21:06:17 +01:00
James Turner
0f291ff417 Canvas: expose KeyBindings to Nasal 2023-08-30 16:29:37 +02:00
James Turner
5e1450c278 Fix build on non-Clang 2023-08-25 14:36:20 +01:00
James Turner
0f68b19648 Format-only fixes from previous commit, oops. 2023-08-25 12:30:35 +01:00
James Turner
8060051fc5 Props protocol: check args to seti/setd/setf
Fix a crash when passing incorrect number of arguments to
various telnet methods; check the number of tokens and
report an error if not as expected.

Also fix the file-name to avoid collison with the SGPropertyNode
implementation file

SF-ID: https://sourceforge.net/p/flightgear/codetickets/2823/
2023-08-25 12:23:16 +01:00
James Turner
56876e486f SGBinding: allow Nasal function bindings
Allow wrapping of a naFunc as a custom binding class, without
the need to create a proxy command in the global command
manager.

Requires corresponding SG commit.
2023-08-25 12:06:53 +01:00
Roman Ludwicki
1902a67611 Parametrize development years in Launcher 2023-08-16 10:01:27 +01:00
James Turner
9fcb9206f9 Improve errors around 2D panels 2023-08-12 13:08:20 +01:00
James Turner
128143fd9b 2D panels: improve error messages for missing textures
Check for a failed path resolve in FGTextrueManager, and report this
explicitly with the input path, to give the user some idea what is
going on.

Thanks to Huntely Palmer for the suggestion.

SF-ID: https://sourceforge.net/p/flightgear/codetickets/2820/
2023-08-12 12:58:36 +01:00
Roman Ludwicki
b97dcae5f0 Fix segfault when using --fgviewer command line option 2023-08-12 12:47:30 +01:00
James Turner
49e8967174 prop indirection on property-adjust, multiply
Make the min, max and factor arguments to propert-adjust
 and property-multiply optonally use a -prop version to
 read a value from the global property tree.
2023-08-12 12:46:52 +01:00
James Turner
fcc112c780 Add temperature calculation for ISA METAR scenario
Required commit in fgdata branch for ISA METAR scenario
2023-07-25 15:03:06 +01:00
James Turner
c54fba1095 AP: fix erroneous warning with Monostable FlipFlip
Add a unit-test written by Huntely, and extend the AP configure code, so the
'time' config of monostables doesn't trigger an incorrect warning in the
console / logs.

Thanks to Huntley Palmer for pointing this out.

SF-ID: https://sourceforge.net/p/flightgear/codetickets/2812/
2023-07-25 11:39:11 +01:00
Julian Smith
87029295c1 src/FDM/YASim/: added optional quadratic term spring2 to gear spring equation.
In YASim XML <gear>, `spring2` is a new dimensionless term. Default
value zero is backwards compatible. The new spring force equation is:

    force = _spring * compression * (_frac + spring2 * _frac**2)

This is intended to help with
https://sourceforge.net/p/flightgear/codetickets/1509.
2023-07-22 22:20:03 +01:00
James Turner
4fbea9871d Disablw GPS SWIFT8 test for now 2023-07-21 16:33:48 +01:00
James Turner
3ac7673236 Tests: fix compilation 2023-07-21 16:33:48 +01:00
James Turner
26530e27ea Fix DME unit-test: set correct power supply 2023-07-21 16:33:48 +01:00
James Turner
3535c6da7d Revert "YASim gear: Clamping of _frac replaced"
This is causing simulator hangs at BIKF, likely due to previously
tolerated scenery data now triggering very large gear forces.

This reverts commit 6df2904f75.
2023-07-21 10:15:13 +01:00
Florent Rougon
351ca111ad NavData: don't load XML extension files from unsuitable scenery paths
Add a 'scenery_path' field to the 'airport' table of the SQLite
NavDataCache database. For each airport, this field indicates the
scenery realpath() that contributed the apt.dat file for the airport (as
an exception, for airports whose apt.dat file is
$FG_ROOT/Airports/apt.dat.gz, the path thus stored is for now $FG_ROOT,
which is technically not a scenery path). This path is then made
available via FGAirport::sceneryPath(), which allows us to implement the
following change (in this commit):

A) The lookup of *.procedures.xml is unchanged.

B) For other XML extension files (groundnet, ils, runway_rename,
   threshold, twr):

 - The search performed by XMLLoader::findAirportData() through
   globals->get_fg_scenery() stops immediately after the scenery path p
   that contributed the apt.dat file for the airport.

 - Paths that come earlier than p in globals->get_fg_scenery() order may
   contain XML extension files that will *override* sibling files that
   might exist in p (as was already the case before this commit).

The rationale behind this change is that we don't want a custom scenery
with good data in its NavData folder regarding airport FOO to get
"ruined" by files such as FOO.threshold.xml present in the TerraSync
directory---which is assumed to come later in globals->get_fg_scenery()
order.

*.procedures.xml files are excluded from the change because there is a
widespread use of a huge set of procedure files for the whole world; if
airport FOO in a custom scenery has no procedure files, we do want to
let FlightGear find FOO.procedures.xml inside the scenery path
containing the huge dataset (which should come *after* custom sceneries
in globals->get_fg_scenery() order so as to give these custom sceneries
the option to provide better *.procedures.xml files and have them take
precedence over less specialized sources such as the huge dataset).

Reference discussion: https://sourceforge.net/p/flightgear/mailman/flightgear-devel/thread/CAKor_THrQCiS1ES_ENSrmn1j3s39dX0qQXSbYBUz6yuokse_pQ%40mail.gmail.com/#msg37860751
2023-07-20 22:07:43 +02:00
Julian Smith
a207cdd207 src/Main/fg_props.cxx: fix segv with --enable-freeze.
The problem was that FGProperties::bind()'s call of
tiedProperties.Tie("/sim/freeze/master", ..., &FGProperties::setFreeze)
was calling FGProperties::setFreeze(true) before it returned, but we
were only setting _simFreezeNode *after* tiedProperties.Tie() had
returned.

tiedProperties.Tie() simply returns the node that it was given as its
first arg, so we simply sets _simFreezeNode to the value it would have
taken later, before calling tiedProperties.Tie().
2023-07-18 10:53:54 +01:00
James Turner
5cf6e4c263 (legacy) NavRadio: set default power path to nav[0]
Ensure the default power path for all nav-radios is the power
output for nav[0], to avoid nav[1] being unpowered in some
cases.

SF-ID: https://sourceforge.net/p/flightgear/codetickets/2811/
2023-06-15 13:02:45 +01:00
Simon
01fb8faf3e Launcher: center selection highlight in aircraft selection 2023-06-15 10:27:58 +01:00
Jakub Kákona
6df2904f75 YASim gear: Clamping of _frac replaced
Instead use a a steep force increase

Implement Ticket https://sourceforge.net/p/flightgear/codetickets/1509/
2023-06-13 12:09:09 +01:00
James Turner
d3d4a8615a Build with revised SGPropertyNode alias() API 2023-06-13 11:37:45 +01:00
James Turner
760fe3eee7 Improve handling of malformed threshold.xml files
Needs a corresponding Simgear update

SF-ID: https://sourceforge.net/p/flightgear/codetickets/2810/
2023-06-12 14:24:23 +01:00
James Turner
2580ab9996 Make /sim/time/gmt and freeze listener-safe
- record time values to only change time propertes when
actually modified
- fire listeners manually on the tied properties (gmt and gmt-string)
- make /sim/freeze/master listenable
2023-06-12 14:24:22 +01:00
scttgs0
a9968f86af Maintenance: TrafficMgr
header guard.
explicit ctor.
virtual dtor.
remove dead code.
reduce variable scope.
++prefix for complex types.
eliminate variable shadowing of outer scope.
spelling.
2023-05-26 21:24:32 -05:00
scttgs0
98295c2728 Maintenance: Schedule
header guard.
replace macros with constexpr.
compareSchedules moved to a static member.
ctor initialization moved to intializer-list.
string prefix via substr() changed to resize().
++prefix for complex types.
spelling.
2023-05-26 20:32:26 -05:00
scttgs0
b6b398b4c6 Maintenance: SchedFlight
header guard.
compareScheduledFlights() moved to a static member with const parameters.
ctor initialization moved to intializer-list.
replace NULL with nullptr.
spelling.
2023-05-26 19:48:12 -05:00
scttgs0
e25f1c5ff1 Maintenance: atc_mgr
remove obsolete code.
spelling.
2023-05-26 09:36:45 -05:00
scttgs0
fb3c12cbb0 Maintenance: TowerController
++prefix for complex types.
eliminate variable shadowing of the outer scope.
spelling.
2023-05-26 09:32:38 -05:00
scttgs0
2c986a8048 Maintenance: StartupController
eliminate unused variable.
++prefix for complex types.
spelling.
2023-05-26 09:23:34 -05:00
scttgs0
3b5e7ad935 Maintenance: GroundController
reduce variable scope.
++prefix for complex types.
eliminate variable shadowing of outer scope.
2023-05-26 09:19:00 -05:00
scttgs0
48c6afea53 Maintenance: trafficcontrol
setCallsign parameter changed to const&.
member variable initialization.
reduce variable scope.
++prefix for complex types.
spelling.
2023-05-25 01:05:34 -05:00
scttgs0
3ddfff59da Maintenance: ATIS Encoder and Information Providers
add const override to virtual functions.
explicit ctor.
2023-05-25 00:18:04 -05:00
scttgs0
2d3dfc2c0b Maintenance: ApproachController
++prefix for complex types.
2023-05-24 23:31:46 -05:00
scttgs0
f15e1346be Maintenance: ATISEncoder
member variable initialization.
spelling.
2023-05-24 23:31:12 -05:00
scttgs0
708eb252da Maintenance: ATCController
Fix REPORT_RUNWAY_HOLD_SHORT
2023-05-24 23:18:16 -05:00