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

Detect Intentional Input Binding for PTT #609

Closed
wants to merge 1 commit into from

Conversation

justin-lovell
Copy link

The number of active bindings must be no more than two so that users do not inadvertently switch radios when a neighbouring hat switch is toggled for a brief millisecond.

This is an implementation as per the algorithm suggested in issue: #272

However, this PR would not resolve the illustrated scenario keybindings as the modifier would be superseded through the logic of the following lines:

if (previousBind.ModifierDevice == null && bindState.ModifierDevice != null)
{
//set previous bind to off if previous bind Main == main or modifier of bindstate
if (previousBind.MainDevice.IsSameBind(bindState.MainDevice))
{
previousBind.IsActive = false;
break;
}
if (previousBind.MainDevice.IsSameBind(bindState.ModifierDevice))
{
previousBind.IsActive = false;
break;
}
}
else if (previousBind.ModifierDevice != null && bindState.ModifierDevice == null)
{
if (previousBind.MainDevice.IsSameBind(bindState.MainDevice))
{
bindState.IsActive = false;
break;
}
if (previousBind.ModifierDevice.IsSameBind(bindState.MainDevice))
{
bindState.IsActive = false;
break;
}
}

To resolve the original issue completely, it is suggested that the PTT, radio switching, and radio tuning should be elevated up to a state machine.

This PR would resolve my specific use case where the neighbouring hats are being triggered for a fraction which causes the radio to switch rapidly during transmission.

The number of active bindings must be no more than two
so that users do not inadvertently switch radios when a
neighbouring hat switch is toggled for a brief millisecond.
@justin-lovell
Copy link
Author

Closing PR since no activity nor comments

@ciribob
Copy link
Owner

ciribob commented Jun 13, 2022

Apologies apparently I've missed this...

Please reopen if you want too, and I'll have a look for the next release

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.

2 participants