expand and fix digitalIO class
This commit is contained in:
@@ -47,7 +47,7 @@ const bool remoteIO::setOutPort(const std::vector<bool> values)
|
||||
return false;
|
||||
auto lock = m_bus.getLock();
|
||||
LOG_DEBUG("Write Port", CH_MAX);
|
||||
return m_bus.writeCoils(m_address, CH_MAX, values);
|
||||
return m_bus.writeCoils(m_address, REG_COILS, values);
|
||||
}
|
||||
|
||||
const bool remoteIO::getOut(const channel_t ch, bool &value)
|
||||
@@ -69,7 +69,7 @@ const bool remoteIO::getOutPort(std::vector<bool> &values)
|
||||
return false;
|
||||
auto lock = m_bus.getLock();
|
||||
LOG_DEBUG("Read Port", CH_MAX);
|
||||
return m_bus.readCoils(m_address, REG_COILS, 8, values);
|
||||
return m_bus.readCoils(m_address, REG_COILS, CH_MAX, values);
|
||||
}
|
||||
|
||||
const bool remoteIO::getIn(const channel_t input, bool &value)
|
||||
|
||||
Reference in New Issue
Block a user