Merge branch 'master' into dev

This commit is contained in:
Nick O'Leary 2018-10-24 16:42:21 +01:00
commit e64f4e3f39
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
2 changed files with 12 additions and 11 deletions

View File

@ -24,8 +24,12 @@ module.exports = function(RED) {
try {
fs.statSync("/usr/lib/python2.7/dist-packages/RPi/GPIO"); // test on Hypriot
} catch(err) {
RED.log.warn("rpi-gpio : "+RED._("rpi-gpio.errors.libnotfound"));
allOK = false;
try {
fs.statSync("/usr/local/lib/python2.7/dist-packages/RPi/GPIO"); // installed with pip
} catch(err) {
RED.log.warn("rpi-gpio : "+RED._("rpi-gpio.errors.libnotfound"));
allOK = false;
}
}
}
}

View File

@ -100,9 +100,9 @@
defaults: {
name: {value:""},
mode: {value:"count"},
count: {value:10},
overlap: {value:0},
interval: {value:10},
count: {value:10,validate:function(v) { return RED.validators.number(v) && (v >= 1); }},
overlap: {value:0,validate:function(v) { return RED.validators.number(v) && (v >= 0); }},
interval: {value:10,validate:function(v) { return RED.validators.number(v) && (v >= 1); }},
allowEmptySequence: {value:false},
topics: {value:[{topic:""}]}
},
@ -149,12 +149,9 @@
removable: true
});
$("#node-input-count").spinner({
});
$("#node-input-overlap").spinner({
});
$("#node-input-interval").spinner({
});
$("#node-input-count").spinner({min:1});
$("#node-input-overlap").spinner({min:0});
$("#node-input-interval").spinner({min:1});
$("#node-input-mode").change(function(e) {
var val = $(this).val();
$(".node-row-msg-count").toggle(val==="count");