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

System for easy bindings to button combinations #144

Open
KyleRAnderson opened this issue Mar 24, 2019 · 0 comments
Open

System for easy bindings to button combinations #144

KyleRAnderson opened this issue Mar 24, 2019 · 0 comments
Labels
enhancement New feature or request
Projects

Comments

@KyleRAnderson
Copy link
Collaborator

KyleRAnderson commented Mar 24, 2019

Currently there are actually a number of cases where combinations of buttons on the operator and driver joysticks should be pressed to activate certain commands, yet we don't have an easy way of doing these each time.

As it is right now, one button activates a command and then the command itself handles the rest of the input. This isn't great because ideally commands should just perform actions and not deal with input/output.

I tried to do this sort of thing with FluidTrigger but for FluidTrigger to work, multiple of the same buttons would get checked each tick.

My proposed solution would be a modification of FluidTrigger such that you specify some fluid constant button bindings which may be involved in the combination and then you add commands with conditions. Something like:

new FluidTrigger(fluidConstantBinding1, fluidConstantBinding2) {
    @Override
    protected Command getCommand() {
        if (areAnyPressed(fluidConstantBinding1, fluidConstantBinding2)  {
            return someCommand;
        } else if (areAllPressed(fluidConstantBinding1, fluidConstantBinding2) {
            return anotherCommand;
        }
    } 

(this wouldn't be the exact way it would work, just a demonstration of the ease with which I want this to be done).

@KyleRAnderson KyleRAnderson added the enhancement New feature or request label Mar 24, 2019
@KyleRAnderson KyleRAnderson self-assigned this Mar 24, 2019
@KyleRAnderson KyleRAnderson added this to To do in Platform via automation Mar 24, 2019
@ryanlarkin ryanlarkin changed the title Mechanism for easy bindings to button combinations System for easy bindings to button combinations Mar 25, 2019
@KyleRAnderson KyleRAnderson removed their assignment Nov 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Platform
  
To do
Development

No branches or pull requests

1 participant