初始界面调整;目标跟踪逻辑调整;伺服控制步长调整

pull/3/head
caoyuhui 8 months ago
parent 2de0eb8007
commit bf1961df46

@ -131,6 +131,7 @@ void GDDCdlg::initParam()
ui->comboBox_5_1->addItem("");
ui->comboBox_5_1->addItem("很快");
ui->comboBox_5_1->addItem("非常快");
ui->comboBox_5_1->setCurrentIndex(4);
ui->radioButton_5_1->setChecked(true);
paramIsFrame = true;
ui->lineEdit_5_1->setText("100");
@ -255,8 +256,7 @@ void GDDCdlg::mousePressEvent(QMouseEvent *event)
buffer[9] = (std::byte)0x00;
//发送5次
sendCurDate(buffer,5);
pointSelectionTracking = false;
sendCurDate(buffer,3);
}
}
}
@ -293,13 +293,13 @@ void GDDCdlg::resizeEvent(QResizeEvent *event)
{
double GDDCPageHeight = (double)(this->height());
double GDDCPageWidth = (double)(this->width());
qDebug()<<"宽度,高度:"<<GDDCPageHeight<<GDDCPageWidth;
//qDebug()<<"宽度,高度:"<<GDDCPageHeight<<GDDCPageWidth;
/*控制指令区域位置和大小设置*/
double cmdAreaHeight = 250;
double cmdAreaWidth = GDDCPageWidth;
ui->tabWidget->setGeometry(0,GDDCPageHeight-cmdAreaHeight,(int)cmdAreaWidth,(int)cmdAreaHeight);
qDebug()<<"Cmd宽度,高度:"<<cmdAreaWidth<<cmdAreaHeight;
//qDebug()<<"Cmd宽度,高度:"<<cmdAreaWidth<<cmdAreaHeight;
/*视频区域位置和大小设置*/
double VideoAreaHeight = GDDCPageHeight-cmdAreaHeight;
@ -550,6 +550,7 @@ void GDDCdlg::on_pushButton_2_5_released()
void GDDCdlg::on_pushButton_2_6_pressed()
{
TJDCCmdBuffer[0]=(std::byte)0x3B;
pointSelectionTracking = false;
}
void GDDCdlg::on_pushButton_2_6_released()
{
@ -1147,8 +1148,8 @@ void GDDCdlg::on_pushButton_5_1_pressed()
TJDCCmdBuffer[5]=(std::byte)0x70;
TJDCCmdBuffer[6]=(std::byte)0x00;
TJDCCmdBuffer[7]=(std::byte)0x00;
TJDCCmdBuffer[8]=(std::byte)(sel*3);
TJDCCmdBuffer[9]=(std::byte)((sel*3)>>8);
TJDCCmdBuffer[8]=(std::byte)(sel*2);
TJDCCmdBuffer[9]=(std::byte)((sel*2)>>8);
}
else
{
@ -1173,8 +1174,8 @@ void GDDCdlg::on_pushButton_5_2_pressed()
int sel = ui->comboBox_5_1->currentIndex();
sel+=1;
TJDCCmdBuffer[5]=(std::byte)0x70;
TJDCCmdBuffer[6]=(std::byte)(sel*3);
TJDCCmdBuffer[7]=(std::byte)((sel*3)>>8);
TJDCCmdBuffer[6]=(std::byte)(sel*2);
TJDCCmdBuffer[7]=(std::byte)((sel*2)>>8);
TJDCCmdBuffer[8]=(std::byte)0x00;
TJDCCmdBuffer[9]=(std::byte)0x00;
}
@ -1202,8 +1203,8 @@ void GDDCdlg::on_pushButton_5_3_pressed()
TJDCCmdBuffer[5]=(std::byte)0x70;
TJDCCmdBuffer[6]=(std::byte)0x00;
TJDCCmdBuffer[7]=(std::byte)0x00;
TJDCCmdBuffer[8]=(std::byte)(-sel*3);
TJDCCmdBuffer[9]=(std::byte)((-sel*3)>>8);
TJDCCmdBuffer[8]=(std::byte)(-sel*2);
TJDCCmdBuffer[9]=(std::byte)((-sel*2)>>8);
}
else
{
@ -1227,8 +1228,8 @@ void GDDCdlg::on_pushButton_5_4_pressed()
int sel = ui->comboBox_5_1->currentIndex();
sel+=1;
TJDCCmdBuffer[5]=(std::byte)0x70;
TJDCCmdBuffer[6]=(std::byte)(-sel*3);
TJDCCmdBuffer[7]=(std::byte)((-sel*3)>>8);
TJDCCmdBuffer[6]=(std::byte)(-sel*2);
TJDCCmdBuffer[7]=(std::byte)((-sel*2)>>8);
TJDCCmdBuffer[8]=(std::byte)0x00;
TJDCCmdBuffer[9]=(std::byte)0x00;
}

@ -9,8 +9,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>959</width>
<height>750</height>
<width>1165</width>
<height>759</height>
</rect>
</property>
<property name="sizePolicy">
@ -54,7 +54,7 @@
<rect>
<x>7</x>
<y>496</y>
<width>941</width>
<width>1131</width>
<height>250</height>
</rect>
</property>
@ -1876,6 +1876,9 @@ font: 12pt &quot;Microsoft YaHei UI&quot;;</string>
</widget>
</widget>
<widget class="QPushButton" name="pushButton_5_10">
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>780</x>

@ -81,7 +81,7 @@ void MainWindow::initWindow()
palette.setColor(QPalette::Window,g_themeColor);
this->setPalette(palette);
this->setWindowTitle("载荷应用软件");
this->resize(1280,720);
this->resize(1280,970);
m_GDDCdlg = new GDDCdlg(this);
m_HomePagedlg = new HomePageDlg(this);

Loading…
Cancel
Save