From 62de9d9796b5714159aac454a4654739a6351d2c Mon Sep 17 00:00:00 2001 From: travis-farmer Date: Mon, 25 Nov 2024 05:50:33 -0500 Subject: [PATCH] fix function names: getNumDiscreteInputs --- IO_Modbus.cpp | 4 ++-- IO_Modbus.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/IO_Modbus.cpp b/IO_Modbus.cpp index 02e8b37..757e3ce 100644 --- a/IO_Modbus.cpp +++ b/IO_Modbus.cpp @@ -531,8 +531,8 @@ void Modbus::_loop(unsigned long currentMicros) { error = modbusmaster->writeMultipleCoils(_currentNode->getNodeID(), 0, _currentNode->coils, _currentNode->getNumCoils()); if (error != 0) DIAG(F("ModbusMC: %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("ModbusDI: %02d %04d %04d %s"), _currentNode->getNodeID(), 0, _currentNode->getNumDisInputs(), &errorStrings[error]); + error = modbusmaster->readDiscreteInputs(_currentNode->getNodeID(), 0, _currentNode->discreteInputs, _currentNode->getNumDiscreteInputs()); + if (error != 0) DIAG(F("ModbusDI: %02d %04d %04d %s"), _currentNode->getNodeID(), 0, _currentNode->getNumDiscreteInputs(), &errorStrings[error]); error = modbusmaster->readInputRegisters(_currentNode->getNodeID(), 0, _currentNode->inputRegisters, _currentNode->getNumInputRegisters()); if (error != 0) DIAG(F("ModbusIR: %02d %04d %04d %s"), _currentNode->getNodeID(), 0, _currentNode->getNumInputRegisters(), &errorStrings[error]); diff --git a/IO_Modbus.h b/IO_Modbus.h index 7590e87..6cd8271 100644 --- a/IO_Modbus.h +++ b/IO_Modbus.h @@ -210,7 +210,7 @@ public: uint8_t getNumCoils() { return numCoils; } - uint8_t getNumDisInputs() { + uint8_t getNumDiscreteInputs() { return numDiscreteInputs; } uint8_t getNumHoldingRegisters() {