Skip to content

armgit / flix

Public Imported from GitHub
0

Making an ESP32-based quadcopter from scratch

Minor fix

Oleg Kalachevacc0274175d2
diff --git a/flix/motors.ino b/flix/motors.ino
index 36b60e9..a0f7d6b 100644
--- a/flix/motors.ino
+++ b/flix/motors.ino
@@ -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);