Skip to content

Add static factory sugar for Java control requests #45

@Oblarg

Description

@Oblarg

Instead of forcing users to manually call constructors with new, static factories wrapping the different control request types would improve readability:

motor.setControl(dutyCycle(1.0));

// compare to:
motor.setControl(new DutyCycleOut(1.0));

Implementation and maintenance cost for the static factories should be basically zero.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions