mirror of
https://github.com/Team4388/Robot-Essentials.git
synced 2026-06-08 16:28:02 -06:00
7e57cf8f2d
- All methods that need javadoc have been marked with /** * Add your docs here. */
38 lines
1.3 KiB
Java
38 lines
1.3 KiB
Java
/*----------------------------------------------------------------------------*/
|
|
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
|
|
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
|
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
|
/* the project. */
|
|
/*----------------------------------------------------------------------------*/
|
|
|
|
package frc4388.robot.commands.LED;
|
|
|
|
import edu.wpi.first.wpilibj2.command.InstantCommand;
|
|
|
|
import frc4388.robot.subsystems.LED;
|
|
import frc4388.utility.LEDPatterns;
|
|
|
|
// NOTE: Consider using this command inline, rather than writing a subclass. For more
|
|
// information, see:
|
|
// https://docs.wpilib.org/en/latest/docs/software/commandbased/convenience-features.html
|
|
public class SetLEDPattern extends InstantCommand {
|
|
|
|
private final LED m_led;
|
|
public static LEDPatterns m_pattern;
|
|
|
|
/**
|
|
* Add your docs here.
|
|
*/
|
|
public SetLEDPattern(LED subsystem, LEDPatterns pattern) {
|
|
m_led = subsystem;
|
|
m_pattern = pattern;
|
|
addRequirements(m_led);
|
|
}
|
|
|
|
// Called when the command is initially scheduled.
|
|
@Override
|
|
public void initialize() {
|
|
m_led.setPattern(m_pattern);
|
|
}
|
|
}
|