1
0
Fork 0
Commit graph

10679 commits

Author SHA1 Message Date
Bertrand Coconnier
2fe0137e92 [JSBSim] Fixed a actuator SEGFAULT when triggering "hardover" without specifying <clipto>. 2019-07-24 23:15:40 +02:00
Julian Smith
f666a551b3 src/Viewer/view.cxx: Fix bad initialisation of SGVec3d's.
SGVec3d's default constructor leaves the fields uninitialised, which seems to
sometimes break fg with lots of NaN-related diagnostics.

The fix is to use SGVec3d::zeros() instead.

Also call resetOffsetsAndFOV() from the View::View() constructor, to ensure
that things are set up consistently.
2019-07-22 14:05:54 +01:00
Julian Smith
9a67910899 src/MultiPlayer/multiplaymgr.cxx: don't create view 8.
View 8 used to be new Tower View AGL view, but this interfered with hard-coded
aircraft view numbers. So fgdata now has removed Model View, meaning Tower
View AGL uses Model View's old number (7), which keeps sequential view numbers
unchanged.
2019-07-20 22:04:35 +01:00
James Turner
ed0a009224 Merge /u/cgdae/flightgear/ branch next into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/166/
2019-07-18 20:21:36 +00:00
James Turner
f643100dad Avoid a warning when inserting nil into a FP
This avoids the warning when procedure construction fails, and we have
a nil result rather than an empty vector as the arg.
2019-07-15 14:37:29 +01:00
Julian Smith
5990ba92f8 src/MultiPlayer/multiplaymgr.cxx: use std::initializer_list instead of C array.
After review. This simplifies iterating.
2019-07-04 13:16:22 +01:00
Julian Smith
2888eb00de Various fixes to view/multiplayer code after review.
src/MultiPlayer/multiplaymgr.cxx
src/MultiPlayer/multiplaymgr.hxx
    removed starts_with() and ends_with() - already provided in simgear::.
    removed output() fn for SGPropertyNode, as unused.
    added makeStringPropertyNameSafe().
    FGMultiplayMgr::addMultiplayer(): use std::find_if() to find model file.
    added FGMultiplayMgr::subsystemName().
src/Viewer/view.cxx
src/Viewer/view.hxx
    removed getDoubleValue() as not required.
    moved agl code into new View::handleAGL() fn.
    renamed View::Damping::setGet() => View::Damping::updateTarget().
2019-07-04 13:16:22 +01:00
Julian Smith
a0ee3a4cc4 src/Viewer/renderer_legacy.cxx: fixed compiler warning about initialisation ordering. 2019-07-04 13:16:22 +01:00
Julian Smith
4a067e721f src/MultiPlayer/multiplaymgr.cxx: don't overwrite /sim/multiplay/visibility-range-nm if already set.
This allows it to be set e.g. in ~/.fgfsrc with --prop.
2019-07-04 13:16:22 +01:00
Julian Smith
5772325bc6 Allow most default views to work on multiplayer aircraft as well as the user's aircraft.
Currently this works for all the default views except for Tower Look From (for
which it doesn't really make sense) and Fly-by View.

We now search for and load a -set.xml that matches the model .xml,
when new multiplayer aircraft is set up. This allows us to find view
offsets etc, e.g. allowing cockpit and helicopter views to work with
multiplayer aircraft. Properties from the -set.xml are placed into
/ai/models/multiplayer[]/set, so for example viewing offsets are in
/ai/models/multiplayer[]/set/sim/view[]/config/target-{x,y,z}-offset-m. We also
copy the aircraft's chase-distance into the view config params, similar to how
fgdata:defaults.xml does for the user's aircraft. And we also fill in views'
missing offsets from the Helicopter View config; e.g. this enables the new
Tower View AGL to show aircraft correctly centred, despite aircraft currently
not having this view defined in their -set.xml. [We don't currently attempt to
cache or reuse -set.xml data.]

Have ensured that view position responds to mouse movement in the same way for
viewing the user's aircraft as for multiplayer aircraft (previously, Model View
reversed the affect of vertical mouse movements).

