FtcRobotController icon indicating copy to clipboard operation
FtcRobotController copied to clipboard

API to Set/Get Driver Station Color Scheme

Open AlecHub opened this issue 4 years ago • 6 comments

We would like our OpModes to be able to query the Color Scheme Selection of the Driver Station. Of particular interest to our OpModes are the Red and Blue Color Scheme selections:

RedBlue

The active Driver Station Color Scheme could be sent to the Robot Controller as part of the Init Message (the message that gets sent to the Robot Controller when the driver taps INIT).

Teams could assign any semantic they like to the colors. EDIT: For example, a large team will have several drivers. Each driver may have their own preference of Gamepad Scheme. A Driver Station Color Scheme could be assigned to each Gamepad Scheme making it much easier to manage the Gamepad Schemes.

Also, it would be nice to be able to change the Driver Station Color Scheme without having to restart the App.

AlecHub avatar Oct 30 '21 13:10 AlecHub

Out of curiosity what is the desired use case?

Windwoes avatar Nov 01 '21 16:11 Windwoes

I am not the OP, but my guess is have the students set the color scheme of the driver station based off of their alliance and then the robot can select the correct autonomous to run based off of which alliance it is on.

alan412 avatar Nov 01 '21 16:11 alan412

I am not the OP, but my guess is have the students set the color scheme of the driver station based off of their alliance and then the robot can select the correct autonomous to run based off of which alliance it is on.

That is one possible use case. I wanted to be vague so that I don't steer teams away from use cases that may be higher priority for them (although "Red" and "Blue" are hardly vague ;)

My personal preference is the opposite approach: allow the OpMode to dynamically change the Driver Station Color Scheme to any 32-bit color as a form of Telemetry or status indication. Or better yet, a bi-directional approach (getDSColor(), setDSColor()), analogous with many of the other APIs.

AlecHub avatar Nov 01 '21 17:11 AlecHub

For what it's worth, I love the idea of being able to set from the robot. We typically allow the drive coach to set the alliance color during init and that lights up LEDs on the robot showing which alliance. Also showing on the screen would be pretty neat.

alan412 avatar Nov 01 '21 20:11 alan412

Out of curiosity what is the desired use case?

I understand and appreciate the question. My thinking is we should let teams get creative with the feature.

AlecHub avatar Nov 02 '21 16:11 AlecHub

Themes are immutable once applied, which is why the applications require a restart after changing the color theme. I don't think this has changed within the Android ecosystem since the feature was implemented.

cmacfarl avatar Nov 02 '21 17:11 cmacfarl