Skip to content

Commit de7406f

Browse files
author
Ананьев Александр
committed
Corrected creation of modbus address map
1 parent 861deb3 commit de7406f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

omodsim/modbusmultiserver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ QModbusDataUnitMap ModbusMultiServer::createDataUnitMap()
8989
endAddress = qMax<quint16>(endAddress, unit.startAddress() + unit.valueCount());
9090
}
9191

92-
const quint16 length = endAddress - startAddress + 1;
92+
const quint16 length = endAddress - startAddress;
9393
if(length > 0) modbusMap.insert(type, {type, startAddress, length});
9494
}
9595
return modbusMap;

0 commit comments

Comments
 (0)