Minor fix

This commit is contained in:
Oleg Kalachev 2024-12-25 02:21:17 +03:00
parent edd249566e
commit acc0274175

View File

@ -26,7 +26,7 @@ void setupMotors() {
Serial.println("Motors initialized"); Serial.println("Motors initialized");
} }
uint8_t getDutyCycle(float value) { // TODO: for canonical uint8_t getDutyCycle(float value) {
value = constrain(value, 0, 1); value = constrain(value, 0, 1);
float duty = mapff(value, 0, 1, 0, (1 << PWM_RESOLUTION) - 1); float duty = mapff(value, 0, 1, 0, (1 << PWM_RESOLUTION) - 1);
return round(duty); return round(duty);