Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
sanny32 committed Sep 22, 2023
2 parents 0ea3274 + 8280c8c commit 2c3d44f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions omodscan/dialogs/dialogaddressscan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ void DialogAddressScan::on_modbusReply(QModbusReply* reply)
if (reply->error() == QModbusDevice::NoError)
updateTableView(reply->result().startAddress() + 1, reply->result().values());

if(ui->lineEditLength->value<int>() <= _requestCount)
if(ui->lineEditLength->value<int>() < _requestCount)
stopScan();
else
sendReadRequest();
Expand Down Expand Up @@ -654,7 +654,7 @@ void DialogAddressScan::updateLogView(const QModbusRequest& request)

quint16 pointAddress;
request.decodeData(&pointAddress);
const auto address = formatAddress(pointType, pointAddress);
const auto address = formatAddress(pointType, pointAddress + 1);

QByteArray rawData;
rawData.push_back(deviceId);
Expand Down
4 changes: 3 additions & 1 deletion omodscan/dialogs/dialogmodbusscanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,9 @@ void DialogModbusScanner::on_deviceFound(const ConnectionDetails& cd, int device
for(int i = 0; i < ui->listWidget->count(); ++i)
{
auto item = ui->listWidget->item(i);
if(item && item->data(Qt::UserRole).value<ConnectionDetails>() == cd)
if(item &&
item->data(Qt::UserRole).value<ConnectionDetails>() == cd &&
item->data(Qt::UserRole + 1).toInt() == deviceId)
{
foundItem = item;
break;
Expand Down
2 changes: 1 addition & 1 deletion omodscan/omodscan.pro
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ CONFIG += c++17
CONFIG -= debug_and_release
CONFIG -= debug_and_release_target

VERSION = 1.5.1
VERSION = 1.5.2

QMAKE_TARGET_PRODUCT = "Open ModScan"
QMAKE_TARGET_DESCRIPTION = "An Open Source Modbus Master (Client) Utility"
Expand Down

0 comments on commit 2c3d44f

Please sign in to comment.