Add step_delay option to X9C component (#6890)

This commit is contained in:
Oliver Hihn
2024-06-12 11:09:26 +02:00
committed by GitHub
parent 2044c7e4d4
commit df52bc3493
10 changed files with 15 additions and 2 deletions
+3 -2
View File
@@ -22,9 +22,9 @@ void X9cOutput::trim_value(int change_amount) {
for (int i = 0; i < abs(change_amount); i++) { // Move wiper
this->inc_pin_->digital_write(true);
delayMicroseconds(1);
delayMicroseconds(this->step_delay_);
this->inc_pin_->digital_write(false);
delayMicroseconds(1);
delayMicroseconds(this->step_delay_);
}
delayMicroseconds(100); // Let value settle
@@ -69,6 +69,7 @@ void X9cOutput::dump_config() {
LOG_PIN(" Increment Pin: ", this->inc_pin_);
LOG_PIN(" Up/Down Pin: ", this->ud_pin_);
ESP_LOGCONFIG(TAG, " Initial Value: %f", this->initial_value_);
ESP_LOGCONFIG(TAG, " Step Delay: %d", this->step_delay_);
LOG_FLOAT_OUTPUT(this);
}