Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix _update function bug in led lib #96

Merged
merged 1 commit into from
Apr 17, 2022
Merged

Conversation

kekcheburec
Copy link
Contributor

При быстром изменении яркости с 0.2 по 0.9 на 1.0, и после вызова turnOff, не происходит выключение светодиода. Светодиод светит с той же яркостью, что была задана до смены на 1.0.

Пример программы:

var led = require('@amperka/led').connect(LED1);

led.turnOn();
led.brightness(0.9);
led.brightness(1.0);
led.turnOff();

Содержимое объекта led:

{ "_pin": B6, "_on": false, "_brightness": 1, "_blinkTimeoutID": null,
  "_blinkOnTime": 0, "_blinkOffTime": 0 }

Метод _update вызывается, но условие не выполняется.

Copy link
Member

@knopki knopki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, если протестировано в железе.

@kekcheburec kekcheburec merged commit c509ab1 into master Apr 17, 2022
@kekcheburec kekcheburec deleted the fix-_update-fn-bug branch April 17, 2022 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants