version 2025-08-08; refactoring

This commit is contained in:
rasta5man 2025-08-08 16:29:39 +02:00
parent 1012544193
commit cf16481324
2 changed files with 3 additions and 2 deletions

View file

@ -1529,7 +1529,7 @@ exports.install = function(instance) {
// await keyword is important, otherwise incorrect data is returned!
await writeData(rsPort, resp, readBytes, timeout).then(function(data) {
//sometimes happens, that status of node changes even if line was turned off and should be offline. To prevent this, we return if line contactor is 0:
//sometimes happens, that status of node changes to OK, NOK even if line was turned off and should be status OFFLINE. To prevent this, we return if line contactor is 0:
if (itIsNodeCommand && line && relaysData[line].contactor !== 1) return;
endTime = new Date();
@ -1650,6 +1650,7 @@ exports.install = function(instance) {
}
// if node does not respond to request, we repeat request 3 times:
function repeatCommand(params) {
params.repeatCounter++;
if (params.repeatCounter < 4) {