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

Suggestion: Annotation Processing for Components #91

Open
tomtzook opened this issue Dec 7, 2022 · 0 comments
Open

Suggestion: Annotation Processing for Components #91

tomtzook opened this issue Dec 7, 2022 · 0 comments

Comments

@tomtzook
Copy link
Member

tomtzook commented Dec 7, 2022

Add annotations for annotation processing to be used for easily creating controllers and sensors.

For example:

class DriveSystem extends Subsystem {
    @InjectMotorController(type="PwmTalon", channel=2)
    private SpeedController controller;

    @InjectGyro(type="AnalogGyro", channel=0)
    private Gyro gyroscope;
}

The values for those will then be created and injected with annotation processing.

Of course this would require an extendible processor to support new types with different arguments and each to be incased in an interface.

Can also use for simulation as such:

@Simulated(type = TankDriveSim.class, params=...)
class DriveSystem extends Subsystem {

}

Where the user specifies the type of the system to simulate and params about the system characteristics and the processor will generate simulation code for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant