From 8e3315338fde4cefe8b66bbda1d2a2ded8a675df Mon Sep 17 00:00:00 2001 From: tangchao0503 <735056338@qq.com> Date: Thu, 20 Jun 2024 16:26:54 +0800 Subject: [PATCH] =?UTF-8?q?add=EF=BC=9A=E6=B7=BB=E5=8A=A0=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E5=8D=87=E9=99=8D=E5=8F=B0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HPPA/HPPA.cpp | 23 +++++++++++++++++++++++ HPPA/HPPA.h | 4 ++++ HPPA/HPPA.ui | 50 ++++++++++++++++++++++++++++++++++++++++++++++++-- HPPA/about.ui | 2 +- 4 files changed, 76 insertions(+), 3 deletions(-) diff --git a/HPPA/HPPA.cpp b/HPPA/HPPA.cpp index 7c09a00..db59be4 100644 --- a/HPPA/HPPA.cpp +++ b/HPPA/HPPA.cpp @@ -265,6 +265,11 @@ HPPA::HPPA(QWidget *parent) float StepAnglemar_y, Lead_y, ScaleFactor_y; int SubdivisionMultiples_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() @@ -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() { this->close(); diff --git a/HPPA/HPPA.h b/HPPA/HPPA.h index aae701d..3776aa7 100644 --- a/HPPA/HPPA.h +++ b/HPPA/HPPA.h @@ -321,6 +321,10 @@ public Q_SLOTS: void requestFinished(QNetworkReply* reply); + void onObjectivTableUp_btn(); + void onObjectivTableDown_btn(); + void onObjectivTableStop_btn(); + signals: void StartFocusSignal(); void StartLoopSignal(); diff --git a/HPPA/HPPA.ui b/HPPA/HPPA.ui index a35fdd3..8686de7 100644 --- a/HPPA/HPPA.ui +++ b/HPPA/HPPA.ui @@ -285,7 +285,7 @@ - 3 + 4 @@ -1682,6 +1682,52 @@ + + + 升降台 + + + + + + + 0 + 0 + + + + 上升 + + + + + + + + 0 + 0 + + + + 下降 + + + + + + + + 0 + 0 + + + + 停止 + + + + + @@ -1697,7 +1743,7 @@ 0 0 2213 - 37 + 23 diff --git a/HPPA/about.ui b/HPPA/about.ui index c569f1f..32279c4 100644 --- a/HPPA/about.ui +++ b/HPPA/about.ui @@ -70,7 +70,7 @@ - 版本:1.6 + 版本:1.7