1
0
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:
Dave Conway-Jones 2016-02-04 21:03:43 +00:00
parent 6c3dbbbfbb
commit 9539c3674f
3 changed files with 5 additions and 3 deletions

View File

@ -22,7 +22,7 @@
</div>
<div class="form-row">
<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 class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>

View File

@ -24,6 +24,8 @@ module.exports = function(RED) {
this.serial = n.serial;
if (!this.serial) { delete this.serial; }
this.fade = Number(n.fade) || 500;
if (this.fade < 0) { this.fade = 0; }
if (this.fade > 60000) { this.fade = 60000; }
var node = this;
try {

View File

@ -3,7 +3,7 @@
"version" : "0.0.12",
"description" : "A Node-RED node to control a Thingm Blink(1)",
"dependencies" : {
"node-blink1" : "0.2.2"
"node-blink1" : "0.2.3"
},
"repository" : {
"type":"git",