Skip to content

Commit

Permalink
Merge pull request #84 from thorrak/espi
Browse files Browse the repository at this point in the history
Revert 00bc5bf
  • Loading branch information
thorrak authored Mar 24, 2023
2 parents 24e3aa5 + a3de7ff commit ace0b7a
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/ActuatorArduinoPin.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,9 @@ class DigitalPinActuator ACTUATOR_BASE_CLASS_DECL
pinMode(pin, OUTPUT);
}

inline ACTUATOR_METHOD void setActive(bool active) {
this->active = active;
if((active && !invert) || (!active && invert)) digitalWrite(pin, HIGH);
else digitalWrite(pin, LOW);
// The xor originally used isn't working on this branch. Very strange, as none of the other code has changed.
// digitalWrite(pin, active^invert ? HIGH : LOW);
inline ACTUATOR_METHOD void setActive(bool active_setting) {
this->active = active_setting;
digitalWrite(pin, active_setting^invert ? HIGH : LOW);
}

bool isActive() { return active; }
Expand Down

0 comments on commit ace0b7a

Please sign in to comment.