001/************************* PROJECT RON *************************/ 002/* Copyright (c) 2026 StuyPulse Robotics. All rights reserved. */ 003/* Use of this source code is governed by an MIT-style license */ 004/* that can be found in the repository LICENSE file. */ 005/***************************************************************/ 006package com.stuypulse.robot.commands.vision; 007 008import com.stuypulse.robot.subsystems.vision.LimelightVision; 009import edu.wpi.first.wpilibj2.command.InstantCommand; 010 011public class SetIMUMode extends InstantCommand { 012 013 private final LimelightVision vision; 014 015 private final int mode; 016 017 public SetIMUMode(int mode) { 018 this.vision = LimelightVision.getInstance(); 019 this.mode = mode; 020 } 021 022 @Override 023 public boolean runsWhenDisabled() { 024 return true; 025 } 026 027 @Override 028 public void initialize() { 029 vision.setIMUMode(mode); 030 } 031}