1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00

move serialport to new netwrok category (for 1.0)

This commit is contained in:
Dave Conway-Jones 2019-09-30 09:46:48 +01:00
parent 4168d48486
commit aa2965f000
No known key found for this signature in database
GPG Key ID: 302A6725C594817F
2 changed files with 8 additions and 6 deletions

View File

@ -23,7 +23,7 @@
<script type="text/javascript"> <script type="text/javascript">
RED.nodes.registerType('serial in',{ RED.nodes.registerType('serial in',{
category: 'input', category: 'network',
defaults: { defaults: {
name: {name:""}, name: {name:""},
serial: {type:"serial-port",required:true} serial: {type:"serial-port",required:true}
@ -38,7 +38,8 @@
}, },
labelStyle: function() { labelStyle: function() {
return this.name?"node_label_italic":""; return this.name?"node_label_italic":"";
} },
outputLabels: function() { return RED.nodes.node(this.serial).bin === "bin" ? "buffer" : "string"; }
}); });
</script> </script>
@ -62,7 +63,7 @@
<script type="text/javascript"> <script type="text/javascript">
RED.nodes.registerType('serial out',{ RED.nodes.registerType('serial out',{
category: 'output', category: 'network',
defaults: { defaults: {
name: {name:""}, name: {name:""},
serial: {type:"serial-port",required:true} serial: {type:"serial-port",required:true}
@ -121,7 +122,7 @@
<script type="text/javascript"> <script type="text/javascript">
RED.nodes.registerType('serial request',{ RED.nodes.registerType('serial request',{
category: 'function', category: 'network',
defaults: { defaults: {
name: {name:""}, name: {name:""},
serial: {type:"serial-port",required:true} serial: {type:"serial-port",required:true}
@ -137,7 +138,8 @@
}, },
labelStyle: function() { labelStyle: function() {
return this.name?"node_label_italic":""; return this.name?"node_label_italic":"";
} },
outputLabels: function() { return RED.nodes.node(this.serial).bin === "bin" ? "buffer" : "string"; }
}); });
</script> </script>

View File

@ -1,6 +1,6 @@
{ {
"name" : "node-red-node-serialport", "name" : "node-red-node-serialport",
"version" : "0.8.7", "version" : "0.8.8",
"description" : "Node-RED nodes to talk to serial ports", "description" : "Node-RED nodes to talk to serial ports",
"dependencies" : { "dependencies" : {
"serialport" : "^7.1.5" "serialport" : "^7.1.5"