-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #84 from 4201VitruvianBots/LEDCode
Pull Req. for the work I've done so far.
- Loading branch information
Showing
5 changed files
with
427 additions
and
1 deletion.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
src/main/java/frc/robot/commands/led/GetSubsystemStates.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copyright (c) FIRST and other WPILib contributors. | ||
// Open Source Software; you can modify and/or share it under the terms of | ||
// the WPILib BSD license file in the root directory of this project. | ||
|
||
package frc.robot.commands.led; | ||
|
||
import edu.wpi.first.wpilibj2.command.Command; | ||
|
||
/* You should consider using the more terse Command factories API instead https://docs.wpilib.org/en/stable/docs/software/commandbased/organizing-command-based.html#defining-commands */ | ||
public class GetSubsystemStates extends Command { | ||
/** Creates a new GerSubsystemStates. */ | ||
public GetSubsystemStates() { | ||
// Use addRequirements() here to declare subsystem dependencies. | ||
} | ||
|
||
// Called when the command is initially scheduled. | ||
@Override | ||
public void initialize() {} | ||
|
||
// Called every time the scheduler runs while the command is scheduled. | ||
@Override | ||
public void execute() {} | ||
|
||
// Called once the command ends or is interrupted. | ||
@Override | ||
public void end(boolean interrupted) {} | ||
|
||
// Returns true when the command should end. | ||
@Override | ||
public boolean isFinished() { | ||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
// Copyright (c) FIRST and other WPILib contributors. | ||
// Open Source Software; you can modify and/or share it under the terms of | ||
// the WPILib BSD license file in the root directory of this project. | ||
|
||
package frc.robot.constants; | ||
|
||
import edu.wpi.first.math.util.Units; | ||
import edu.wpi.first.wpilibj.util.Color8Bit; | ||
|
||
/** Add your docs here. */ | ||
public class LED { | ||
public static final int LEDcount = 34; // TODO: change the amount od LEDs we have | ||
|
||
public static final double LEDstripLength = Units.inchesToMeters(7); // meters | ||
|
||
/** Different LED animation types */ | ||
public enum ANIMATION_TYPE { | ||
ColorFlow, | ||
ColorFlowLong, | ||
Fire, | ||
Larson, | ||
Rainbow, | ||
RgbFade, | ||
SingleFade, | ||
Strobe, | ||
Twinkle, | ||
TwinkleOff, | ||
Solid | ||
} | ||
|
||
// These color are channels passed in the setPattern() method in the LED subsystem | ||
public static final Color8Bit red = new Color8Bit(255, 0, 0); // Disabled | ||
public static final Color8Bit orange = new Color8Bit(247, 116, 40); | ||
public static final Color8Bit yellow = new Color8Bit(150, 120, 0); // Coral Mode | ||
public static final Color8Bit green = new Color8Bit(0, 255, 0); // Enabled | ||
public static final Color8Bit cyan = new Color8Bit(24, 94, 89); // Algae Mode | ||
public static final Color8Bit blue = new Color8Bit(0, 0, 255); // Lined up for Reef | ||
public static final Color8Bit purple = new Color8Bit(128, 0, 128); | ||
public static final Color8Bit pink = new Color8Bit(190, 30, 35); | ||
public static final Color8Bit white = new Color8Bit(125, 125, 125); | ||
|
||
// They were in a different, probably more logical order, but I wanted them in rainbow order | ||
// instead. | ||
|
||
public enum SUBSYSTEM_STATES { | ||
DISABLED, // | ||
ENABLED, // | ||
INTAKING, // | ||
CORAL, | ||
CORAL_OWNED, | ||
ALGAE, | ||
ALGAE_OWNED, | ||
REEF_LINEUP, | ||
ENDGAME; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.