Bug: Unwanted change resistance in x9c component (#5483)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
Wojciech Banaś 2023-12-21 08:03:57 +01:00 committed by GitHub
parent f096f107e2
commit d73ad39aed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,6 +7,10 @@ namespace x9c {
static const char *const TAG = "x9c.output"; static const char *const TAG = "x9c.output";
void X9cOutput::trim_value(int change_amount) { void X9cOutput::trim_value(int change_amount) {
if (change_amount == 0) {
return;
}
if (change_amount > 0) { // Set change direction if (change_amount > 0) { // Set change direction
this->ud_pin_->digital_write(true); this->ud_pin_->digital_write(true);
} else { } else {