<commit_before>
package com.edinarobotics.zeke;

import com.edinarobotics.utils.gamepad.FilteredGamepad;
import com.edinarobotics.utils.gamepad.Gamepad;
import com.edinarobotics.utils.gamepad.gamepadfilters.*;
import com.edinarobotics.zeke.commands.LowerShooterToHeightCommand;
import com.edinarobotics.zeke.commands.SetCollectorCommand;
import com.edinarobotics.zeke.commands.SetPusherCommand;
import com.edinarobotics.zeke.commands.SetShooterCommand;
import com.edinarobotics.zeke.commands.ShootingSequenceCommand;
import com.edinarobotics.zeke.subsystems.Collector;
import com.edinarobotics.zeke.subsystems.Shooter;
import java.util.Vector;
/**
 * Controls handles creating the {@link Gamepad} objects used to control the
 * robot as well as binding the proper Commands to button actions.
 */
public class Controls {

    private static Controls instance;
    public final Gamepad gamepad1;
    public final Gamepad gamepad2;
    
    private Controls() {
        Vector driveGamepadFilters = new Vector();
        driveGamepadFilters.addElement(new GamepadDeadzoneFilter(0.1));
        driveGamepadFilters.addElement(new GamepadPowerFilter(2));
        GamepadFilterSet driveGamepadFilterSet = new GamepadFilterSet(driveGamepadFilters);
        gamepad1 = new FilteredGamepad(1, driveGamepadFilterSet);
        
        Vector shootGamepadFilters = new Vector();
        shootGamepadFilters.addElement(new GamepadDeadzoneFilter(0.1));
        shootGamepadFilters.addElement(new GamepadPowerFilter(2));
        GamepadFilterSet shootGamepadFilterSet = new GamepadFilterSet(shootGamepadFilters);
        gamepad2 = new FilteredGamepad(2, shootGamepadFilterSet);
        
        // Collector controls
        gamepad2.leftTrigger().whenPressed(new SetCollectorCommand(true, Collector.CollectorWheelState.STOPPED));
        gamepad2.leftBumper().whenPressed(new SetCollectorCommand(false, Collector.CollectorWheelState.STOPPED));
        gamepad2.dPadUp().whenPressed(new SetCollectorCommand(true, Collector.CollectorWheelState.REVERSING));
        gamepad2.dPadUp().whenReleased(new SetCollectorCommand(true, Collector.CollectorWheelState.STOPPED));
        gamepad2.dPadDown().whenPressed(new SetCollectorCommand(true, Collector.CollectorWheelState.COLLECTING));
        gamepad2.dPadDown().whenReleased(new SetCollectorCommand(true, Collector.CollectorWheelState.STOPPED));
        gamepad2.dPadRight().whenPressed(new SetCollectorCommand(true, Collector.CollectorWheelState.HOLDING));
        gamepad2.dPadRight().whenReleased(new SetCollectorCommand(true, Collector.CollectorWheelState.STOPPED));
        gamepad2.dPadLeft().whenPressed(new SetCollectorCommand(true, Collector.CollectorWheelState.HOLDING));
        gamepad2.dPadLeft().whenReleased(new SetCollectorCommand(true, Collector.CollectorWheelState.STOPPED));
        
        // Shooter controls
        gamepad2.rightTrigger().whenPressed(new SetShooterCommand(Shooter.WinchState.FREE));
        gamepad2.rightBumper().whenPressed(new LowerShooterToHeightCommand(Shooter.FIRING_HEIGHT));
        gamepad2.diamondDown().whenPressed(new SetPusherCommand(true));
        gamepad2.diamondDown().whenReleased(new SetPusherCommand(false));
        gamepad2.middleRight().whenPressed(new ShootingSequenceCommand());
        
    }<commit_msg>Fixed Controls class for filter API renaming.<commit_after>
package com.edinarobotics.zeke;

import com.edinarobotics.utils.gamepad.FilteredGamepad;
import com.edinarobotics.utils.gamepad.Gamepad;
import com.edinarobotics.utils.gamepad.gamepadfilters.*;
import com.edinarobotics.zeke.commands.LowerShooterToHeightCommand;
import com.edinarobotics.zeke.commands.SetCollectorCommand;
import com.edinarobotics.zeke.commands.SetPusherCommand;
import com.edinarobotics.zeke.commands.SetShooterCommand;
import com.edinarobotics.zeke.commands.ShootingSequenceCommand;
import com.edinarobotics.zeke.subsystems.Collector;
import com.edinarobotics.zeke.subsystems.Shooter;
import java.util.Vector;
/**
 * Controls handles creating the {@link Gamepad} objects used to control the
 * robot as well as binding the proper Commands to button actions.
 */
public class Controls {

