Skip to content

Commit

Permalink
Add getRangeMM and getRangeInches to Ultrasonic to match Java
Browse files Browse the repository at this point in the history
  • Loading branch information
virtuald committed Dec 5, 2023
1 parent ac0c6eb commit be348fa
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions subprojects/robotpy-wpilib/gen/Ultrasonic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,13 @@ classes:
IsEnabled:
SetEnabled:
InitSendable:

inline_code: |
cls_Ultrasonic
.def("getRangeMM", [](const frc::Ultrasonic &self) -> units::millimeter_t {
return self.GetRange();
})
.def("getRangeInches", [](const frc::Ultrasonic &self) -> units::inch_t {
return self.GetRange();
})
;

0 comments on commit be348fa

Please sign in to comment.