node-red-contrib-modbus-rtu 1.1.26 → 1.1.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/modbus_rtu.html +10 -0
  2. package/package.json +1 -1
package/modbus_rtu.html CHANGED
@@ -3,6 +3,7 @@
3
3
  category: 'function',
4
4
  color: '#fff000',
5
5
  defaults: {
6
+ name: {value: "ModbusRTU Tools"},
6
7
  slave_id: {
7
8
  value: ""
8
9
  },
@@ -20,6 +21,10 @@
20
21
  outputs: 1,
21
22
  icon: 'bridge.png',
22
23
  label: function() {
24
+ const _name = "ModbusRTU Tools";
25
+ if(!(this.name == "" || this.name == _name)){
26
+ return _name;
27
+ }
23
28
  if (this.fn == "-1") {
24
29
  return "ModbusRTU fn=DYNAMIC";
25
30
  } else if (this.fn == "-2") {
@@ -71,6 +76,11 @@
71
76
  <div class="form-row">
72
77
  <h3>modbus_rtu Build payload msg</h3><hr>
73
78
  <div/>
79
+ <div class="form-row">
80
+ <label for="node-input-name"><i class="fa fa-tag"></i>Name</label>
81
+ <input type="text" id="node-input-name" value="" placeholder="Custom name">
82
+ </div>
83
+ <hr>
74
84
  <div class="form-row">
75
85
  <label for="node-input-fn"><i class="fa fa-tag"></i> Function</label>
76
86
  <select id="node-input-fn" style="width:70%">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-modbus-rtu",
3
- "version": "1.1.26",
3
+ "version": "1.1.27",
4
4
  "description": "Node-RED function build content modbus_rtu - Code by DoDuyCop",
5
5
  "author": "duycop",
6
6
  "license": "MIT",