mirror of
https://github.com/okalachev/flix.git
synced 2025-08-17 17:16:10 +00:00
Minor fixes
This commit is contained in:
@@ -26,8 +26,8 @@ void setupMotors() {
|
||||
Serial.println("Motors initialized");
|
||||
}
|
||||
|
||||
uint8_t signalToDutyCycle(float control) {
|
||||
float duty = mapff(control, 0, 1, 0, (1 << PWM_RESOLUTION) - 1);
|
||||
uint8_t signalToDutyCycle(float signal) {
|
||||
float duty = mapff(signal, 0, 1, 0, (1 << PWM_RESOLUTION) - 1);
|
||||
return round(constrain(duty, 0, (1 << PWM_RESOLUTION) - 1));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user