From 122999e6a7f44f1b1357c52d194add50aa78a075 Mon Sep 17 00:00:00 2001 From: Alekseev Date: Fri, 4 Jul 2025 02:22:15 +0700 Subject: [PATCH] Correct read and write --- Src/mainwindow.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Src/mainwindow.cpp b/Src/mainwindow.cpp index db196f4..dc9781e 100644 --- a/Src/mainwindow.cpp +++ b/Src/mainwindow.cpp @@ -199,11 +199,8 @@ void Mainwindows::onReadReady() { if (address == m_buttonRegisters[i]) { m_buttonValues[i] = value; bool bitState = (value >> m_buttonBits[i]) & 1; - m_buttons[i]->setText(QString("Reg %1 Bit %2: %3") - .arg(m_buttonRegisters[i]) - .arg(m_buttonBits[i]) - .arg(bitState ? "1" : "0")); - break; + m_buttons[i]->setText(QString("%1") + .arg(bitState ? "Закрыть" : "Открыть")); } } }