2015-11-01 15:58:24 +01:00
|
|
|
<script type="text/x-red" data-template-name="rpi-lcd">
|
|
|
|
<div class="form-row">
|
2020-06-16 00:11:53 +02:00
|
|
|
<label for="node-input-pins"><i class="fa fa-circle"></i> <span data-i18n="pilcd.label.pins"></label>
|
2015-11-01 15:58:24 +01:00
|
|
|
<input type="text" id="node-input-pins" placeholder="RS,E,D4,D5,D6,D7">
|
|
|
|
</div>
|
|
|
|
<br/>
|
|
|
|
<div class="form-row">
|
2020-06-16 00:11:53 +02:00
|
|
|
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="node-red:common.label.name"></label>
|
|
|
|
<input type="text" id="node-input-name" data-i18n="[placeholder]node-red:common.label.name">
|
2015-11-01 15:58:24 +01:00
|
|
|
</div>
|
2020-06-16 00:11:53 +02:00
|
|
|
<div class="form-tips" data-i18n="[html]pilcd.tip.tip"></div>
|
2015-11-01 15:58:24 +01:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
RED.nodes.registerType('rpi-lcd',{
|
|
|
|
category: 'Raspberry Pi',
|
|
|
|
color:"#c6dbef",
|
|
|
|
defaults: {
|
|
|
|
name: { value:"" },
|
|
|
|
pins: { value:"", required:true, validate:RED.validators.regex(/^\d+,\d+,\d+,\d+,\d+,\d+$/) }
|
|
|
|
},
|
|
|
|
inputs:1,
|
|
|
|
outputs:0,
|
|
|
|
align:"right",
|
|
|
|
icon:"rpi.png",
|
|
|
|
label:function() {
|
|
|
|
return this.name||"Pi LCD";
|
|
|
|
},
|
|
|
|
labelStyle:function() {
|
|
|
|
return this.name?"node_label_italic":"";
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|