Compare commits
No commits in common. "38b27ba902eefecca75dcaf5f1e3f6be8d9c999e" and "f8a0799e9d100ead007009bf59709174a9802550" have entirely different histories.
38b27ba902
...
f8a0799e9d
|
@ -52,7 +52,7 @@ void MainWindow::OpenExplorerFile(bool isOriFileOpen)
|
|||
ui->tableWidget_detail->setRowCount(0);
|
||||
if (isOriFileOpen)
|
||||
{
|
||||
if (pQfile_ori && pQfile_ori->fileName() != filePath)
|
||||
if (pQfile_ori->fileName() != filePath)
|
||||
{
|
||||
pQfile_ori->close();
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ void MainWindow::OpenExplorerFile(bool isOriFileOpen)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (pQfile_key && pQfile_key->fileName() != filePath)
|
||||
if (pQfile_key->fileName() != filePath)
|
||||
{
|
||||
pQfile_key->close();
|
||||
}
|
||||
|
@ -369,8 +369,6 @@ QString MainWindow::AppendParse(DATA_TYPEDEF data)
|
|||
ret += "单点灯启动停止";
|
||||
ret += "-" + QString::number(data.buf[6] | data.buf[5] << 8 | data.buf[4] << 16 | data.buf[3] << 24, 10);
|
||||
|
||||
ret += "-回路" + QString::number(((data.buf[7] & 0xe0) >> 5) + 1, 10);
|
||||
|
||||
if (data.buf[7] & 0x01)
|
||||
{
|
||||
ret += "-标志灯";
|
||||
|
@ -537,88 +535,6 @@ QString MainWindow::AppendParse(DATA_TYPEDEF data)
|
|||
case 0x23:
|
||||
{
|
||||
ret += "应答灯具配置";
|
||||
if (data.buf[1] == 0x01)
|
||||
{
|
||||
ret += "-" + QString::number(data.buf[7] | data.buf[6] << 8 | data.buf[5] << 16 | data.buf[4] << 24, 10);
|
||||
}
|
||||
else if (data.buf[1] == 0x00)
|
||||
{
|
||||
ret += "-回路" + QString::number(data.buf[2], 10);
|
||||
ret += "-" + GetLampType(data.buf[3]);
|
||||
if (data.buf[3] == 0)
|
||||
{
|
||||
ret += "-ERROR";
|
||||
}
|
||||
else if (data.buf[3] != 229)
|
||||
{
|
||||
ret += "-";
|
||||
if (data.buf[4] & 0x20)
|
||||
{
|
||||
ret += "r点亮";
|
||||
}
|
||||
else
|
||||
{
|
||||
ret += "r熄灭";
|
||||
}
|
||||
if (data.buf[4] & 0x10)
|
||||
{
|
||||
ret += "l点亮";
|
||||
}
|
||||
else
|
||||
{
|
||||
ret += "l熄灭";
|
||||
}
|
||||
if (data.buf[4] & 0x02)
|
||||
{
|
||||
ret += "r点亮";
|
||||
}
|
||||
else
|
||||
{
|
||||
ret += "r熄灭";
|
||||
}
|
||||
if (data.buf[4] & 0x01)
|
||||
{
|
||||
ret += "l点亮";
|
||||
}
|
||||
else
|
||||
{
|
||||
ret += "l熄灭";
|
||||
}
|
||||
|
||||
ret += "-";
|
||||
if (data.buf[5] & 0x80)
|
||||
{
|
||||
ret += "点亮";
|
||||
}
|
||||
else
|
||||
{
|
||||
ret += "熄灭";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ret += "-";
|
||||
if (data.buf[4] & 0x01)
|
||||
{
|
||||
ret += "非节能";
|
||||
}
|
||||
else
|
||||
{
|
||||
ret += "节能";
|
||||
}
|
||||
|
||||
ret += "-";
|
||||
ret += QString::number((data.buf[5] & 0xf0) >> 4, 10);
|
||||
if (data.buf[5] & 0x01)
|
||||
{
|
||||
ret += "非节能";
|
||||
}
|
||||
else
|
||||
{
|
||||
ret += "节能";
|
||||
}
|
||||
}
|
||||
}
|
||||
}break;
|
||||
case 0x24:
|
||||
{
|
||||
|
@ -1223,6 +1139,8 @@ void MainWindow::PushButton_Clicked_Parse_Callback()
|
|||
}
|
||||
}
|
||||
|
||||
ui->tableWidget->resizeColumnsToContents();
|
||||
|
||||
byteArr = pQfile_ori->readLine(); // 继续下一行的读取
|
||||
context = codec->toUnicode(byteArr);
|
||||
disp = context;
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user