From e01de49d36440004dfb7e4e1f94e66405bd5ccca Mon Sep 17 00:00:00 2001 From: travis-farmer Date: Sun, 24 Nov 2024 05:33:10 -0500 Subject: [PATCH] Diag message fix --- IO_Modbus.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/IO_Modbus.cpp b/IO_Modbus.cpp index 7404b12..91891d1 100644 --- a/IO_Modbus.cpp +++ b/IO_Modbus.cpp @@ -522,8 +522,8 @@ void Modbus::_loop(unsigned long currentMicros) { // If we're between read/write cycles then don't do anything else. if (_currentMicros - _cycleStartTime < _cycleTime) return; // ... otherwise start processing the first node in the list - DIAG(F("Modbusnode: 138 _nodeListEnd:%d "), _nodeListEnd); - DIAG(F("Modbusnode: 139 _currentNode:%d "), _currentNode); + DIAG(F("Modbusnode: End _nodeListEnd:%d "), _nodeListEnd); + DIAG(F("Modbusnode: Cur _currentNode:%d "), _currentNode); _currentNode = _nodeListStart; DIAG(F("Modbusnode: 141 _currentNode:%d "), _currentNode); _cycleStartTime = _currentMicros; @@ -532,10 +532,10 @@ void Modbus::_loop(unsigned long currentMicros) { uint8_t error; error = modbusmaster->writeMultipleCoils(_currentNode->getNodeID(), 0, _currentNode->coils, _currentNode->getNumCoils()); - if (error != 0) DIAG(F("%02d %04d %04d %s"), _currentNode->getNodeID(), 0, _currentNode->getNumCoils(), errorStrings[error]); + if (error != 0) DIAG(F("Modbus: %02d %04d %04d %s"), _currentNode->getNodeID(), 0, _currentNode->getNumCoils(), errorStrings[error]); error = modbusmaster->readDiscreteInputs(_currentNode->getNodeID(), 0, _currentNode->discreteInputs, _currentNode->getNumDisInputs()); - if (error != 0) DIAG(F("%02d %04d %04d %s"), _currentNode->getNodeID(), 0, _currentNode->getNumDisInputs(), errorStrings[error]); + if (error != 0) DIAG(F("Modbus: %02d %04d %04d %s"), _currentNode->getNodeID(), 0, _currentNode->getNumDisInputs(), errorStrings[error]); } // Link to chain of CMRI bus instances