    private static Controls instance;
    public final Gamepad gamepad1;
    public final Gamepad gamepad2;
    
    private Controls() {
        Vector driveGamepadFilters = new Vector();
        driveGamepadFilters.addElement(new DeadzoneFilter(0.1));
        driveGamepadFilters.addElement(new PowerFilter(2));
        GamepadFilterSet driveGamepadFilterSet = new GamepadFilterSet(driveGamepadFilters);
        gamepad1 = new FilteredGamepad(1, driveGamepadFilterSet);
        
        Vector shootGamepadFilters = new Vector();
        driveGamepadFilters.addElement(new DeadzoneFilter(0.1));
        driveGamepadFilters.addElement(new PowerFilter(2));
        GamepadFilterSet shootGamepadFilterSet = new GamepadFilterSet(shootGamepadFilters);
        gamepad2 = new FilteredGamepad(2, shootGamepadFilterSet);
        
        // Collector controls
        gamepad2.leftTrigger().whenPressed(new SetCollectorCommand(true, Collector.CollectorWheelState.STOPPED));
        gamepad2.leftBumper().whenPressed(new SetCollectorCommand(false, Collector.CollectorWheelState.STOPPED));
        gamepad2.dPadUp().whenPressed(new SetCollectorCommand(true, Collector.CollectorWheelState.REVERSING));
        gamepad2.dPadUp().whenReleased(new SetCollectorCommand(true, Collector.CollectorWheelState.STOPPED));
        gamepad2.dPadDown().whenPressed(new SetCollectorCommand(true, Collector.CollectorWheelState.COLLECTING));
        gamepad2.dPadDown().whenReleased(new SetCollectorCommand(true, Collector.CollectorWheelState.STOPPED));
        gamepad2.dPadRight().whenPressed(new SetCollectorCommand(true, Collector.CollectorWheelState.HOLDING));
        gamepad2.dPadRight().whenReleased(new SetCollectorCommand(true, Collector.CollectorWheelState.STOPPED));
        gamepad2.dPadLeft().whenPressed(new SetCollectorCommand(true, Collector.CollectorWheelState.HOLDING));
        gamepad2.dPadLeft().whenReleased(new SetCollectorCommand(true, Collector.CollectorWheelState.STOPPED));
        
        // Shooter controls
        gamepad2.rightTrigger().whenPressed(new SetShooterCommand(Shooter.WinchState.FREE));
        gamepad2.rightBumper().whenPressed(new LowerShooterToHeightCommand(Shooter.FIRING_HEIGHT));
        gamepad2.diamondDown().whenPressed(new SetPusherCommand(true));
        gamepad2.diamondDown().whenReleased(new SetPusherCommand(false));
        gamepad2.middleRight().whenPressed(new ShootingSequenceCommand());
        
    }
{'fraction_non_alphanumeric': 0.09213313161875945, 'fraction_numerical': 0.008169440242057489, 'mean_word_length': 4.999092558983666, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3735021', 'n_tokens_mistral': 2007, 'n_tokens_neox': 1948, 'n_words': 286}