Added new Tower AGL view. Behaves similarly to Tower view, but automatically
scales and pans vertically in order to always show the vertical range
extending from just above the aircraft down to the ground immediately below
the aircraft. We use aircrafts chase-distance as an indication of size. We
damp the ground level value to reduce the viewing jumping around too much
e.g. if the aircraft flies over buildings. The amount of damping is set by
fgdata:defaults.xml's lookat-agl-damping value.

Fixed problem where Tower View eye position moves slightly as target
aircraft heading changes. This was caused by us unnecessarily applying the
aircraft-centre correction to the eye position.

src/FDM/flight.cxx: also make /orientation/true-heading-deg. This allows
local orientation to be used like multiplayer orientation, which only
has /ai/models/multiplayer[]/orientation/true-heading-deg. [A better fix
might be to replace all occurrencies of /orientation/true-heading-deg with
/orientation/heading-deg, but this would be a rather large commit.]

Details:

src/Viewer/view.*: removed View::updateData() as is no longer required.

src/MultiPlayer/multiplaymgr.cxx: use helicopter view target offsets as
defaults. E.g. in tower view agl, aircraft won't currently be defining these
offsets. More generally, this allows aircraft to define target offsets only in
helicoter view.

src/FDM/flight.cxx
    FGMultiplayMgr::FillMsgHdr(): Added tie of /orientation/true-heading-deg to
    get_Psi_deg, so it duplictes the existing /orientation/heading-deg.

src/MultiPlayer/multiplaymgr.cxx
src/MultiPlayer/multiplaymgr.hxx
    FGMultiplayMgr::addMultiplayer(): look for and load -set.xml that matches
    the model. Patch various view-related things up in similar way to what we
    do for the user's aircraft, so that multiplayer views work.

    Made FGMultiplayMgr::getMultiplayer() public, so it can be used by
    src/Viewer/view.cxx.

src/Viewer/view.cxx
src/Viewer/view.hxx
    View::View(): Added lookat_agl, lookat_agl_damping params for new Tower
    View AGL. Preserve user's field-of-view in separate variable so that Tower
    View AGL can modify the actual field of view independently.

    Added view_index param so that we can find multiplayer view[]/config/
    properties.

    getViewOffsets(): new fn that finds view offsets for user aircraft or
    multiplayer aircraft.

    View::recalcLookFrom() View::recalcLookAt: Lots of changes to allow things
    to work with multiplayer aircraft. View::recalcLookAt() can now do Tower
    View AGL.

    View::Damping: support for damping, used by Tower View AGL. Might be good
    to use this for other damping.

    View::updateData(): removed, as calculations are now all done inside
    View::recalc*().

    put properties {x,y,z}-offset-m into new View::_adjust_offset_m member
    instead of _offset_m. This avoids confusion between a view's offsets and
    the offsets added in by the user via the 'Adjust View Position' dialogue.

src/Viewer/viewmgr.cxx
    FGViewMgr::init(): pass view number to
    flightgear::View::createFromProperties().
