Cleanup, use printf

This commit is contained in:
Oleg Kalachev
2023-05-24 11:22:59 +03:00
parent 17edd0ee00
commit 1125335b16
3 changed files with 1 additions and 20 deletions

View File

@@ -26,21 +26,3 @@ void step() {
stepsPerSecondCurrentLast = time;
}
}
void _step() {
steps++;
auto currentStepTime = micros();
if (stepTime == 0) {
stepTime = currentStepTime;
}
dt = (currentStepTime - stepTime) / 1000000.0;
stepTime = currentStepTime;
// compute steps per second, TODO: move to func
stepsPerSecondCurrent++;
if (stepTime - stepsPerSecondCurrentLast >= 1000000) {
stepsPerSecond = stepsPerSecondCurrent;
stepsPerSecondCurrent = 0;
stepsPerSecondCurrentLast = stepTime;
}
}