Skip to content

[java] Use units for more input parameters #8191

@SamCarlberg

Description

@SamCarlberg

While doing math with Java units can be a pain because of the lack of operator overloading, there are still many simple API methods that can have unit overloads to make configuration easier. Some good places that can be updated are:

  • TimedRobot.addPeriodic and TimedRobot constructor - there can be overloads for Time and Frequency so users can use whatever units are most appropriate for their programs
  • Timer.hasElapsed and Timer.delay
  • BooleanEvent.debounce and the Debouncer constructors
  • Watchdog.timeout and constructors
  • Field2d.setRobotPose and FieldObject2d.setPose
  • Notifier.startSingle and Notifier.startPeriodic (periodic can also use overloads for Time and Frequency)

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomers.type: featureBrand new functionality, features, pages, workflows, endpoints, etc.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions