Skip to content

Commit

Permalink
Merge pull request #14 from voipminic/patch-1
Browse files Browse the repository at this point in the history
fixed onDemand function
  • Loading branch information
rlogiacco authored May 3, 2018
2 parents d3a261f + 9f45359 commit 5759687
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Battery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ void Battery::begin(uint16_t refVoltage, float dividerRatio, mapFn_t mapFunction
}

void Battery::onDemand(uint8_t activationPin, uint8_t activationMode) {
if (this->activationPin < 0xFF) {
if (activationPin < 0xFF) {
this->activationPin = activationPin;
this->activationMode = activationMode;
pinMode(this->activationPin, OUTPUT);
digitalWrite(activationPin, !activationMode);
Expand Down

0 comments on commit 5759687

Please sign in to comment.