From 9fa9fc8efb697295fc0d19579e72ee7a588fb26c Mon Sep 17 00:00:00 2001 From: tangchao0503 <735056338@qq.com> Date: Fri, 29 Nov 2024 11:15:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8D=87=E9=99=8D=E5=8F=B0?= =?UTF-8?q?=E6=8E=A7=E5=88=B6=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HPPA/HPPA.cpp | 34 +++++++++++--- HPPA/HPPA.h | 9 ++-- HPPA/HPPA.ui | 127 ++++++++++++++++++++++++++++++++++++-------------- 3 files changed, 126 insertions(+), 44 deletions(-) diff --git a/HPPA/HPPA.cpp b/HPPA/HPPA.cpp index db59be4..87cf782 100644 --- a/HPPA/HPPA.cpp +++ b/HPPA/HPPA.cpp @@ -267,9 +267,13 @@ HPPA::HPPA(QWidget *parent) 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())); + connect(ui.objective_table1_up_btn, SIGNAL(clicked()), this, SLOT(onObjectivTable1Up_btn())); + connect(ui.objective_table1_down_btn, SIGNAL(clicked()), this, SLOT(onObjectivTable1Down_btn())); + connect(ui.objective_table1_stop_btn, SIGNAL(clicked()), this, SLOT(onObjectivTable1Stop_btn())); + + connect(ui.objective_table2_up_btn, SIGNAL(clicked()), this, SLOT(onObjectivTable2Up_btn())); + connect(ui.objective_table2_down_btn, SIGNAL(clicked()), this, SLOT(onObjectivTable2Down_btn())); + connect(ui.objective_table2_stop_btn, SIGNAL(clicked()), this, SLOT(onObjectivTable2Stop_btn())); } HPPA::~HPPA() @@ -1718,19 +1722,37 @@ void HPPA::requestFinished(QNetworkReply* reply) { } } -void HPPA::onObjectivTableUp_btn() +void HPPA::onObjectivTable1Up_btn() +{ + QString xx = "http://192.168.1.253/set_up"; + getRequest(xx); +} + +void HPPA::onObjectivTable1Down_btn() +{ + QString xx = "http://192.168.1.253/set_down"; + getRequest(xx); +} + +void HPPA::onObjectivTable1Stop_btn() +{ + QString xx = "http://192.168.1.253/stopnow"; + getRequest(xx); +} + +void HPPA::onObjectivTable2Up_btn() { QString xx = "http://192.168.1.254/set_up"; getRequest(xx); } -void HPPA::onObjectivTableDown_btn() +void HPPA::onObjectivTable2Down_btn() { QString xx = "http://192.168.1.254/set_down"; getRequest(xx); } -void HPPA::onObjectivTableStop_btn() +void HPPA::onObjectivTable2Stop_btn() { QString xx = "http://192.168.1.254/stopnow"; getRequest(xx); diff --git a/HPPA/HPPA.h b/HPPA/HPPA.h index 3776aa7..7f4b5ac 100644 --- a/HPPA/HPPA.h +++ b/HPPA/HPPA.h @@ -321,9 +321,12 @@ public Q_SLOTS: void requestFinished(QNetworkReply* reply); - void onObjectivTableUp_btn(); - void onObjectivTableDown_btn(); - void onObjectivTableStop_btn(); + void onObjectivTable1Up_btn(); + void onObjectivTable1Down_btn(); + void onObjectivTable1Stop_btn(); + void onObjectivTable2Up_btn(); + void onObjectivTable2Down_btn(); + void onObjectivTable2Stop_btn(); signals: void StartFocusSignal(); diff --git a/HPPA/HPPA.ui b/HPPA/HPPA.ui index 8686de7..df5e09d 100644 --- a/HPPA/HPPA.ui +++ b/HPPA/HPPA.ui @@ -1686,44 +1686,101 @@ 升降台 - - - - - - 0 - 0 - - - - 上升 + + + + + 1号升降台 + + + + + + 0 + 0 + + + + 上升 + + + + + + + + 0 + 0 + + + + 下降 + + + + + + + + 0 + 0 + + + + 停止 + + + + - - - - - 0 - 0 - - - - 下降 - - - - - - - - 0 - 0 - - - - 停止 + + + + 2号升降台 + + + + + + 0 + 0 + + + + 上升 + + + + + + + + 0 + 0 + + + + 下降 + + + + + + + + 0 + 0 + + + + 停止 + + + + @@ -1743,7 +1800,7 @@ 0 0 2213 - 23 + 30