rpm function added for part 1
This commit is contained in:
@@ -44,6 +44,10 @@ void RotaryEncoderDriver::update_delta() {
|
||||
|
||||
float RotaryEncoderDriver::count_per_sec() {
|
||||
return delta / (256.0f * 0.0001f);
|
||||
}
|
||||
|
||||
float RotaryEncoderDriver::rpm() {
|
||||
return (count_per_sec() * 60) / 1050.0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user