2019-07-04 13:16:22 +01:00
Edward d'Auvergne
34a6cb3c74 SGSubsystem classes: Registration of all subsystems. 2019-07-01 14:51:32 +02:00
Edward d'Auvergne
d259c70560 SGSubsystem classes: Addition of staticSubsystemClassId() to all subsystems. 2019-07-01 14:51:32 +02:00
Edward d'Auvergne
0eb8716d45 Autopilot components: Switch to using the subsystem name.
The _name, get_name(), and set_name() variables and functions have been removed.
The Component::get_name() function is now handled by Subsystem::subsystemId(),
and Component::set_name() replaced by SGSubsystem::set_name().  The
Component::_name variable is replaced by SGSubsystem::_subsystemId.
2019-07-01 14:27:30 +02:00
Edward d'Auvergne
332c240b38 SGSubsystemGroup: Removal of the subsystem group naming.
This is a partial reversion of 5253215065, the
changes of which are incompatible with the subsystem class IDs.
2019-07-01 14:27:30 +02:00
Edward d'Auvergne
fb5c36fc82 SGSubsystem classes: Renaming of the subsystem ID variables and functions. 2019-07-01 14:27:30 +02:00
Edward d'Auvergne
7a6e63ddb9 SGSubsystem classes: Subsystem and subsystem group API declaration standardisation.
This is a cleanup commit.
2019-07-01 14:27:30 +02:00
Edward d'Auvergne
60a2444766 SGSubsystem classes: Whitespace standardisation of the declarations.
This is a clean up commit prior to the subsystem API standardisation to simplify
the diffs.  It includes all SGSubsystem and SGSubsystemGroup derived classes.
2019-07-01 14:27:28 +02:00
James Turner
8428cd2a44 Revert "CommRadio: fix tuning 25Khz and 75Khz channels"
Revert this change - I will re-add the unit-tests again, but we need
a different approach for 8.3 stations, than what I did here.

This reverts commit 91cc83abb5.
2019-07-01 06:29:05 +01:00
James Turner
91cc83abb5 CommRadio: fix tuning 25Khz and 75Khz channels
In 8.3 mode, ensure that 25 and 75Khz channels can be tuned using the
abbreviated syntax (eg 118.02 for 118.025). 

As part of this, add test coverage of the CommRadio for basic and 8.3-
mode operation.
2019-06-27 15:45:53 +01:00
James Turner
4905aa255c Arrival procedure routing fixes
Deal with some cases in STAR -> approach routing better:

- when the IAF is the initial wpt of the approach primary sequence, 
  just accept this instead of warning. This is common in some XML
  files from Navigraph, for example EDDF

- don’t duplicate the IAF into the wpts returned by Approach::route
2019-06-24 16:37:56 +01:00
Torsten Dreyer
0d8d2addcf Autopilot member initialization order (removes warning) 2019-06-17 11:57:55 +02:00
Scott Giese
efcbdcfec2 [security] Prevent buffer overrun. 2019-06-15 21:30:54 -05:00
Scott Giese
47e3e7baed [Emesary] Fix compile on Linux. 2019-06-14 21:45:11 -05:00
James Turner
cfae6d2c9f CommRadio: fix power and noise/squelch
- when add-noise is false, mute noise completely
- if the CommRadio is not powered by the generic electrical system,
  work by default (as was previously the case)
2019-06-11 23:26:51 +01:00
Richard Harrison
6ebc91d3f7 Added mainloop frame notifications
Using Emesary Global Transmitter the following events are notified

* Frame Begin
* Frame End
* Mainloop started
* Mainloop stopped

This integrates with the background threaded Nasal Garbage collection (simgear:nasal/cppbind/NasalEmesaryInterface.hxx) and is also controlled by the properties as follows

* /sim/nasal-gc-threaded (true) - use background threaded GC
* /sim/nasal-gc-threaded-wait (false) - at the start of the frame wait for the previous GC thread to complete.

I initially thought that the wait at the start of the frame would be necessary; however in 100 or so hours of flight without the await for completion at the start of frame no threading problems (or any other problems) were shown; so nasal-gc-threaded-wait is defaulted to false which gives a slight boost in performance.

So what this does is to it removes the GC pause of 10-20ms every 4 seconds (test using the F-15). This change doesn't really give much extra performance per frame because normally GC is only performed when needed.
2019-06-11 14:38:38 +02:00
Richard Harrison
8c4334e3ae Increase severity of warning when trying to add a setlistener onto a tied property
- before this it was all to easy to miss being at DEBUG level and this is quite an important problem to be aware of for model developers
2019-06-11 14:38:38 +02:00
James Turner
4f4166e540 Use the global ATC sample group for the CommRadio
Remove the custom sample-group, and use the standard one, for the
comm-radio ATIS voice and noise.
2019-06-06 10:03:40 +01:00
James Turner
1a3daf39a0 ATC volume and settings passed to the group
Note sure this is strictly the correct place to do this, but it’s
where we do it for avionics, so following for now.
2019-06-06 10:03:40 +01:00
James Turner
3c56e74d07 Httpd: Avoid console spam by WS ping/pong frames 2019-06-05 17:41:07 +01:00
James Turner
0bea6153b0 Event input: button fire repeat 2019-06-05 17:41:07 +01:00
James Turner
5ffe96237f Fix a warning 2019-06-05 17:41:07 +01:00
James Turner
309aaa794f Flite always compiled now. 2019-06-03 16:51:08 +01:00
James Turner
688f49b487 Convert comm-radio to AbstractInstrument 2019-06-03 15:24:02 +01:00
James Turner
aad582f2c3 MarkerBeacon uses AbstractInstrument 2019-06-03 14:32:38 +01:00
James Turner
a26c671200 Migrate transponder to AbstractInstrument 2019-06-03 13:49:48 +01:00
James Turner
ff009bc58f Remove ‘X Double-scroll’ workaround
Remove this since it’s causing some other issues, let’s see if it
really still an issue on different platforms.
2019-06-03 11:54:25 +01:00
Ganael Laplanche
66e6afb449 Avoid crashing when udev_device_get_parent() returns a NULL pointer 2019-05-29 12:06:07 +02: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
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
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
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
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
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
James Turner
b83c069b0b Move power-btn and operable props into base class
AbstractInstrument now handles a generic power-btn and operable
property, and hence includes them in the serviceable-and-powered
check.
2019-04-25 17:11:50 +01:00
James Turner
40b96fef48 Convert ADF and (old) NavRadio to use new base class
This enables separate power-supply for each installation.
2019-04-25 17:11:50 +01:00
James Turner
9cd8ccae80 Merge /u/fgarlin/flightgear-src/ branch next into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/157/
2019-04-25 12:52:46 +00:00
Dan Wickstrom
1948304157 Fix problem where AI planes are placed on top of user aircraft when user either selects a specific spot or user selects parking to be an available spot. 2019-04-25 11:39:41 +01:00
James Turner
6261b71774 Add AbstractInstrument base class and convert DME
Base class handles some common instrument features, such as the
serviceable node and electrical supply. The electrical supply node
and minimum voltage to operate can now be set in the configuration
via <power-supply>/path/to/output/volts</> and <minimum-supply-volts>
2019-04-24 18:56:56 +01:00
Fernando García Liñán
e0507e9095 Fixed the aircraft showing on top of the splash screen when relocating/resetting 2019-04-23 13:21:19 +02:00
James Turner
b2bedfd485 Fix typo in submodels commit 2019-04-22 11:58:55 +01:00
James Turner
ea336af4dc Submodel offset supports pitch/yaw values
Reported by Stewart Andreason
2019-04-19 10:15:36 +01:00
James Turner
79562bcf31 Avoid crash on Cmd-Q exit of the app on macOS
On this code path, AppKit uses exit, rather than letting main run as
normal. We handle most things via C++ destructors, which do run, but
Qt is happier if we clean it up explicitly.
2019-04-17 22:53:10 +01:00
James Turner
e2ed179f4c Temporarily log out UI languages on launcher start
This is to help with diagnosing:
https://sourceforge.net/p/flightgear/codetickets/2121/
2019-04-17 15:11:23 +01:00
James Turner
4e8e69b4f8 Migrate invert-mouse-wheel setting from pre 2019.x
Flip the sense of this property, since the interpretation in SG is
also flipped now.
2019-04-11 20:40:17 +01:00
James Turner
4d562e2a90 Check existence of an OpenGL extension 2019-04-11 11:36:22 +01:00
Lars Toenning
85acefab95 Swift: initial support 2019-04-11 11:36:22 +01:00
Richard Harrison
8e1e6c8254 AI Traffic - better integration with terrasync.
- allow on demand update

new property traffic-manager/active indicating that AI Traffic is running
2019-04-07 09:00:01 +02:00
Stuart Buchanan
ff12994554 Execute load/unload Nasal for both detailed and AI
Previously only the first of a detailed/bare AI model tuple's Nasal
would be executed when the model is loaded.  This loads both.
2019-04-06 22:22:02 +01:00
Bertrand Coconnier
f011d5f567 JSBSim bug fixes
- Fixed the scripts end time computation
- Fixed nested tests in switches
- Simplifications to the computation of the aerodynamics angles alpha & beta
- Account for the contact transition in the gear compression speed
- Fixed docs in FGTank
2019-04-06 23:09:36 +02:00
Florent Rougon
2720d9fd9f Minor improvements to loading of nav.dat files
- simgear::strutils::readNonNegativeInt<unsigned int>() is better than
  std::stoul() at detecting and reporting erroneous input (for one, it
  checks that the given string *represents* an integer that fits in the
  specified type, as opposed to just "starts with digits").

- The format version is now an unsigned int (just because it's largely
  enough and simgear::strutils::readNonNegativeInt<unsigned long, 10>()
  isn't instantiated for now).

- The format version is now printed to the log (it was already for
  apt.dat files, but not for nav.dat files).
2019-03-28 07:44:59 +01:00
Florent Rougon
378999dd80 Improve parsing of apt.dat header
Properly report errors in the line that is supposed to contain the
format version of an apt.dat file.
2019-03-27 08:31:09 +01:00
Florent Rougon
8fbbf91270 Prevent a segfault when parsing malformed nav.dat files
Instead of doing an illegal memory access (to fields[0]), properly
report the problem when the line that is supposed to contain the format
version of a nav.dat file is empty.
2019-03-27 07:57:24 +01:00
Richard Harrison
f014e8825d FGComm: added listener for comm volume
Without this listen volume only changed on comm retune / PTT release
2019-03-27 00:28:20 +01:00
James Turner
64eaf6fe03 Fix for route-path when leg 0 is not a runway
Avoid doing turn-computation for the first waypoint, even if it’s not
a runway. Add a unit-test to cover this case.

Reported by Josh Davidson
2019-03-26 22:50:46 +01:00
James Turner
7c2a5e9e99 FlightGear support for queued commands
This enables queued commands to be processed once per main event loop.
At present this is done after subsystem updates.
2019-03-24 17:59:23 +00:00
James Turner
6860627dea Tweaks to launcher diagrams, to debug parking clicks
Adding some info/qInfo log output, to try and diagnose missed clicks
reported by some users.
2019-03-23 14:46:03 +00:00
Richard Harrison
8db784bf17 FGcomm: PTT usage and volume
- PTT will now use whatever channel is selected; non zero simply means PTT active.
- The volume as set in the comm[]/radio will now be used as a factor on the FGComm volume
2019-03-21 17:56:59 +01:00
James Turner
669a80216d Launcher: fix aircraft switching on update
Remove some obsolete code which caused the current aircraft to get
switched unexpectedley when updating
2019-03-20 17:09:12 +00:00
Richard Harrison
b9dc64ab87 FGComm; logic change to disconnect comm when selected channel set to 0.
It will be reconnected if PTT is set; and not disconnected until selected channel is again set to 0.
2019-03-20 15:13:11 +01:00
Richard Harrison
b42969ae91 Add support for FGCom multiple radio support
PTT now uses an int channel number (0 means not pressed, 1 = comm radio 1 (index [0]),etc...)

/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

However PTT will switch the FG comm inbound and outbound frequency to whichever radio was PTT'd.

New properties also set in multi-player to indicate the transmission frequency and normalised power (currently just set to 1.0)

13001(int)        : sim/multiplay/comm-transmit-frequency-hz
13002(short-norm) : sim/multiplay/comm-transmit-power-norm
2019-03-19 21:20:17 +01:00