mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
fix blink node fade times...
This commit is contained in:
parent
6c3dbbbfbb
commit
9539c3674f
@ -22,7 +22,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<label for="node-input-fade"><i class="fa fa-signal"></i> Fade (mS)</label>
|
<label for="node-input-fade"><i class="fa fa-signal"></i> Fade (mS)</label>
|
||||||
<input type="text" id="node-input-fade" placeholder="500">
|
<input type="text" id="node-input-fade" placeholder="between 0 and 60,000 mS (1 min)">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
||||||
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
<script type="text/x-red" data-help-name="blink1">
|
<script type="text/x-red" data-help-name="blink1">
|
||||||
<p>ThingM Blink1 output node.</p>
|
<p>ThingM Blink1 output node.</p>
|
||||||
<p>Expects a <b>msg.payload</b> with either a three part csv string of
|
<p>Expects a <b>msg.payload</b> with either a three part csv string of
|
||||||
<i>r,g,b</i> or a hex colour <i>#rrggbb</i></p>
|
<i>r,g,b</i> or a hex colour <i>#rrggbb</i></p>
|
||||||
<p>You can also use the <a href="http://www.cheerlights.com/control-cheerlights" target="_new">@cheerlights</a>
|
<p>You can also use the <a href="http://www.cheerlights.com/control-cheerlights" target="_new">@cheerlights</a>
|
||||||
colour names - red, green, blue, cyan, magenta, yellow, orange, pink,
|
colour names - red, green, blue, cyan, magenta, yellow, orange, pink,
|
||||||
|
@ -24,6 +24,8 @@ module.exports = function(RED) {
|
|||||||
this.serial = n.serial;
|
this.serial = n.serial;
|
||||||
if (!this.serial) { delete this.serial; }
|
if (!this.serial) { delete this.serial; }
|
||||||
this.fade = Number(n.fade) || 500;
|
this.fade = Number(n.fade) || 500;
|
||||||
|
if (this.fade < 0) { this.fade = 0; }
|
||||||
|
if (this.fade > 60000) { this.fade = 60000; }
|
||||||
var node = this;
|
var node = this;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"version" : "0.0.12",
|
"version" : "0.0.12",
|
||||||
"description" : "A Node-RED node to control a Thingm Blink(1)",
|
"description" : "A Node-RED node to control a Thingm Blink(1)",
|
||||||
"dependencies" : {
|
"dependencies" : {
|
||||||
"node-blink1" : "0.2.2"
|
"node-blink1" : "0.2.3"
|
||||||
},
|
},
|
||||||
"repository" : {
|
"repository" : {
|
||||||
"type":"git",
|
"type":"git",
|
||||||
|
Loading…
Reference in New Issue
Block a user