[wpilib] Tachometer: Add function to return RPS (#3833)

This commit is contained in:
Oblarg
2021-12-26 18:52:18 -05:00
committed by GitHub
parent 84b15f0883
commit baacbc8e24
5 changed files with 77 additions and 8 deletions

View File

@@ -75,6 +75,15 @@ class Tachometer : public wpi::Sendable,
*/
void SetEdgesPerRevolution(int edges);
/**
* Gets the current tachometer revolutions per second.
*
* SetEdgesPerRevolution must be set with a non 0 value for this to work.
*
* @return Current RPS.
*/
units::turns_per_second_t GetRevolutionsPerSecond() const;
/**
* Gets the current tachometer revolutions per minute.
*