Fix the calculateFPS function

This commit is contained in:
Matt McWilliams 2024-01-22 11:39:27 -05:00
parent ec5915a6f9
commit b32f6ad476
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ volatile int lastFramePosition = 0;
volatile int frames = 0;
float calculateFPS (long timeLength, int frames) {
return (float) frames / (float) timeLength;
return 1000.0 / ((float) frames / (float) timeLength);
}
float calculateRPM (long rotationLength) {
return 60000.0 / (float) (rotationLength);