Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions subprojects/robotpy-wpilib/gen/simulation/DCMotorSim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@ classes:
GetAngularAcceleration:
GetTorque:
GetInputVoltage:
Gearbox:
Gearing:
J:
GetGearbox:
GetGearing:
GetJ:

inline_code: |
cls_DCMotorSim
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just remembered, we added inline_code to classes for this use case didn't we?

// java API compatibility
.def("getAngularPositionRotations", [](const DCMotorSim &self) {
return units::turn_t{self.GetAngularPosition()};
}, py::doc("Returns the DC motor position in rotations"))
.def("getAngularVelocityRPM", [](const DCMotorSim &self) {
return units::revolutions_per_minute_t{self.GetAngularVelocity()};
}, py::doc("Returns the DC motor velocity in revolutions per minute"))
;
Loading