Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bling #47

Merged
merged 3 commits into from
Dec 23, 2024
Merged

Bling #47

merged 3 commits into from
Dec 23, 2024

Conversation

SeanErn
Copy link
Member

@SeanErn SeanErn commented Dec 23, 2024

Summary by CodeRabbit

  • New Features

    • Introduced documentation for the "No Alliance Waiting Command" and "Set To Alliance Color Command".
    • Added new subsystem documentation for the Bling subsystem, managing LED lighting.
    • Implemented joystick configuration settings in a new JSON file.
    • Enhanced navigation structure in the documentation to include new commands and subsystems.
  • Documentation

    • Expanded documentation for the Bling subsystem and related commands.
    • Added reference links to Javadoc for new commands and subsystem.
  • Chores

    • Updated configuration files to reflect new documentation structure and commands.

Copy link

coderabbitai bot commented Dec 23, 2024

📝 Walkthrough

Walkthrough

This pull request introduces a comprehensive Bling subsystem for managing LED lighting on the robot. The implementation includes a new subsystem (BlingSubsystem), two commands (NoAllianceWaiting and SetToAllianceColor), and supporting infrastructure for both real hardware and simulation environments. The changes enable dynamic LED control based on robot state, alliance selection, and provide visual feedback mechanisms through configurable animations and colors.

Changes

File Change Summary
docs/mkdocs/... Added documentation for Bling subsystem, NoAllianceWaiting and SetToAllianceColor commands
src/main/java/frc/alotobots/Constants.java Updated simMode from Mode.REPLAY to Mode.SIM
src/main/java/frc/alotobots/RobotContainer.java Added BlingSubsystem with default commands
src/main/.../bling/BlingSubsystem.java New subsystem class for LED control
src/main/.../bling/commands/NoAllianceWaiting.java New command for displaying animation before alliance selection
src/main/.../bling/commands/SetToAllianceColor.java New command for setting LED color based on alliance
src/main/.../bling/constants/BlingConstants.java Defined LED constants, animations, and color configurations
src/main/.../bling/io/BlingIO.java Interface for LED control with input logging
src/main/.../bling/io/BlingIOReal.java Real hardware implementation of LED control
src/main/.../bling/io/BlingIOSim.java Simulation implementation of LED control

Sequence Diagram

sequenceDiagram
    participant DS as Driver Station
    participant Robot as Robot
    participant Bling as BlingSubsystem
    participant NoAlliance as NoAllianceWaiting
    participant AllianceColor as SetToAllianceColor

    DS->>Robot: No Alliance Selected
    Robot->>NoAlliance: Start Animation
    NoAlliance->>Bling: Display No Alliance Animation
    DS->>Robot: Alliance Selected
    NoAlliance->>Bling: Clear Animation
    AllianceColor->>Bling: Set Alliance Color
Loading

Possibly Related PRs

Tip

CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command @coderabbitai generate docstrings to have CodeRabbit automatically generate docstrings for your pull request. We would love to hear your feedback on Discord.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0ce2f58 and fa48abc.

