Commit Graph

6 Commits

Author SHA1 Message Date
Kavin Muralikrishnan
6eb652e10e [xrp] Copy XRPReference docs from Java to C++ (NFC) (#7388) 2024-11-16 07:24:21 -08:00
Kavin Muralikrishnan
280d2c7e32 [examples] Update C++ XRP Code to use SI Units (#7366) 2024-11-08 20:24:13 -08:00
Jade
57fa388724 [examples] Prepare for RobotInit deprecation by updating examples (#6623)
Co-authored-by: Tyler Veness <calcmogul@gmail.com>
2024-07-16 20:22:39 -07:00
Tyler Veness
e7c9f27683 [wpilib] Add functional interface equivalents to MotorController (#6053)
This does not deprecate any current functionality, but prepares the way for future deprecation.

The drive classes now accept void(double) functions, which makes them more flexible.

The C++ API ended up a bit more verbose, but the Java API is really concise with method references, which is >80% of our userbase. For example:

`DifferentialDrive drive = new DifferentialDrive(m_leftMotor::set, m_rightMotor::set);`

Lambdas can be passed to interoperate with vendor motor controller APIs that don't have e.g., set(double), so CTRE doesn't have to maintain their WPI_ classes anymore.

MotorControllerGroup was replaced with PWMMotorController.addFollower() for PWM motor controllers. Users of CAN motor controllers should use their vendor's follower functionality.
2024-01-01 13:37:51 -08:00
ncorrea210
8798700cec [wpilibcExamples] Add inline specifier to constexpr constants (#6049) 2023-12-14 20:52:02 -08:00
Zhiquan Yeo
fb07b0da49 [examples] Add XRP C++ Examples and Templates (#5743) 2023-10-09 16:55:54 -07:00