Skip to content

Commit bc04784

Browse files
committed
esp32: drop unused channel argument
1 parent e0d26d1 commit bc04784

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/esp32/Servo.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ class ServoImpl {
5454
#endif
5555
}
5656

57-
void set(const uint8_t _channel, const uint32_t duration_us) {
57+
void set(const uint32_t duration_us) {
5858
ledcWrite(ref(), LEDC_US_TO_TICKS(duration_us));
5959
}
6060

61-
uint32_t get(const uint8_t _channel) const {
61+
uint32_t get() const {
6262
return LEDC_TICKS_TO_US(ledcRead(ref()));
6363
}
6464

@@ -137,7 +137,7 @@ void Servo::writeMicroseconds(int value)
137137
else if (value > SERVO_MAX())
138138
value = SERVO_MAX();
139139

140-
servos[this->servoIndex]->set(this->servoIndex, value);
140+
servos[this->servoIndex]->set(value);
141141
}
142142
}
143143

@@ -151,7 +151,7 @@ int Servo::readMicroseconds()
151151
if (!servos[this->servoIndex]) {
152152
return 0;
153153
}
154-
return servos[this->servoIndex]->get(this->servoIndex);
154+
return servos[this->servoIndex]->get();
155155
}
156156

157157
bool Servo::attached()

0 commit comments

Comments
 (0)