Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 1527 kma20 #1531

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Issue 1527 kma20 #1531

wants to merge 3 commits into from

Conversation

hbeni
Copy link
Contributor

@hbeni hbeni commented Jan 28, 2025

Tested OK, should be fine to merge

Fix #1527

hbeni added 2 commits January 28, 2025 13:23
According to the handbook, the MIC selector knob also can switch
the audible COM radio, when the AUTO switch is active and the switch
for the radio is in OFF position.
As I interpret this, setting a radio to SPKR or HEADPHONE will make
that radio alwas audible (so its an override for the AUTO switch).

Also, the code now does calculate the "operable" property to make it
failable by setting "serviceable" to false.
The panel has a failsafe mode: when the panel fails, COM1 is
hardwired to the speaker/headset and mic.

see c172p-team#1527
When activated via aircraft-options menu:
- Space and shift-space keybinds will use the radio selected by the panels MIC knob.
- The transmission will only activate, when panel and the selected COM is operable.
- If the KMA20 panel fails, mic is wired to COM1 (falsafe mode).
- When PTT is activated, the respective radio gets muted (radios are half-duplex).
@wlbragg
Copy link
Collaborator

wlbragg commented Jan 28, 2025

I'll take a look soon and get this merged. Thanks!

@hbeni
Copy link
Contributor Author

hbeni commented Jan 29, 2025

Thank you.

One thing that came to my mind this night:
The listeners are currently configured to fire if the listened-to prop was written to (copied previous behavior).
While that works and also doesn‘t put much extra load (update function is called once a second or so), this might still be optimized by adding a second 0 to the setlistener() calls in the init function (especially the listener to operable).
That way they only execute if the listened value changes, which should be enough (needs testing of course).

@hbeni hbeni marked this pull request as draft January 29, 2025 19:14
@hbeni
Copy link
Contributor Author

hbeni commented Jan 29, 2025

put on hold, I want to add some things.

@hbeni hbeni marked this pull request as ready for review January 29, 2025 23:26
@hbeni
Copy link
Contributor Author

hbeni commented Jan 29, 2025

OK, Wayne, you can have a look now.

Thi should give unmeasurable better performance, but peace for the soul.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add FGCom integration (KMA20TSO)
2 participants