node-red-contrib-modbus-modpackqt 3.3.27 → 3.3.28
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.
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
const node = this;
|
|
28
28
|
|
|
29
29
|
// ── My Slaves picker
|
|
30
|
+
let selectedProtocol = 'tcp'; // track selected slave protocol for renderLink
|
|
30
31
|
const $sel = $('#node-input-modpackqt-slave-picker');
|
|
31
32
|
const reload = function () {
|
|
32
33
|
$sel.empty().append('<option value="">— Loading… —</option>');
|
|
@@ -62,6 +63,7 @@
|
|
|
62
63
|
// RTU slaves have no port — keep whatever TCP port is already set
|
|
63
64
|
if (row.protocol !== 'rtu' && row.port) $('#node-input-bindPort').val(row.port);
|
|
64
65
|
$('#node-input-unitId').val(row.unitId || 1);
|
|
66
|
+
selectedProtocol = row.protocol || 'tcp';
|
|
65
67
|
buildLink();
|
|
66
68
|
});
|
|
67
69
|
reload();
|
|
@@ -77,6 +79,7 @@
|
|
|
77
79
|
const bindPort = $('#node-input-bindPort').val() || node.bindPort || 1502;
|
|
78
80
|
const unitId = $('#node-input-unitId').val() || node.unitId || 1;
|
|
79
81
|
const name = $('#node-input-name').val() || node.name || '';
|
|
82
|
+
const isRtu = selectedProtocol === 'rtu';
|
|
80
83
|
const url = 'https://modpackqt.com/slave'
|
|
81
84
|
+ '?probe=' + encodeURIComponent(node.id || '')
|
|
82
85
|
+ '&probeHost=' + encodeURIComponent(probeHost)
|
|
@@ -86,7 +89,10 @@
|
|
|
86
89
|
+ (name ? '&name=' + encodeURIComponent(name) : '');
|
|
87
90
|
$('#modpackqt-slave-server-link').attr('href', url);
|
|
88
91
|
$('#modpackqt-slave-server-runtime').text(probeHost + ':' + probePort);
|
|
89
|
-
|
|
92
|
+
const targetText = isRtu
|
|
93
|
+
? 'RTU · unit ' + unitId
|
|
94
|
+
: ':' + bindPort + ' · unit ' + unitId;
|
|
95
|
+
$('#modpackqt-slave-server-target').text(targetText);
|
|
90
96
|
};
|
|
91
97
|
buildLink();
|
|
92
98
|
$('#node-input-bindPort, #node-input-unitId').on('change input', buildLink);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-modbus-modpackqt",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.28",
|
|
4
4
|
"description": "Modbus commissioning, testing & analysis tools for Node-RED. Embedded Modbus TCP/RTU master + slave server, FC1/FC2/FC3/FC4 reads, FC5/FC6/FC15/FC16 writes, built-in slave register store, and a passive traffic monitor for debugging. 100% free, MIT, no usage limits. By ModPackQT — open the matching web console at modpackqt.com for register decoding, simulation and AI assistance.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"node-red",
|