fix(null): null

This commit is contained in:
chenyf 2024-12-24 13:53:35 +08:00
parent 5af8901fdb
commit 787f9f3c8b
4 changed files with 159 additions and 5 deletions

View File

@ -53,6 +53,7 @@
"variant": "cpp",
"qabstractsocket": "cpp",
"qtimer": "cpp",
"qstringlist": "cpp"
"qstringlist": "cpp",
"qapplication": "cpp"
}
}

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.12.2, 2024-12-08T13:00:41. -->
<!-- Written by QtCreator 4.12.2, 2024-12-23T14:44:02. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>

View File

@ -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);
}
}

View File

@ -696,7 +696,7 @@
<item>
<widget class="QStackedWidget" name="sw_config">
<property name="currentIndex">
<number>2</number>
<number>0</number>
</property>
<widget class="QWidget" name="page_7">
<layout class="QGridLayout" name="gridLayout_16">
@ -722,7 +722,7 @@
<item row="0" column="0" colspan="2">
<widget class="QStackedWidget" name="fpga_set_page">
<property name="currentIndex">
<number>0</number>
<number>2</number>
</property>
<widget class="QWidget" name="page_3">
<layout class="QGridLayout" name="gridLayout_12">
@ -892,6 +892,80 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="page_10">
<layout class="QGridLayout" name="gridLayout_23">
<item row="4" column="0">
<widget class="QLabel" name="label_60">
<property name="text">
<string>通道21</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_62">
<property name="text">
<string>通道23</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_59">
<property name="text">
<string>通道20</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_57">
<property name="text">
<string>通道18</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_56">
<property name="text">
<string>通道17</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_58">
<property name="text">
<string>通道19</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_61">
<property name="text">
<string>通道22</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="le_gain_17"/>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="le_gain_18"/>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="le_gain_19"/>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="le_gain_20"/>
</item>
<item row="4" column="1">
<widget class="QLineEdit" name="le_gain_21"/>
</item>
<item row="5" column="1">
<widget class="QLineEdit" name="le_gain_22"/>
</item>
<item row="6" column="1">
<widget class="QLineEdit" name="le_gain_23"/>
</item>
</layout>
</widget>
</widget>
</item>
<item row="3" column="0">