From 787f9f3c8b13d740aa140c10f7cc89bf271b3732 Mon Sep 17 00:00:00 2001 From: chenyf <1343619937@qq.com> Date: Tue, 24 Dec 2024 13:53:35 +0800 Subject: [PATCH] fix(null): null --- .vscode/settings.json | 3 +- CMakeLists.txt.user | 2 +- mainwindow.cpp | 81 ++++++++++++++++++++++++++++++++++++++++++- mainwindow.ui | 78 +++++++++++++++++++++++++++++++++++++++-- 4 files changed, 159 insertions(+), 5 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 9a68422..0d3d1bd 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -53,6 +53,7 @@ "variant": "cpp", "qabstractsocket": "cpp", "qtimer": "cpp", - "qstringlist": "cpp" + "qstringlist": "cpp", + "qapplication": "cpp" } } \ No newline at end of file diff --git a/CMakeLists.txt.user b/CMakeLists.txt.user index 2c96cc7..77ad853 100644 --- a/CMakeLists.txt.user +++ b/CMakeLists.txt.user @@ -1,6 +1,6 @@ - + EnvironmentId diff --git a/mainwindow.cpp b/mainwindow.cpp index 4d230ba..cc4ec86 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -219,6 +219,15 @@ MainWindow::MainWindow(QWidget *parent) ui->le_zy_ch3->setText("0.02"); ui->le_pz_ch4->setText("1.5"); ui->le_zy_ch4->setText("0.05"); + // + ui->le_gain_17->setText("1.2"); + ui->le_gain_18->setText("1.2"); + ui->le_gain_19->setText("1.2"); + ui->le_gain_20->setText("1.2"); + ui->le_gain_21->setText("1.2"); + ui->le_gain_22->setText("1.2"); + ui->le_gain_23->setText("1.2"); + ui->le_delay_onebyone->setText("3000"); ui->le_p15_speed->setText("9490"); ui->le_p17_speed->setText("9000"); @@ -617,6 +626,76 @@ void MainWindow::cmd_fpga() { tcp_socket->write(data); tcp_socket->waitForBytesWritten(); } + { + _sleep(100); + cmd = "test_set_gain_bias 16"; + cmd += " "; + cmd += ui->le_gain_17->text(); + cmd += " \r\n"; + data = cmd.toUtf8(); + tcp_socket->write(data); + tcp_socket->waitForBytesWritten(); + } + { + _sleep(100); + cmd = "test_set_gain_bias 17"; + cmd += " "; + cmd += ui->le_gain_18->text(); + cmd += " \r\n"; + data = cmd.toUtf8(); + tcp_socket->write(data); + tcp_socket->waitForBytesWritten(); + } + { + _sleep(100); + cmd = "test_set_gain_bias 18"; + cmd += " "; + cmd += ui->le_gain_19->text(); + cmd += " \r\n"; + data = cmd.toUtf8(); + tcp_socket->write(data); + tcp_socket->waitForBytesWritten(); + } + { + _sleep(100); + cmd = "test_set_gain_bias 19"; + cmd += " "; + cmd += ui->le_gain_20->text(); + cmd += " \r\n"; + data = cmd.toUtf8(); + tcp_socket->write(data); + tcp_socket->waitForBytesWritten(); + } + { + _sleep(100); + cmd = "test_set_gain_bias 20"; + cmd += " "; + cmd += ui->le_gain_21->text(); + cmd += " \r\n"; + data = cmd.toUtf8(); + tcp_socket->write(data); + tcp_socket->waitForBytesWritten(); + } + { + _sleep(100); + cmd = "test_set_gain_bias 21"; + cmd += " "; + cmd += ui->le_gain_22->text(); + cmd += " \r\n"; + data = cmd.toUtf8(); + tcp_socket->write(data); + tcp_socket->waitForBytesWritten(); + } + { + _sleep(100); + cmd = "test_set_gain_bias 22"; + cmd += " "; + cmd += ui->le_gain_23->text(); + cmd += " \r\n"; + data = cmd.toUtf8(); + tcp_socket->write(data); + tcp_socket->waitForBytesWritten(); + } } } void MainWindow::start_fpga() { @@ -1009,7 +1088,7 @@ void MainWindow::fpga_page_prv() { } void MainWindow::fpga_page_nxt() { - if (ui->fpga_set_page->currentIndex() < 2) { + if (ui->fpga_set_page->currentIndex() < ui->fpga_set_page->count()-1) { ui->fpga_set_page->setCurrentIndex(ui->fpga_set_page->currentIndex() + 1); } } diff --git a/mainwindow.ui b/mainwindow.ui index 4561a85..4e01a0a 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -696,7 +696,7 @@ - 2 + 0 @@ -722,7 +722,7 @@ - 0 + 2 @@ -892,6 +892,80 @@ + + + + + + 通道21: + + + + + + + 通道23: + + + + + + + 通道20: + + + + + + + 通道18: + + + + + + + 通道17: + + + + + + + 通道19: + + + + + + + 通道22: + + + + + + + + + + + + + + + + + + + + + + + + + +