mirror of
https://github.com/okalachev/flix.git
synced 2026-01-10 21:16:50 +00:00
Minor fix
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user