mirror of
https://github.com/okalachev/flix.git
synced 2025-07-27 17:49:33 +00:00
Minor fix
This commit is contained in:
parent
edd249566e
commit
acc0274175
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user