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 com.stuypulse.robot.subsystems.vision.LimelightVision.MegaTagMode; 010import edu.wpi.first.wpilibj2.command.InstantCommand; 011 012public class SetMegaTagMode extends InstantCommand { 013 014 private final LimelightVision vision; 015 016 private final MegaTagMode mode; 017 018 public SetMegaTagMode(MegaTagMode mode) { 019 this.vision = LimelightVision.getInstance(); 020 this.mode = mode; 021 } 022 023 @Override 024 public boolean runsWhenDisabled() { 025 return true; 026 } 027 028 @Override 029 public void initialize() { 030 vision.setMegaTagMode(mode); 031 } 032}