001/************************ PROJECT ZIXI ************************/
002/* Copyright (c) 2026 StuyPulse Robotics. All rights reserved.*/
003/* This work is licensed under the terms of the MIT license.  */
004/**************************************************************/
005package com.stuypulse.robot.opmodes.characterization;
006
007import com.stuypulse.robot.Robot;
008import com.stuypulse.robot.commands.subsystems.DriveCommands;
009import com.stuypulse.robot.subsystems.swerve.Swerve;
010
011import org.wpilib.command3.Command;
012import org.wpilib.command3.Scheduler;
013import org.wpilib.opmode.OpMode;
014import org.wpilib.opmode.Utility;
015
016@Utility(
017        name = "Swerve FF Characterization",
018        group = "Characterize",
019        description = "Swerve FeedForward characterization routine made by 6328")
020public class SwerveFFCharacterization implements OpMode {
021    private final Swerve swerve;
022
023    private final Command command;
024
025    public SwerveFFCharacterization(Robot robot) {
026        swerve = robot.swerve;
027
028        command = DriveCommands.feedforwardCharacterization(swerve);
029    }
030
031    @Override
032    public void start() {
033        Scheduler.getDefault().schedule(command);
034    }
035
036    @Override
037    public void end() {
038        Scheduler.getDefault().cancel(command);
039    }
040}