Make motor parameters apply without reboot

Add callback to parameter definition to call after parameter is changed.
This commit is contained in:
Oleg Kalachev
2026-02-19 04:56:12 +03:00
parent b2daf2587f
commit a687303062
3 changed files with 12 additions and 8 deletions
+1
View File
@@ -24,6 +24,7 @@ void setupMotors() {
// configure pins
for (int i = 0; i < 4; i++) {
ledcAttach(motorPins[i], pwmFrequency, pwmResolution);
pwmFrequency = ledcChangeFrequency(motorPins[i], pwmFrequency, pwmResolution); // when reconfiguring
}
sendMotors();
print("Motors initialized\n");