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

Fix #575 FA/18-C UFC Comm triangle symbol not mapping properly #576

Conversation

charliefoxtwo
Copy link
Member

Fixes #575

Unclear if this symbol is caused by receiving transmissions on the radio or something else. Would appreciate additional insight.

Comment on lines +164 to +176
local comm_channel_cache = {}

local function get_comm_channel(channel)
local display_value = channel == 1 and ufc.UFC_Comm1Display or ufc.UFC_Comm2Display

return comm_channel_map[display_value] or 0
if display_value == "d" then -- receiving(?), comm channel hasn't changed
return comm_channel_cache[channel] or 0
end

local value = comm_channel_map[display_value] or 0
comm_channel_cache[channel] = value

return value
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm new to Lua, so I may be a bit confused by the syntax here..

Why did you introduce the comm_channel_cache?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was added to fix a different control that this symbol breaks, which outputs a numeric value for the channel selected. As this symbol I assume is shown for all channels, we want to make sure we're still reporting that the same integer value is selected as the channel selection hasn't changed.

At least, I assume. I don't know why this control was added or who (if anyone) currently uses it.

@michaelosthege
Copy link
Contributor

I tested this and it works great!

Turns out the <> symbol indicates incoming radio transmissions.

@charliefoxtwo charliefoxtwo added this pull request to the merge queue May 13, 2024
Merged via the queue into DCS-Skunkworks:master with commit 20e390a May 13, 2024
2 checks passed
@charliefoxtwo charliefoxtwo deleted the bugfix/f18-ufc-comm-triangle branch May 25, 2024 04:56
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.

F/A-18C: Comm triangular channel symbol ^ unavailable
2 participants