Massimo 4 лет назад
Родитель
Сommit
c8e93985d4
5 измененных файлов: 13 добавлений и 2 удалений
  1. +1
    -1
      CHANGELOG.md
  2. +1
    -0
      README.md
  3. +1
    -0
      boolean-logic-ultimate/BlinkerUltimate.html
  4. +9
    -0
      boolean-logic-ultimate/BlinkerUltimate.js
  5. +1
    -1
      package.json

+ 1
- 1
CHANGELOG.md Просмотреть файл

@@ -4,7 +4,7 @@
<a href="http://eepurl.com/gJm095" target="_blank">Subscribe to my channel.</a> Only news about my nodes, no spam, no ads. I'm a github developer, not a merchant.

<p>
<b>Version 1.0.13</b><br/>
<b>Version 1.0.14</b><br/>
- NEW: added blinker node. Thanks to @Marco for the suggestion.</br>
</p>
<p>

+ 1
- 0
README.md Просмотреть файл

@@ -111,6 +111,7 @@ The input message is preserved and passed to the output pin, changing only the t
The pourpose of this node is to blink a led or something.<br />
Pass <code>msg.payload = true</code> to start blinking</br>
Pass <code>msg.payload = false</code> to stop blinking</br>
Pass <code>msg.interval = 2000</code> to change the blinking interval</br>

<img src='https://raw.githubusercontent.com/Supergiovane/node-red-contrib-boolean-logic-ultimate/master/img/blinker.png' width='60%'>


+ 1
- 0
boolean-logic-ultimate/BlinkerUltimate.html Просмотреть файл

@@ -44,6 +44,7 @@
<p>The meaning of this node is to blink a light or something else.<br/>
<p>Pass msg.payload = true to start blinking</br>
Pass msg.payload = false to stop blinking</br>
Pass msg.interval = 2000 to change the blinking interval</br>
</p>
<a href="https://www.paypal.me/techtoday" target="_blank"><img src='https://img.shields.io/badge/Donate-PayPal-blue.svg?style=flat-square' width='30%'></a>


+ 9
- 0
boolean-logic-ultimate/BlinkerUltimate.js Просмотреть файл

@@ -20,8 +20,17 @@ module.exports = function (RED) {
if (node.tBlinker !== null) clearInterval(node.tBlinker);
setNodeStatus({ fill: "red", shape: "dot", text: "|| Off" });
node.send({ payload: false });
node.curPayload = false;
}
}
if (msg.hasOwnProperty("interval")) {
try {
node.blinkfrequency = msg.interval;
} catch (error) {
node.blinkfrequency = 500;
setNodeStatus({ fill: "red", shape: "dot", text: "Invalid interval received" });
}
}

});


+ 1
- 1
package.json Просмотреть файл

@@ -1,6 +1,6 @@
{
"name": "node-red-contrib-boolean-logic-ultimate",
"version": "1.0.13",
"version": "1.0.14",
"description": "A set of Node-RED enhanced boolean logic, with persisten values after reboot and more",
"author": "Supergiovane (https://github.com/Supergiovane)",
"dependencies": {

Загрузка…
Отмена
Сохранить