📒 Files selected for processing (14)
  • docs/mkdocs/docs/library/commands/bling/noalliancewaiting.md (1 hunks)
  • docs/mkdocs/docs/library/commands/bling/settoalliancecolor.md (1 hunks)
  • docs/mkdocs/docs/library/subsystems/bling.md (1 hunks)
  • docs/mkdocs/mkdocs.yml (1 hunks)
  • simgui-ds.json (1 hunks)
  • src/main/java/frc/alotobots/Constants.java (1 hunks)
  • src/main/java/frc/alotobots/RobotContainer.java (6 hunks)
  • src/main/java/frc/alotobots/library/subsystems/bling/BlingSubsystem.java (1 hunks)
  • src/main/java/frc/alotobots/library/subsystems/bling/commands/NoAllianceWaiting.java (1 hunks)
  • src/main/java/frc/alotobots/library/subsystems/bling/commands/SetToAllianceColor.java (1 hunks)
  • src/main/java/frc/alotobots/library/subsystems/bling/constants/BlingConstants.java (1 hunks)
  • src/main/java/frc/alotobots/library/subsystems/bling/io/BlingIO.java (1 hunks)
  • src/main/java/frc/alotobots/library/subsystems/bling/io/BlingIOReal.java (1 hunks)
  • src/main/java/frc/alotobots/library/subsystems/bling/io/BlingIOSim.java (1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/mkdocs/docs/library/commands/bling/noalliancewaiting.md

[uncategorized] ~12-~12: Loose punctuation mark.
Context: ...m blingSubsystem) ``` - blingSubsystem: The bling subsystem instance to control...

(UNLIKELY_OPENING_PUNCTUATION)

docs/mkdocs/docs/library/subsystems/bling.md

[uncategorized] ~3-~3: You might be missing the article “the” here.
Context: ...vice. It provides visual feedback about robot state through different colors and anim...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


[uncategorized] ~11-~11: Loose punctuation mark.
Context: ...c BlingSubsystem(BlingIO io) ``` - io: The BlingIO implementation to use (eith...

(UNLIKELY_OPENING_PUNCTUATION)

docs/mkdocs/docs/library/commands/bling/settoalliancecolor.md

[uncategorized] ~12-~12: Loose punctuation mark.
Context: ...m blingSubsystem) ``` - blingSubsystem: The bling subsystem instance to control...

(UNLIKELY_OPENING_PUNCTUATION)

🔇 Additional comments (23)
src/main/java/frc/alotobots/library/subsystems/bling/commands/NoAllianceWaiting.java (3)

25-25: Nice introduction of the command.
This command structure is clear and follows WPILib’s recommended pattern for command-based design.


56-57: Allowing the command to run when disabled is beneficial.
This is good practice for LED or purely cosmetic commands.


45-47: Verify the alliance presence check.
Although “getAlliance().isPresent()” is correct for your custom logic, consider alternative handling if the WPILib method behavior changes, such as returning UNKNOWN.

✅ Verification successful

Let me verify the concern by checking how the alliance is handled in the codebase and if there are any potential issues with the current implementation.


Let me check how the alliance is handled in other parts of the code to better understand the implementation.


Based on the code analysis, I can now provide the final response:

The alliance presence check implementation is appropriate and safe.
The codebase consistently handles alliance detection through DriverStation.getAlliance().isPresent() with proper fallback handling. The SwerveDriveSubsystem already implements a safe fallback to Blue alliance using orElse(), and SetToAllianceColor only executes alliance-specific logic within a presence check. The current implementation in NoAllianceWaiting.java aligns with these patterns and doesn't require additional handling since its purpose is specifically to wait for alliance presence.

🏁 Scripts executed

The following scripts were executed for the analysis:

Error: No shell scripts found


Script:

#!/bin/bash
# Search for alliance-related code patterns
rg -l "getAlliance|Alliance" --type java

# Look for specific usage of getAlliance().isPresent()
rg "getAlliance\(\)\.isPresent\(\)" --type java -A 2

# Search for any Alliance enum or constant usage
ast-grep --pattern 'Alliance.$$$'

Length of output: 1673


Script:

#!/bin/bash
# Check the full implementation of SetToAllianceColor.java
cat src/main/java/frc/alotobots/library/subsystems/bling/commands/SetToAllianceColor.java

# Check for any error handling or alliance-related constants
rg "Alliance\." --type java -B 2 -A 2

Length of output: 4071

src/main/java/frc/alotobots/library/subsystems/bling/io/BlingIOSim.java (1)

23-23: Simulation approach is well-structured.
This class efficiently mocks hardware behavior and helps keep test logic simple.

src/main/java/frc/alotobots/library/subsystems/bling/commands/SetToAllianceColor.java (2)

26-26: Clear command naming.
The class name accurately describes its function, improving code readability.


62-63: Running when disabled is beneficial.
Again, this is a good strategy for cosmetic commands.

src/main/java/frc/alotobots/library/subsystems/bling/BlingSubsystem.java (2)

25-25: Well-structured subsystem design.
Leverages SubsystemBase effectively for logging and periodic updates.


71-75: Potential “off” state.
Currently, clear() sets no color and no animation. Confirm that the hardware indeed turns LEDs fully off when nothing is set.

✅ Verification successful

Let me search for relevant code to understand the LED control implementation.


Looking at the implementation in BlingIOReal.java, I can see that clearSolidColor() explicitly sets the LEDs to RGB values (0,0,0) and clearAnimation() clears any running animation. Let me check if there's any hardware initialization code that might affect the default state.


LED off state is properly implemented
Looking at BlingIOReal.java, the clear() method correctly turns off the LEDs by:

  1. Calling candle.clearAnimation(0) to stop any running animations
  2. Calling candle.setLEDs(0, 0, 0) to set RGB values to zero, which effectively turns off the LEDs
🏁 Scripts executed

The following scripts were executed for the analysis:

Error: No shell scripts found


Script:

#!/bin/bash
# Find the IO interface implementation
rg -l "BlingIO" --type java

Length of output: 445


Script:

#!/bin/bash
# Look for LED-related implementation details
rg -A 5 "clearAnimation|clearSolidColor" --type java

Length of output: 3296


Script:

#!/bin/bash
# Search for any LED initialization or default state setup
ast-grep --pattern 'class $_ implements BlingIO {
  $$$
}'

Length of output: 60


Script:

#!/bin/bash
# Look for constructor or initialization code in BlingIOReal
rg -A 10 "class BlingIOReal" --type java

Length of output: 1117


Script:

#!/bin/bash
# Search for the Candle hardware interface usage
rg -B 2 -A 5 "candle\." --type java

Length of output: 3265

src/main/java/frc/alotobots/library/subsystems/bling/io/BlingIO.java (3)

1-12: Kudos on including the GPL licensing block and references.
This ensures compliance with open-source requirements and clarifies code usage rights.


22-23: Interface scope clarity is good.
Defining all LED operations in a single interface fosters great modularity and maintainability.


70-73: Edge case for clearing solid color.
Ensure that calling clearSolidColor() in rapid succession or concurrently from different threads won't cause undesired states on the LED strip. If concurrency is possible, consider using synchronization or state checks.

src/main/java/frc/alotobots/library/subsystems/bling/io/BlingIOReal.java (2)

15-20: CTRE imports are straightforward.
All necessary imports for CANdle-based LED control are properly included. This is well-structured for hardware usage.


57-61: Animation concurrency.
If your commands or subsystem code might call setAnimation() concurrently, ensure that only one animation can own the LED strip at a time to avoid unexpected flickers. A short mutex or guard condition may help.

src/main/java/frc/alotobots/library/subsystems/bling/constants/BlingConstants.java (1)

35-46: Ensure animation load on all LED counts.
NUM_LEDS is used in each animation constructor. Confirm it matches the actual physical strip length to avoid partial or out-of-bound LED writes.

src/main/java/frc/alotobots/Constants.java (1)

26-26: Changed simMode from REPLAY to SIM.
Verify that any replay-specific functionality is unaffected or replaced in code that depends on this constant.

Here is a sample script to locate references to simMode in the codebase and confirm REPLAY usage is no longer needed:

src/main/java/frc/alotobots/RobotContainer.java (6)

22-27: Good addition of import statements for real and simulated Bling IO.
These imports align with the new Bling subsystem usage. No action needed.


58-58: Initialization of the BlingSubsystem field.
This looks appropriate as a final field within RobotContainer for use throughout the class.


84-84: Real hardware initialization for BlingSubsystem.
Using BlingIOReal for REAL mode cleanly separates hardware concerns. No issues found.


106-106: Simulation initialization for BlingSubsystem.
Using BlingIOSim for SIM mode is a neat approach for LED control simulation. No issues found.


126-126: Fallback (replay) mode for BlingSubsystem.
Creating a no-op BlingIO ensures the replay scenario won’t attempt any hardware calls. This is a good pattern.


160-161: Default command chaining for BlingSubsystem.
Chaining NoAllianceWaiting and SetToAllianceColor ensures the LED animations transition correctly once the alliance is known. No concurrency conflicts appear likely, as the second command starts only after the first finishes.

docs/mkdocs/mkdocs.yml (1)

19-21: Verify documentation files exist

The navigation structure looks good, but let's verify that all referenced markdown files exist:

Also applies to: 28-28

✅ Verification successful

Since no error messages were output when checking for the existence of the files, this indicates that all the referenced documentation files exist in their expected locations. I can now generate the final response:

Documentation files verified successfully

All referenced Bling documentation files are present in their expected locations:

  • docs/mkdocs/docs/library/commands/bling/settoalliancecolor.md
  • docs/mkdocs/docs/library/commands/bling/noalliancewaiting.md
  • docs/mkdocs/docs/library/subsystems/bling.md
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if all referenced Bling documentation files exist

# Check for command documentation
echo "Checking command documentation files..."
for file in \
    "docs/mkdocs/docs/library/commands/bling/settoalliancecolor.md" \
    "docs/mkdocs/docs/library/commands/bling/noalliancewaiting.md" \
    "docs/mkdocs/docs/library/subsystems/bling.md"
do
    if [ ! -f "$file" ]; then
        echo "Missing documentation file: $file"
    fi
done

Length of output: 871

simgui-ds.json (1)

1-92: Verify key code conflicts with browser/OS shortcuts

Some key combinations might conflict with standard browser or OS shortcuts (e.g., Ctrl+C, Ctrl+V). Please verify that the simulation controls work as expected in all environments.

✅ Verification successful

The previous search didn't yield results because we need to broaden our search. Let's look at all documentation and JSON files to understand the key binding context better and check for potential conflicts with system shortcuts.


After analyzing the keyboard bindings in simgui-ds.json, I can generate a final response since I have enough information about the key mappings.

No conflicts found with browser/OS shortcuts

The keyboard bindings used in the simulation configuration do not conflict with common browser or OS shortcuts:

  • WASD keys (65, 87, 83, 68) for primary movement
  • R/E keys (82, 69) for third axis
  • ZXCV keys (90, 88, 67, 86) for buttons
  • IJKL keys (73, 74, 75, 76) for secondary movement
  • Arrow keys (262-265) for tertiary movement

These key mappings avoid common system shortcuts like:

  • Ctrl+C (copy)
  • Ctrl+V (paste)
  • Ctrl+Z (undo)
  • Alt+Tab (window switching)
  • Windows/Command key combinations
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Search for any documentation or comments about key binding conflicts

echo "Searching for key binding documentation..."
rg -i "key.*bind|shortcut|conflict" --type md
rg -i "key.*bind|shortcut|conflict" --type txt

Length of output: 340


Script:

#!/bin/bash
# Let's analyze the key codes in simgui-ds.json to check for potential conflicts
# First, let's look for any documentation about key bindings
fd -e md -e txt . | xargs cat

# Then check if there are any other key binding configurations
fd ".*\.json$" | xargs cat

Length of output: 82767


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Inline review comments failed to post. This is likely due to GitHub's limits when posting large numbers of comments.

Actionable comments posted: 1

🧹 Nitpick comments (15)
src/main/java/frc/alotobots/library/subsystems/bling/commands/NoAllianceWaiting.java (1)

35-37: Consider marking the subsystem variable as final where possible.
Marking “blingSubsystem” as final would ensure that it’s not reassigned, reinforcing immutability.

- private BlingSubsystem blingSubsystem;
+ private final BlingSubsystem blingSubsystem;
src/main/java/frc/alotobots/library/subsystems/bling/io/BlingIOSim.java (1)

35-43: Consider updating the input object with more metadata.
Including timestamps or iteration counters might help debugging if needed.

src/main/java/frc/alotobots/library/subsystems/bling/commands/SetToAllianceColor.java (1)

36-38: Final marking of subsystem as final is recommended.
Similar to NoAllianceWaiting, making “blingSubsystem” final helps prevent accidental reassignment.

- private BlingSubsystem blingSubsystem;
+ private final BlingSubsystem blingSubsystem;
src/main/java/frc/alotobots/library/subsystems/bling/BlingSubsystem.java (1)

42-51: Periodic logging is beneficial and thorough.
This ensures debug visibility into the current command. Just ensure the logger doesn’t flood your telemetry.

src/main/java/frc/alotobots/library/subsystems/bling/io/BlingIO.java (1)

53-60: Consider providing default logging or stubs.
Although these methods are default, you might add minimal logging or a stub implementation to help track usage and detect if they are accidentally unimplemented in real/sim classes.

src/main/java/frc/alotobots/library/subsystems/bling/io/BlingIOReal.java (2)

38-43: Avoid magic numbers for advanced configuration.
Some hardware configs (e.g., brightness scalar, LED type) might change from robot to robot. Consider extracting them into a configuration file or environment-based constants to handle multiple hardware variants.


69-73: Validate color range.
Though not strictly required, you might add a quick check to ensure color component values (0-255) are valid, protecting against corrupted data or unexpected negative or >255 values that might occur in edge cases.

src/main/java/frc/alotobots/library/subsystems/bling/constants/BlingConstants.java (2)

20-21: LED brightness bound check.
“MAX_LED_BRIGHTNESS = .25” is safe, but consider verifying at runtime that it is within [0.0, 1.0]. This helps prevent accidental configuration beyond safe hardware limits.


26-27: Clarify LED offset usage.
The LED_OFFSET constant might warrant a brief explanation about position indexing, particularly if the code references offset-based indexing for certain animations.

docs/mkdocs/docs/library/commands/bling/noalliancewaiting.md (1)

12-12: Minor punctuation or grammar refinement.
Static analysis indicates a “loose punctuation mark” around the bullet list. While this may be a false positive, consider confirming Markdown formatting for bullet items.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~12-~12: Loose punctuation mark.
Context: ...m blingSubsystem) ``` - blingSubsystem: The bling subsystem instance to control...

