diff --git a/lib/Service/src/DifferentialDrive.cpp b/lib/Service/src/DifferentialDrive.cpp index 069ad5f..2ce2c07 100644 --- a/lib/Service/src/DifferentialDrive.cpp +++ b/lib/Service/src/DifferentialDrive.cpp @@ -251,7 +251,7 @@ void DifferentialDrive::calculateLinearSpeedLeftRight(int16_t linearSpeedCenter, int32_t wheelBase32 = static_cast(RobotConstants::WHEEL_BASE); /* [mm] */ int32_t encoderStepsPerM32 = static_cast(RobotConstants::ENCODER_STEPS_PER_M); /* [steps/m] */ int32_t linearSpeedTurnInPlace32 = - (angularSpeed32 * wheelBase32 * encoderStepsPerM32) / (2 * 1000 * 1000); /* [steps/s] */ + (angularSpeed32 * wheelBase32 * encoderStepsPerM32) / static_cast(2000000); /* [steps/s] */ linearSpeedLeft = halfLinearSpeedCenter32 - linearSpeedTurnInPlace32; /* [steps/s] */ linearSpeedRight = halfLinearSpeedCenter32 + linearSpeedTurnInPlace32; /* [steps/s] */