add:添加控制升降台功能

This commit is contained in:
tangchao0503
2024-06-20 16:26:54 +08:00
parent 868b60ff67
commit 8e3315338f
4 changed files with 76 additions and 3 deletions

View File

@ -265,6 +265,11 @@ HPPA::HPPA(QWidget *parent)
float StepAnglemar_y, Lead_y, ScaleFactor_y; float StepAnglemar_y, Lead_y, ScaleFactor_y;
int SubdivisionMultiples_y; int SubdivisionMultiples_y;
configfile.getYMotorParm(StepAnglemar_y, Lead_y, SubdivisionMultiples_y, ScaleFactor_y);*/ configfile.getYMotorParm(StepAnglemar_y, Lead_y, SubdivisionMultiples_y, ScaleFactor_y);*/
//
connect(ui.objective_table_up_btn, SIGNAL(clicked()), this, SLOT(onObjectivTableUp_btn()));
connect(ui.objective_table_down_btn, SIGNAL(clicked()), this, SLOT(onObjectivTableDown_btn()));
connect(ui.objective_table_stop_btn, SIGNAL(clicked()), this, SLOT(onObjectivTableStop_btn()));
} }
HPPA::~HPPA() HPPA::~HPPA()
@ -1713,6 +1718,24 @@ void HPPA::requestFinished(QNetworkReply* reply) {
} }
} }
void HPPA::onObjectivTableUp_btn()
{
QString xx = "http://192.168.1.254/set_up";
getRequest(xx);
}
void HPPA::onObjectivTableDown_btn()
{
QString xx = "http://192.168.1.254/set_down";
getRequest(xx);
}
void HPPA::onObjectivTableStop_btn()
{
QString xx = "http://192.168.1.254/stopnow";
getRequest(xx);
}
void HPPA::onExit() void HPPA::onExit()
{ {
this->close(); this->close();

View File

@ -321,6 +321,10 @@ public Q_SLOTS:
void requestFinished(QNetworkReply* reply); void requestFinished(QNetworkReply* reply);
void onObjectivTableUp_btn();
void onObjectivTableDown_btn();
void onObjectivTableStop_btn();
signals: signals:
void StartFocusSignal(); void StartFocusSignal();
void StartLoopSignal(); void StartLoopSignal();

View File

@ -285,7 +285,7 @@
</size> </size>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>3</number> <number>4</number>
</property> </property>
<widget class="QWidget" name="tab"> <widget class="QWidget" name="tab">
<attribute name="title"> <attribute name="title">
@ -1682,6 +1682,52 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="tab_7">
<attribute name="title">
<string>升降台</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QPushButton" name="objective_table_up_btn">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>上升</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="objective_table_down_btn">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>下降</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="objective_table_stop_btn">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>停止</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget> </widget>
</widget> </widget>
</item> </item>
@ -1697,7 +1743,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>2213</width> <width>2213</width>
<height>37</height> <height>23</height>
</rect> </rect>
</property> </property>
<widget class="QMenu" name="file"> <widget class="QMenu" name="file">

View File

@ -70,7 +70,7 @@
</rect> </rect>
</property> </property>
<property name="text"> <property name="text">
<string>版本1.6</string> <string>版本1.7</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" name="label_4"> <widget class="QLabel" name="label_4">