From b10d1141c444de8334c31ff7568e834b982ecd46 Mon Sep 17 00:00:00 2001 From: kekcheburec Date: Fri, 15 Apr 2022 14:59:23 +0300 Subject: [PATCH] Fix _update function bug in led lib --- modules/@amperka/led.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/@amperka/led.js b/modules/@amperka/led.js index cf8cd6b..6c538fc 100644 --- a/modules/@amperka/led.js +++ b/modules/@amperka/led.js @@ -100,7 +100,7 @@ Led.prototype.brightness = function(value) { Led.prototype._update = function() { var b = this._brightness; - if (b > 0 && b < 1.0) { + if (b > 0 && b <= 1.0) { analogWrite(this._pin, b * b * b * this._on, { freq: 100 }); } else { digitalWrite(this._pin, this._on);