got motor running

This commit is contained in:
Leonetienne
2025-12-14 18:57:28 +01:00
parent d339f5b297
commit bd906add53
14 changed files with 123 additions and 78 deletions
+2 -2
View File
@@ -66,7 +66,7 @@ void RangedMotor::setGearboxRatio(float gearboxRatio) noexcept
void RangedMotor::setScaleCalibration(float scaleCalibration) noexcept
{
if (abs(gearboxRatio) < COMP_EPSILON) {
if (abs(scaleCalibration) < COMP_EPSILON) {
StateMachine::getInstance().raiseError("Zero-scale-calibration was set on ranged motor!");
return;
}
@@ -129,5 +129,5 @@ float RangedMotor::hardwareAngleToVirtualAngle(float hardwareAngle) const noexce
float RangedMotor::calculateScaleCalibration(const float virtualRange, const float hardwareRange)
{
return virtualRange / hardwareRange;
return hardwareRange / virtualRange;
}