Starlight220
Starlight220
If there's some minimal code to test this, I might be able to run it on hardware.
~~Are you sure that the units there are seconds and not ms?~~ Ok nvm I saw the comment in #4331 .
I recommend matching C++: https://github.com/wpilibsuite/allwpilib/blob/faa29d596c9a01447a36fd5eaa18e8ad28434ad4/wpilibc/src/main/native/include/frc/DigitalOutput.h#L78-L86 (editing C++ to match Java is also fine)
Still need to do: - [x] Figure out factories. **Will be in a separate PR** (along with Java). - [x] Figure out user-defined command classes. **EDIT:** Other than a `ToPtr`...
/wpiformat
> We want to be able to initialize Trajectorys in a delayed manner, but Sample() can't be given a sane behavior before the user does that. (@calcmogul, https://github.com/wpilibsuite/allwpilib/pull/3184#issuecomment-797826915) I do...
Yes, but as it's intended as an escape hatch rather than the common use form, having it as a factory method makes more sense to me.
It kindof does: currently, there's a constructor for advanced users and a `TrajectoryGenerator` factory method for the common use. Which is more discoverable, and which is the one that should...
I disagree. The intuitive way to construct an object (at least in Java) is via the constructor, not via a factory method in a utility class. Therefore, the constructor is...
If that constructor isn't the primary way to get a `Trajectory`, it should be clearly indicated (at least in the API docs) and point to whatever *is* the primary way...