hbeni / fgcom-mumble

A (flightsim) radio communication simulation based on mumble
GNU General Public License v3.0
17 stars 5 forks source link

FGFS Addon: Basic rewrite to dynamically registering radios #165

Closed hbeni closed 1 year ago

hbeni commented 1 year ago

The Protocol file hard codes up to 4 Radios+2 ADF currently. It would be good to dynamicalize this, so the UDP string is created on the fly.

hbeni commented 1 year ago

~~Currently the string is updated slowly. FRQ changes and PBT are just changing every 5 seconds or so. PTT however works instantly.~~ :heavy_check_mark: fixed.

hbeni commented 1 year ago

It might be cool to update the UDP string just when something changes. This is already partly implemented, however for tied props this does not work. currently we update at the rate set by the settings (same rate as the protocol transmission)

The code part in question is here; but the listener don't seem to fire in most cases: https://github.com/hbeni/fgcom-mumble/blob/2b4a096ffbcf72176f31b60fe012cf04181d1a61/client/fgfs-addon/radios.nas#L69

The update by timer must be disabled for testing the listeners: https://github.com/hbeni/fgcom-mumble/blob/2b4a096ffbcf72176f31b60fe012cf04181d1a61/client/fgfs-addon/addon-main.nas#L109-L110


edit: asked at the fgfs forums: https://forum.flightgear.org/viewtopic.php?f=30&t=41484&p=412499#p412499

hbeni commented 1 year ago

Looks promising with the first tests I made.