添加了ui调整下位机参数
This commit is contained in:
parent
ca3faa5f85
commit
2e4c5a8d07
14
widget.cpp
14
widget.cpp
@ -20,8 +20,8 @@ using namespace std;
|
|||||||
|
|
||||||
// 硬编码参数值
|
// 硬编码参数值
|
||||||
int file_delay = 1050; // 延迟时间(毫秒)
|
int file_delay = 1050; // 延迟时间(毫秒)
|
||||||
int file_encoder = 12000; // 编码器值++
|
int file_encoder = 12000; // 行频
|
||||||
int file_valve = 200; // 阀门通道
|
int file_valve = 200; // 喷阀触发频率
|
||||||
|
|
||||||
Widget::Widget(QWidget *parent)
|
Widget::Widget(QWidget *parent)
|
||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
@ -252,7 +252,6 @@ void Widget::on_pushButton_2_clicked()
|
|||||||
SaveImg_Flag = 1;
|
SaveImg_Flag = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Widget::on_btn_goto_sort_clicked()
|
void Widget::on_btn_goto_sort_clicked()
|
||||||
{
|
{
|
||||||
// 回复显示的图片
|
// 回复显示的图片
|
||||||
@ -367,3 +366,12 @@ void Widget::on_btn_quit_clicked()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void Widget::on_btn_set_lower_clicked()
|
||||||
|
{
|
||||||
|
// 硬编码参数值
|
||||||
|
file_delay = ui->spinbox_delaytime->text().toInt(); // 延迟时间(毫秒)
|
||||||
|
file_encoder = ui->spinbox_encoder->text().toInt(); // 编码器值++
|
||||||
|
file_valve = ui->spinbox_valve->text().toInt(); // 阀门通道
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
2
widget.h
2
widget.h
@ -44,6 +44,8 @@ private slots:
|
|||||||
|
|
||||||
void on_btn_quit_clicked();
|
void on_btn_quit_clicked();
|
||||||
|
|
||||||
|
void on_btn_set_lower_clicked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::Widget *ui;
|
Ui::Widget *ui;
|
||||||
|
|
||||||
|
|||||||
74
widget.ui
74
widget.ui
@ -20,7 +20,7 @@
|
|||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>1</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tab">
|
<widget class="QWidget" name="tab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
@ -71,7 +71,7 @@
|
|||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
<property name="sizeConstraint">
|
<property name="sizeConstraint">
|
||||||
<enum>QLayout::SizeConstraint::SetDefaultConstraint</enum>
|
<enum>QLayout::SetDefaultConstraint</enum>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
@ -321,9 +321,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="verticalSpacer">
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Orientation::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>20</width>
|
||||||
@ -341,10 +338,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QFrame" name="frame">
|
<widget class="QFrame" name="frame">
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
<enum>QFrame::Shape::StyledPanel</enum>
|
<enum>QFrame::NoFrame</enum>
|
||||||
</property>
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Shadow::Raised</enum>
|
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||||
<item>
|
<item>
|
||||||
@ -359,9 +353,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer">
|
<spacer name="horizontalSpacer">
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Orientation::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>864</width>
|
<width>864</width>
|
||||||
@ -455,10 +446,7 @@ border: 4px solid black;</string>
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QFrame" name="frame_2">
|
<widget class="QFrame" name="frame_2">
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
<enum>QFrame::Shape::StyledPanel</enum>
|
<enum>QFrame::NoFrame</enum>
|
||||||
</property>
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Shadow::Raised</enum>
|
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||||
<item>
|
<item>
|
||||||
@ -473,9 +461,6 @@ border: 4px solid black;</string>
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer_2">
|
<spacer name="horizontalSpacer_2">
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Orientation::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>840</width>
|
<width>840</width>
|
||||||
@ -591,6 +576,7 @@ border: 4px solid black;</string>
|
|||||||
<font>
|
<font>
|
||||||
<family>Microsoft YaHei UI</family>
|
<family>Microsoft YaHei UI</family>
|
||||||
<pointsize>48</pointsize>
|
<pointsize>48</pointsize>
|
||||||
|
<weight>87</weight>
|
||||||
<italic>false</italic>
|
<italic>false</italic>
|
||||||
<bold>true</bold>
|
<bold>true</bold>
|
||||||
</font>
|
</font>
|
||||||
@ -636,19 +622,55 @@ border-color: rgb(0, 0, 0);</string>
|
|||||||
<rect>
|
<rect>
|
||||||
<x>460</x>
|
<x>460</x>
|
||||||
<y>120</y>
|
<y>120</y>
|
||||||
<width>181</width>
|
<width>205</width>
|
||||||
<height>241</height>
|
<height>241</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QSpinBox" name="spinbox_delaytime"/>
|
<widget class="QSpinBox" name="spinbox_delaytime">
|
||||||
|
<property name="minimum">
|
||||||
|
<number>1000</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1400</number>
|
||||||
|
</property>
|
||||||
|
<property name="singleStep">
|
||||||
|
<number>10</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>1200</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QSpinBox" name="spinbox_encoder"/>
|
<widget class="QSpinBox" name="spinbox_encoder">
|
||||||
|
<property name="minimum">
|
||||||
|
<number>8000</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>13000</number>
|
||||||
|
</property>
|
||||||
|
<property name="singleStep">
|
||||||
|
<number>100</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>12000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QSpinBox" name="spinbox_valve"/>
|
<widget class="QSpinBox" name="spinbox_valve">
|
||||||
|
<property name="minimum">
|
||||||
|
<number>150</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>250</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>200</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
@ -657,7 +679,7 @@ border-color: rgb(0, 0, 0);</string>
|
|||||||
<rect>
|
<rect>
|
||||||
<x>30</x>
|
<x>30</x>
|
||||||
<y>120</y>
|
<y>120</y>
|
||||||
<width>341</width>
|
<width>360</width>
|
||||||
<height>251</height>
|
<height>251</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -672,14 +694,14 @@ border-color: rgb(0, 0, 0);</string>
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_encoder">
|
<widget class="QLabel" name="label_encoder">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>相机分频系数</string>
|
<string>相机行频</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_encoder_2">
|
<widget class="QLabel" name="label_encoder_2">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>喷阀分频系数</string>
|
<string>喷阀频率</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user