Files
allwpilib/wpilibj/src/main/java/org/wpilib/driverstation/UserControlsInstance.java
Thad House fb4bcefabc [wpilibj] Allow passing DS Instance to Robot and OpModes (#8626)
Some discussion with the tech team showed that there were some real
advantages to being able to pass a 2nd type. It allows separating the DS
and Robot. Additionally, we can make the DriverStationBase class
actually usable instead of the existing DriverStation class which is
impossible to handle in intellisense because it has too much.

This won't fully be doable in C++, but we will need to implement
something similar in python.
2026-03-20 14:05:48 -06:00

27 lines
882 B
Java

// 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 org.wpilib.driverstation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* An annotation to specify the UserControls implementation class to be used for a robot. Apply this
* annotation to your main robot class, providing a class that implements the UserControls
* interface.
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface UserControlsInstance {
/**
* The UserControls implementation class to be used.
*
* @return The class that implements UserControls.
*/
Class<? extends UserControls> value();
}