@@ -0,0 +1,2576 @@
+package com.edinarobotics.zed.commands;%0A%0Aimport com.edinarobotics.utils.gamepad.FilterSet;%0Aimport com.edinarobotics.utils.gamepad.Gamepad;%0Aimport com.edinarobotics.utils.gamepad.GamepadResult;%0Aimport com.edinarobotics.utils.gamepad.filters.DeadzoneFilter;%0Aimport com.edinarobotics.utils.gamepad.filters.ScalingFilter;%0Aimport com.edinarobotics.zed.subsystems.Drivetrain;%0Aimport edu.wpi.first.wpilibj.command.Command;%0A%0A/**%0A * This %7B@link Command%7D allows a gamepad to control the %7B@link Drivetrain%7D.%0A * It gets the current values from the gamepad and sends them to the drivetrain.%0A */%0Apublic class GamepadDriveCommand extends Command%7B%0A    private static final String COMMAND_NAME = %22GamepadDrive%22;%0A    Gamepad gamepad;%0A    FilterSet filters;%0A    Drivetrain drivetrain;%0A    %0A    /**%0A     * Construct a new GamepadDriveCommand using the given gamepad, filters%0A     * and drivetrain.%0A     * @param gamepad The Gamepad object to read for control values.%0A     * @param filters The set of filters to use when filtering gamepad output.%0A     * @param drivetrain The drivetrain object to control.%0A     */%0A    public GamepadDriveCommand(Gamepad gamepad, FilterSet filters, Drivetrain drivetrain)%7B%0A        super(COMMAND_NAME);%0A        this.gamepad = gamepad;%0A        this.filters = filters;%0A        this.drivetrain = drivetrain;%0A        requires(drivetrain);%0A    %7D%0A    %0A    /**%0A     * Constructs a new GamepadDriveCommand using the given gamepad and%0A     * drivetrain. This command will use a default set of filters.%0A     * @param gamepad The Gamepad object to read for control values.%0A     * @param drivetrain The drivetrain object to control.%0A     */%0A    public GamepadDriveCommand(Gamepad gamepad, Drivetrain drivetrain)%7B%0A        super(COMMAND_NAME);%0A        filters = new FilterSet();%0A        filters.addFilter(new DeadzoneFilter(0.15));%0A        filters.addFilter(new ScalingFilter());%0A        this.gamepad = gamepad;%0A        this.drivetrain = drivetrain;%0A        requires(drivetrain);%0A    %7D%0A%0A    protected void initialize() %7B%0A        %0A    %7D%0A%0A    /**%0A     * Submits values from the given %7B@code gamepad%7D to the given%0A     * %7B@code drivetrain%7D.%0A     */%0A    protected void execute() %7B%0A        GamepadResult gamepadState = filters.filter(gamepad.getJoysticks());%0A        drivetrain.mecanumPolar(gamepadState.getLeftMagnitude(),%0A                gamepadState.getLeftDirection(), %0A                gamepadState.getRightX());%0A    %7D%0A%0A    protected boolean isFinished() %7B%0A        return false;%0A    %7D%0A%0A    protected void end() %7B%0A        %0A    %7D%0A%0A    protected void interrupted() %7B%0A        %0A    %7D%0A%7D%0A

Add GamepadDriveCommand to the project.