Skip to content

Commit

Permalink
fix: callback on digitalWrite on AOUT
Browse files Browse the repository at this point in the history
the callback on digitalWrite on AnalogOut was never invoked
due to error in arguments supplied to analogWrite()
  • Loading branch information
vaishnavachath committed Jul 2, 2018
1 parent 5f27270 commit 118f3e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ f.digitalWrite = function (pin, value, callback) {
var gpioEnabled = (7 == f.getPinMode(pin).mux); //check whether pin set as gpio
if (!gpioEnabled) {
winston.debug([pin.key, value] + ' set as ANALOG_OUTPUT modifying duty cycle according to value');
f.analogWrite(pin, value, myCallback); //write duty cycle as per value
f.analogWrite(pin, value, 2000, myCallback); //write duty cycle as per value
return (true);
}
}
Expand Down

0 comments on commit 118f3e9

Please sign in to comment.