|
3 | 3 | import edu.wpi.first.wpilibj.util.Color; |
4 | 4 |
|
5 | 5 | public class LEDConstants { |
| 6 | + public static final Color invertRedGreen(Color color) { |
| 7 | + return new Color(color.green, color.red, color.blue); |
| 8 | + } |
| 9 | + |
| 10 | + public static final int kLEDPort = 0; |
6 | 11 | // Auto/Operator = 27 |
7 | 12 | // other = 21.5 |
8 | | - public static final int kTotalStripLength = 70; |
9 | | - public static final int kBottomStripLength = 43; |
10 | | - public static final int kTopStripLength = 27; |
11 | | - public static final int kTopFirstIndex = kBottomStripLength + 1; |
12 | | - |
| 13 | + public static final int kTotalStripLength = 51; |
| 14 | + public static final int kBottomStripLength = 34; |
| 15 | + public static final int kTopStripLength = 17; |
| 16 | + public static final int kTopFirstIndex = kBottomStripLength; |
13 | 17 | public static final int kAlgeaEnd = kBottomStripLength / 3 + 1; |
| 18 | + |
14 | 19 | public static final int kLevelStart = kTopFirstIndex; |
15 | 20 | public static final int kPlaceStart = kTopFirstIndex + kTopStripLength / 3; |
16 | 21 | public static final int kGetAlgeaStart = kTopFirstIndex + kTopStripLength / 3 * 2; |
17 | | - public static final int kAutoPlacingStart = kTopFirstIndex; |
| 22 | + public static final int kAutoPlacingStart = kBottomStripLength / 3 * 2 + 1; |
18 | 23 |
|
19 | 24 | public static final Color kAlmostBlack = new Color(0, 0, 1); |
20 | 25 |
|
21 | 26 | // Normal LED Colors |
22 | | - public static final Color kHasAlgea = Color.kAquamarine; |
| 27 | + public static final Color kHasAlgea = invertRedGreen(Color.kTeal); |
23 | 28 | public static final Color kNotHasAlgea = kAlmostBlack; |
24 | 29 |
|
25 | | - public static final Color kCoralNotInRobot = Color.kOrange; |
26 | | - public static final Color kCoralInFunnel = Color.kHotPink; |
27 | | - public static final Color kCoralInRobot = Color.kWhite; |
| 30 | + public static final Color kCoralNotInRobot = invertRedGreen(Color.kOrange); |
| 31 | + public static final Color kCoralInFunnel = invertRedGreen(Color.kPurple); |
| 32 | + public static final Color kCoralInRobot = invertRedGreen(Color.kAntiqueWhite); |
28 | 33 |
|
29 | | - public static final Color kL1 = Color.kBlue; |
30 | | - public static final Color kL2 = Color.kGreen; |
31 | | - public static final Color kL3 = Color.kYellow; |
32 | | - public static final Color kL4 = Color.kRed; |
| 34 | + public static final Color kL1 = invertRedGreen(Color.kRed); |
| 35 | + public static final Color kL2 = invertRedGreen(Color.kLightYellow); |
| 36 | + public static final Color kL3 = invertRedGreen(Color.kGreen); |
| 37 | + public static final Color kL4 = invertRedGreen(Color.kBlue); |
33 | 38 |
|
34 | 39 | public static final Color kManual = kAlmostBlack; |
35 | | - public static final Color kRight = Color.kSaddleBrown; |
36 | | - public static final Color kLeft = Color.kGreenYellow; |
| 40 | + public static final Color kRight = invertRedGreen(Color.kOrangeRed); |
| 41 | + public static final Color kLeft = invertRedGreen(Color.kPurple); |
37 | 42 |
|
38 | | - public static final Color kGetAlgea = Color.kAquamarine; |
| 43 | + public static final Color kGetAlgea = invertRedGreen(Color.kTeal); |
39 | 44 | public static final Color kNotGetAlgea = kAlmostBlack; |
40 | 45 |
|
41 | | - public static final Color kCurrentLimiting = Color.kRed; |
| 46 | + public static final Color kCurrentLimiting = invertRedGreen(Color.kRed); |
42 | 47 |
|
43 | | - public static final Color kAutoPlacing = Color.kPurple; |
| 48 | + public static final Color kAutoPlacing = invertRedGreen(Color.kBlue); |
44 | 49 |
|
45 | 50 | // Climb LED Colors |
46 | | - public static final Color kWaitingForCage = Color.kRed; |
47 | | - public static final Color kHasCage = Color.kGreen; |
48 | | - public static final Color kClimbed = Color.kGoldenrod; |
| 51 | + public static final Color kWaitingForCage = invertRedGreen(Color.kRed); |
| 52 | + public static final Color kHasCage = invertRedGreen(Color.kGreen); |
| 53 | + public static final Color kClimbed = invertRedGreen(Color.kGoldenrod); |
49 | 54 | public static final Color[] kGameColors = { |
50 | | - Color.kBlack, // a dummy color |
51 | | - Color.kDarkRed, |
52 | | - Color.kDarkGreen, |
53 | | - Color.kDarkBlue, |
54 | | - Color.kPink, |
55 | | - Color.kLightGreen, |
56 | | - Color.kLightBlue |
| 55 | + invertRedGreen(Color.kBlack), // a dummy color |
| 56 | + invertRedGreen(Color.kDarkRed), |
| 57 | + invertRedGreen(Color.kDarkGreen), |
| 58 | + invertRedGreen(Color.kDarkBlue), |
| 59 | + invertRedGreen(Color.kPink), |
| 60 | + invertRedGreen(Color.kLightGreen), |
| 61 | + invertRedGreen(Color.kLightBlue) |
57 | 62 | }; |
58 | 63 | } |
0 commit comments