mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
NLS Core nodes
NLS exec node NLS function/temple/delay nodes NLS function/template/delay/trigger/comment nodes NLS io nodes (mqtt/httpin/websocket/watch/serial) NLS messages.json for tcpin NLS io nodes (tcpin & udp half) NLS io nodes (udp) NLS logic nodes (switch/change) NLS logic (range) and parsers (csv&html) nodes NLS parser nodes (json/xml) NLS test case update for logic/parsers NLS analysis and hardware nodes NLS storage nodes (file/redisout/mongodb) and test NLS storage node (tail) NLS social nodes (feedparse/email/irc) NLS socal node (twitter half change) NLS social node (twitter) and core node (unknown)
This commit is contained in:
committed by
Nick O'Leary
parent
c105b2df37
commit
2fe859b111
@@ -16,9 +16,9 @@
|
||||
|
||||
<script type="text/x-red" data-template-name="rpi-gpio in">
|
||||
<div class="form-row">
|
||||
<label for="node-input-pin"><i class="fa fa-circle"></i> GPIO Pin</label>
|
||||
<label for="node-input-pin"><i class="fa fa-circle"></i> <span data-i18n="rpi-gpio.label.gpiopin"></span></label>
|
||||
<select type="text" id="node-input-pin" style="width: 250px;">
|
||||
<option value='' disabled selected style='display:none;'>select pin</option>
|
||||
<option value='' disabled selected style='display:none;'><span data-i18n="rpi-gpio.label.selectpin"></span></option>
|
||||
<option value="3">3 - SDA1 - BCM2</option>
|
||||
<option value="5">5 - SCL1 - BCM3</option>
|
||||
<option value="7">7 - GPIO7 - BCM4</option>
|
||||
@@ -40,25 +40,25 @@
|
||||
<span id="pitype"></span>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-intype"><i class="fa fa-level-up"></i> Resistor ?</label>
|
||||
<label for="node-input-intype"><i class="fa fa-level-up"></i> <span data-i18n="rpi-gpio.label.registor"></span></label>
|
||||
<select type="text" id="node-input-intype" style="width: 150px;">
|
||||
<option value="tri">none</option>
|
||||
<option value="up">pullup</option>
|
||||
<option value="down">pulldown</option>
|
||||
<option value="tri" data-i18n="rpi-gpio.none"></option>
|
||||
<option value="up" data-i18n="rpi-gpio.pullup"></option>
|
||||
<option value="down" data-i18n="rpi-gpio.pulldown"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label> </label>
|
||||
<input type="checkbox" id="node-input-read" style="display: inline-block; width: auto; vertical-align: top;">
|
||||
<label for="node-input-read" style="width: 70%;">Read initial state of pin on deploy/restart ?</label>
|
||||
<label for="node-input-read" style="width: 70%;"><span data-i18n="rpi-gpio.label.readinitial"></span></label>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="form-row">
|
||||
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
||||
<input type="text" id="node-input-name" placeholder="Name">
|
||||
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label>
|
||||
<input type="text" id="node-input-name" data-i18n="[placeholder]common.label.nameph">
|
||||
</div>
|
||||
<div class="form-tips" id="pin-tip"><b>Pins in Use</b>: </div>
|
||||
<div class="form-tips">Tip: Only Digital Input is supported - input must be 0 or 1.</div>
|
||||
<div class="form-tips" id="pin-tip"><span data-i18n="[html]rpi-gpio.pin-tip"></span></div>
|
||||
<div class="form-tips"><span data-i18n="[html]rpi-gpio.in-tip"></span></div>
|
||||
</script>
|
||||
|
||||
<script type="text/x-red" data-help-name="rpi-gpio in">
|
||||
@@ -97,6 +97,10 @@
|
||||
},
|
||||
oneditprepare: function() {
|
||||
var pinnow = this.pin;
|
||||
var pintip = this._("rpi-gpio.pin-tip");
|
||||
var pinname = this._("rpi-gpio.pinname");
|
||||
var alreadyuse = this._("rpi-gpio.alreadyuse");
|
||||
var alreadyset = this._("rpi-gpio.alreadyset");
|
||||
$.getJSON('rpi-gpio/'+this.id,function(data) {
|
||||
$('#pitype').text(data.type);
|
||||
if ((data.type === "Model B+") || (data.type === "Model A+")) {
|
||||
@@ -117,14 +121,14 @@
|
||||
|
||||
$.getJSON('rpi-pins/'+this.id,function(data) {
|
||||
pinsInUse = data || {};
|
||||
$('#pin-tip').html("<b>Pins in Use</b>: "+Object.keys(data));
|
||||
$('#pin-tip').html(pintip + Object.keys(data));
|
||||
});
|
||||
|
||||
$("#node-input-pin").change(function() {
|
||||
var pinnew = $("#node-input-pin").val();
|
||||
if ((pinnew) && (pinnew !== pinnow)) {
|
||||
if (pinsInUse.hasOwnProperty(pinnew)) {
|
||||
RED.notify("Pin "+pinnew+" already in use.","warn");
|
||||
RED.notify(pinname+" "+pinnew+" "+alreadyuse,"warn");
|
||||
}
|
||||
pinnow = pinnew;
|
||||
}
|
||||
@@ -133,7 +137,7 @@
|
||||
$("#node-input-intype").change(function() {
|
||||
var newtype = $("#node-input-intype option:selected").val();
|
||||
if ((pinsInUse.hasOwnProperty(pinnow)) && (pinsInUse[pinnow] !== newtype)) {
|
||||
RED.notify("Pin "+pinnow+" already set as "+pinsInUse[pinnow],"error");
|
||||
RED.notify(pinname+" "+pinnow+" "+alreadyset+" "+pinsInUse[pinnow],"error");
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -142,9 +146,9 @@
|
||||
|
||||
<script type="text/x-red" data-template-name="rpi-gpio out">
|
||||
<div class="form-row">
|
||||
<label for="node-input-pin"><i class="fa fa-circle"></i> GPIO Pin</label>
|
||||
<label for="node-input-pin"><i class="fa fa-circle"></i> <span data-i18n="rpi-gpio.label.gpiopin"></span></label>
|
||||
<select type="text" id="node-input-pin" style="width: 250px;">
|
||||
<option value='' disabled selected style='display:none;'>select pin</option>
|
||||
<option value='' disabled selected style='display:none;'><span data-i18n="rpi-gpio.label.selectpin"></span></option>
|
||||
<option value="3">3 - SDA1 - BCM2</option>
|
||||
<option value="5">5 - SCL1 - BCM3</option>
|
||||
<option value="7">7 - GPIO7 - BCM4</option>
|
||||
@@ -166,32 +170,32 @@
|
||||
<span id="pitype"></span>
|
||||
</div>
|
||||
<div class="form-row" id="node-set-pwm">
|
||||
<label> Type</label>
|
||||
<label> <span data-i18n="rpi-gpio.label.type"></span></label>
|
||||
<select id="node-input-out" style="width: 250px;">
|
||||
<option value="out">Digital output</option>
|
||||
<option value="pwm">PWM output</option>
|
||||
<option value="out" data-i18n="rpi-gpio.digout"></option>
|
||||
<option value="pwm" data-i18n="rpi-gpio.pwmout"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-row" id="node-set-tick">
|
||||
<label> </label>
|
||||
<input type="checkbox" id="node-input-set" style="display: inline-block; width: auto; vertical-align: top;">
|
||||
<label for="node-input-set" style="width: 70%;">Initialise pin state ?</label>
|
||||
<label for="node-input-set" style="width: 70%;"><span data-i18n="rpi-gpio.label.initpin"></span></label>
|
||||
</div>
|
||||
<div class="form-row" id="node-set-state">
|
||||
<label for="node-input-level"> </label>
|
||||
<select id="node-input-level" style="width: 250px;">
|
||||
<option value="0">initial level of pin - low (0)</option>
|
||||
<option value="1">initial level of pin - high (1)</option>
|
||||
<option value="0" data-i18n="rpi-gpio.initpin0"></option>
|
||||
<option value="1" data-i18n="rpi-gpio.initpin1"></option>
|
||||
</select>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="form-row">
|
||||
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
||||
<input type="text" id="node-input-name" placeholder="Name">
|
||||
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label>
|
||||
<input type="text" id="node-input-name" data-i18n="[placeholder]common.label.nameph">
|
||||
</div>
|
||||
<div class="form-tips" id="pin-tip"><b>Pins in Use</b>: </div>
|
||||
<div class="form-tips" id="dig-tip"><b>Tip</b>: For digital output - input must be 0 or 1.</div>
|
||||
<div class="form-tips" id="pwm-tip"><b>Tip</b>: For PWM output - input must be between 0 to 100.</div>
|
||||
<div class="form-tips" id="pin-tip"><span data-i18n="[html]rpi-gpio.pin-tip"></span></div>
|
||||
<div class="form-tips" id="dig-tip"><span data-i18n="[html]rpi-gpio.dig-tip"></span></div>
|
||||
<div class="form-tips" id="pwm-tip"><span data-i18n="[html]rpi-gpio.pwm-tip"></span></div>
|
||||
</script>
|
||||
|
||||
<script type="text/x-red" data-help-name="rpi-gpio out">
|
||||
@@ -234,6 +238,10 @@
|
||||
},
|
||||
oneditprepare: function() {
|
||||
var pinnow = this.pin;
|
||||
var pintip = this._("rpi-gpio.pin-tip");
|
||||
var pinname = this._("rpi-gpio.pinname");
|
||||
var alreadyuse = this._("rpi-gpio.alreadyuse");
|
||||
var alreadyset = this._("rpi-gpio.alreadyset");
|
||||
if (!$("#node-input-out").val()) { $("#node-input-out").val("out"); }
|
||||
$.getJSON('rpi-gpio/'+this.id,function(data) {
|
||||
$('#pitype').text(data.type);
|
||||
@@ -255,14 +263,14 @@
|
||||
|
||||
$.getJSON('rpi-pins/'+this.id,function(data) {
|
||||
pinsInUse = data || {};
|
||||
$('#pin-tip').html("<b>Pins in Use</b>: "+Object.keys(data));
|
||||
$('#pin-tip').html(pintip + Object.keys(data));
|
||||
});
|
||||
|
||||
$("#node-input-pin").change(function() {
|
||||
var pinnew = $("#node-input-pin").val();
|
||||
if ((pinnew) && (pinnew !== pinnow)) {
|
||||
if (pinsInUse.hasOwnProperty(pinnew)) {
|
||||
RED.notify("Pin "+pinnew+" already in use.","warn");
|
||||
RED.notify(pinname+" "+pinnew+" "+alreadyuse,"warn");
|
||||
}
|
||||
pinnow = pinnew;
|
||||
}
|
||||
@@ -271,7 +279,7 @@
|
||||
$("#node-input-out").change(function() {
|
||||
var newtype = $("#node-input-out option:selected").val();
|
||||
if ((pinsInUse.hasOwnProperty(pinnow)) && (pinsInUse[pinnow] !== newtype)) {
|
||||
RED.notify("Pin "+pinnow+" already set as "+pinsInUse[pinnow],"error");
|
||||
RED.notify(pinname+" "+pinnow+" "+alreadyset+" "+pinsInUse[pinnow],"error");
|
||||
}
|
||||
});
|
||||
|
||||
@@ -307,17 +315,17 @@
|
||||
|
||||
<script type="text/x-red" data-template-name="rpi-mouse">
|
||||
<div class="form-row">
|
||||
<label for="node-input-butt"><i class="fa fa-circle"></i> Button</label>
|
||||
<label for="node-input-butt"><i class="fa fa-circle"></i> <span data-i18n="rpi-gpio.label.button"></span></label>
|
||||
<select type="text" id="node-input-butt" style="width: 250px;">
|
||||
<option value="1">left</option>
|
||||
<option value="2">right</option>
|
||||
<option value="4">middle</option>
|
||||
<option value="7">any</option>
|
||||
<option value="1" data-i18n="rpi-gpio.left"></option>
|
||||
<option value="2" data-i18n="rpi-gpio.right"></option>
|
||||
<option value="4" data-i18n="rpi-gpio.middle"></option>
|
||||
<option value="7" data-i18n="rpi-gpio.any"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
||||
<input type="text" id="node-input-name" placeholder="Name">
|
||||
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label>
|
||||
<input type="text" id="node-input-name" data-i18n="[placeholder]common.label.nameph">
|
||||
</div>
|
||||
</script>
|
||||
|
||||
@@ -341,10 +349,10 @@
|
||||
outputs:1,
|
||||
icon: "rpi.png",
|
||||
label: function() {
|
||||
var na = "Pi Mouse";
|
||||
if (this.butt === "1") { na += " Left"; }
|
||||
if (this.butt === "2") { na += " Right"; }
|
||||
if (this.butt === "4") { na += " Middle"; }
|
||||
var na = this._("rpi-gpio.label.pimouse");
|
||||
if (this.butt === "1") { na += " "+this._("rpi-gpio.label.left"); }
|
||||
if (this.butt === "2") { na += " "+this._("rpi-gpio.label.right"); }
|
||||
if (this.butt === "4") { na += " "+this._("rpi-gpio.label.middle"); }
|
||||
return this.name||na;
|
||||
},
|
||||
labelStyle: function() {
|
||||
|
Reference in New Issue
Block a user