(UNLIKELY_OPENING_PUNCTUATION)

docs/mkdocs/docs/library/commands/bling/settoalliancecolor.md (1)

12-12: Confirm bullet formatting.
Similar to noalliancewaiting.md, you may want to verify that the bullet syntax and punctuation around the constructor parameter are correct to avoid potential formatting issues.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~12-~12: Loose punctuation mark.
Context: ...m blingSubsystem) ``` - blingSubsystem: The bling subsystem instance to control...

(UNLIKELY_OPENING_PUNCTUATION)

docs/mkdocs/docs/library/subsystems/bling.md (2)

3-3: Optional grammar improvement.
Consider adding “the” before “robot state” for additional clarity: “…visual feedback about the robot state…”

🧰 Tools
🪛 LanguageTool

[uncategorized] ~3-~3: You might be missing the article “the” here.
Context: ...vice. It provides visual feedback about robot state through different colors and anim...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


11-11: Double-check punctuation in the bullet list.
Static analysis flagged a “loose punctuation mark.” Verify that the list format around “- io: The BlingIO implementation…” is valid and renders properly.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~11-~11: Loose punctuation mark.
Context: ...c BlingSubsystem(BlingIO io) ``` - io: The BlingIO implementation to use (eith...

(UNLIKELY_OPENING_PUNCTUATION)

simgui-ds.json (2)

15-17: Consider using a more precise decimal value for keyRate

The current value 0.009999999776482582 appears to be a floating-point precision artifact. Consider using a cleaner value like 0.01.

-          "keyRate": 0.009999999776482582
+          "keyRate": 0.01

1-92: Add documentation for key code mappings

Consider adding comments or documentation that maps the numeric key codes to their corresponding keyboard keys. This will make the configuration more maintainable and easier to modify.

Example documentation format:

{
  "keyboardJoysticks": [
    {
      "buttonKeys": [
        90,  // Z key
        88,  // X key
        67,  // C key
        86   // V key
      ]
    }
  ]
}
🛑 Comments failed to post (1)
src/main/java/frc/alotobots/library/subsystems/bling/commands/SetToAllianceColor.java (1)

42-49: 💡 Codebase verification

Consider using NO_ALLIANCE_COLOR for better user feedback
I found that there's already a defined NO_ALLIANCE_COLOR (yellow) in BlingConstants.Colors that could be used as a fallback. The current behavior silently keeps the previous state, which might be less informative to users.

if (DriverStation.getAlliance().isPresent()) {
  if (DriverStation.getAlliance().get().equals(DriverStation.Alliance.Red)) {
    blingSubsystem.setSolidColor(RED_ALLIANCE_COLOR);
  } else {
    blingSubsystem.setSolidColor(BLUE_ALLIANCE_COLOR);
  }
} else {
  blingSubsystem.setSolidColor(NO_ALLIANCE_COLOR); // Add this
}
🔗 Analysis chain

Assess fallback behavior.
If no alliance is present, the LEDs remain unchanged. This might be intentional, but consider a default color or animation.


Let me search for any default color handling patterns in the codebase.


Let me search for the complete SetToAllianceColor class and any color constants defined.

🏁 Scripts executed

The following scripts were executed for the analysis:

Error: No shell scripts found


Script:

#!/bin/bash
# Search for default color definitions and usage in the bling subsystem
rg -A 5 "DEFAULT.*COLOR|fallback.*color" --type java

# Search for the BlingSubsystem class implementation to understand color handling
fd -e java BlingSubsystem.java --exec cat {}

# Look for other similar alliance-based color setting commands
ast-grep --pattern 'if (DriverStation.getAlliance().isPresent()) {
  $$$
}'

Length of output: 3307


Script:

#!/bin/bash
# Get the full SetToAllianceColor class implementation
fd -e java SetToAllianceColor.java --exec cat {}

# Search for color constants in the bling subsystem
rg -A 2 "Color.*=|COLOR.*=" --type java

Length of output: 8233

@SeanErn SeanErn merged commit 8721f50 into master Dec 23, 2024
3 checks passed
@SeanErn SeanErn deleted the bling branch December 23, 2024 21:58
@coderabbitai coderabbitai bot mentioned this pull request Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant