mirror of
https://github.com/x-tools-author/x-tools.git
synced 2025-09-15 15:28:40 +08:00
fix: ReadInputRegisters function code error
This commit is contained in:
parent
cccedb3532
commit
9307afcdc5
@ -20,6 +20,7 @@ V7.4.0 2025年xx月xx日
|
||||
bug修复:
|
||||
01. udp服务器发送数据失败时,服务器被关闭(修复方案:离线客户端将被移除)
|
||||
02. 从文件菜单新建窗口时,页面显示异常
|
||||
03. modbus都输入寄存器指令错误
|
||||
优化:
|
||||
01. 图表数据显示
|
||||
|
||||
|
||||
@ -1951,7 +1951,7 @@ li.checked::marker { content: "\2612"; }
|
||||
<message>
|
||||
<location filename="../../src/tools/modbus/modbusassistant.cpp" line="238"/>
|
||||
<source>0x04-ReadInputRegisters</source>
|
||||
<translation>0x40-读输入寄存器</translation>
|
||||
<translation>0x04-读输入寄存器</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/tools/modbus/modbusassistant.cpp" line="239"/>
|
||||
|
||||
@ -480,7 +480,10 @@ void Page::onInputFormatChanged()
|
||||
// If the input panels are visible, hide the line edit or plain text edit
|
||||
// to make ui simple.
|
||||
bool rightPanelVisible = ui->widgetInputPanels->isVisible();
|
||||
if (!rightPanelVisible) {
|
||||
if (rightPanelVisible) {
|
||||
ui->lineEditInput->setVisible(true);
|
||||
ui->plainTextEditInput->setVisible(true);
|
||||
} else {
|
||||
ui->lineEditInput->setVisible(usingLineEdit);
|
||||
ui->plainTextEditInput->setVisible(!usingLineEdit);
|
||||
}
|
||||
|
||||
@ -16,8 +16,8 @@ InputPanelsManager::InputPanelsManager(QWidget *parent)
|
||||
: PanelManager(parent)
|
||||
{
|
||||
addPanel<LuaPanel>(tr("Lua Script"), ":/res/icons/lua.svg");
|
||||
addPanel<FrameSerialNumber>(tr("Frame Serial Number"), ":/res/icons/counter_1.svg");
|
||||
#if 0
|
||||
addPanel<FrameSerialNumber>(tr("Frame Serial Number"), ":/res/icons/counter_1.svg");
|
||||
addPanel<XYModemSender>(tr("XYModem Sender"), ":/res/icons/xy.svg");
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -232,14 +232,14 @@ void ModbusAssistant::initComponentParity()
|
||||
|
||||
void ModbusAssistant::initComponentFunctionCode()
|
||||
{
|
||||
const QString str0x01 = tr("0x01-ReadCoils");
|
||||
const QString str0x02 = tr("0x02-ReadDiscreteInputs");
|
||||
const QString str0x03 = tr("0x03-ReadHoldingRegisters");
|
||||
const QString str0x04 = tr("0x04-ReadInputRegisters");
|
||||
const QString str0x05 = tr("0x05-WriteSingleCoil");
|
||||
const QString str0x06 = tr("0x06-WriteSingleRegister");
|
||||
const QString str0x0f = tr("0x0f-WriteMultipleCoils");
|
||||
const QString str0x10 = tr("0x10-WriteMultipleRegisters");
|
||||
const QString str0x01 = "0x01-" + tr("ReadCoils");
|
||||
const QString str0x02 = "0x02-" + tr("ReadDiscreteInputs");
|
||||
const QString str0x03 = "0x03-" + tr("ReadHoldingRegisters");
|
||||
const QString str0x04 = "0x04-" + tr("ReadInputRegisters");
|
||||
const QString str0x05 = "0x05-" + tr("WriteSingleCoil");
|
||||
const QString str0x06 = "0x06-" + tr("WriteSingleRegister");
|
||||
const QString str0x0f = "0x0f-" + tr("WriteMultipleCoils");
|
||||
const QString str0x10 = "0x10-" + tr("WriteMultipleRegisters");
|
||||
|
||||
int func0x01 = QModbusDataUnit::Coils;
|
||||
int func0x02 = QModbusDataUnit::DiscreteInputs;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user