mirror of
https://github.com/okalachev/flix.git
synced 2025-07-27 09:39:33 +00:00
Minor fix
This commit is contained in:
parent
edd249566e
commit
acc0274175
@ -26,7 +26,7 @@ void setupMotors() {
|
||||
Serial.println("Motors initialized");
|
||||
}
|
||||
|
||||
uint8_t getDutyCycle(float value) { // TODO: for canonical
|
||||
uint8_t getDutyCycle(float value) {
|
||||
value = constrain(value, 0, 1);
|
||||
float duty = mapff(value, 0, 1, 0, (1 << PWM_RESOLUTION) - 1);
|
||||
return round(duty);
|
||||
|
Loading…
x
Reference in New Issue
Block a user