mirror of
https://github.com/okalachev/flix.git
synced 2026-06-28 05:56:44 +00:00
Make motor parameters apply without reboot
Add callback to parameter definition to call after parameter is changed.
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user