Skip to content

Suggestion: Annotation Processing for Components #91

@tomtzook

Description

@tomtzook

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions