Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #686 from robotpy/sim-inches
Browse files Browse the repository at this point in the history
Add getDistanceInches functions
  • Loading branch information
virtuald committed Feb 15, 2021
2 parents 5c5729d + cde7e0f commit 1b7ea32
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gen/simulation/DifferentialDrivetrainSim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,18 @@ inline_code: |
.def("getLeftPositionFeet", [](DifferentialDrivetrainSim * self) -> units::foot_t {
return self->GetLeftPosition();
})
.def("getLeftPositionInches", [](DifferentialDrivetrainSim * self) -> units::inch_t {
return self->GetLeftPosition();
})
.def("getLeftVelocityFps", [](DifferentialDrivetrainSim * self) -> units::feet_per_second_t {
return self->GetLeftVelocity();
})
.def("getRightPositionFeet", [](DifferentialDrivetrainSim * self) -> units::foot_t {
return self->GetRightPosition();
})
.def("getRightPositionInches", [](DifferentialDrivetrainSim * self) -> units::inch_t {
return self->GetRightPosition();
})
.def("getRightVelocityFps", [](DifferentialDrivetrainSim * self) -> units::feet_per_second_t {
return self->GetRightVelocity();
})
Expand Down
3 changes: 3 additions & 0 deletions gen/simulation/ElevatorSim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ inline_code: |
.def("getPositionFeet", [](ElevatorSim * self) -> units::foot_t {
return self->GetPosition();
})
.def("getPositionInches", [](ElevatorSim * self) -> units::inch_t {
return self->GetPosition();
})
.def("getVelocityFps", [](ElevatorSim * self) -> units::feet_per_second_t {
return self->GetVelocity();
})
Expand Down

0 comments on commit 1b7ea32

Please sign in to comment.