Qt6 compatability changes

This commit is contained in:
Nav
2021-08-18 22:51:15 +01:00
parent 29ab3aa3b8
commit 01c20339f3
7 changed files with 16 additions and 14 deletions

View File

@@ -18,7 +18,7 @@ void WriteRegister::init() {
}
auto packetSegments = QString::fromStdString(packet).split("=");
this->registerNumber = static_cast<int>(packetSegments.front().midRef(1).toUInt(nullptr, 16));
this->registerNumber = static_cast<int>(packetSegments.front().mid(1).toUInt(nullptr, 16));
this->registerValue = Packet::hexToData(packetSegments.back().toStdString());
std::reverse(this->registerValue.begin(), this->registerValue.end());
}