Add support for REV Color Sensor V3 - #523
Merged
Merged
Conversation
Updated python_tools to code that processes function signatures.
Moved everything to python_data_toolbox.ts, but instead of always using robotPyData, getToolboxCategoriees takes a pythonData argument. Changed robotpy_toolbox getToolboxCategories to call python_data_toolbox getToolboxCategories with robotPyData
…a wpilib.I2C.Port enum value.
alan412
reviewed
Aug 24, 2026
alan412
left a comment
Collaborator
There was a problem hiding this comment.
I tried it on my systemcore and it worked. :-). Some minor nits in my review.
alan412
approved these changes
Aug 31, 2026
alan412
left a comment
Collaborator
There was a problem hiding this comment.
I really like the way you broke out _is_colorful_enough_to_detect_color and the tests
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Add support for REV Color Sensor V3, including blocks to get hue, saturation, and lightness from a wpiutil.Color value and blocks that tell whether a color is close to red, yellow, green, cyan, blue, or magenta.
Linked Issues
Fixes #453
Type of Change
How Has This Been Tested?
I created a new project and added a ColorSensorV3 component to my robot. I added code to my teleop to get the proximity and color from the sensor; print the hue, saturation, and value; print whether the color is red, yellow, green, cyan, blue, or magenta.
I tested this with a REV Color Sensor V3 plugged into an I2C port on Systemcore, using a custom-made cable.
Checklist