Skip to content

Commit

Permalink
Merge pull request #473 from emcell/master
Browse files Browse the repository at this point in the history
fix(modbus-client): respect parallelUnitIdsAllowed in queue
  • Loading branch information
biancode committed Jun 27, 2024
2 parents 253b199 + 5c3345f commit b6145e9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-red-contrib-modbus",
"version": "5.40.0",
"version": "5.41.0",
"private": false,
"description": "The all in one Modbus TCP and Serial contribution long term supported package for Node-RED.",
"dependencies": {
Expand Down
13 changes: 10 additions & 3 deletions src/modbus-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,18 @@ module.exports = function (RED) {

if (state.matches('queueing')) {
if (node.clienttype === 'tcp') {
node.stateService.send('SEND')
if (!node.parallelUnitIdsAllowed) {
if (node.serialSendingAllowed) {
coreModbusQueue.queueSerialLockCommand(node);
node.stateService.send('SEND');
}
} else {
node.stateService.send('SEND');
}
} else {
if (node.serialSendingAllowed) {
coreModbusQueue.queueSerialLockCommand(node)
node.stateService.send('SEND')
coreModbusQueue.queueSerialLockCommand(node);
node.stateService.send('SEND');
}
}
}
Expand Down

0 comments on commit b6145e9

Please sign in to comment.