From c40c4046fe49bb68b38043b9998ffa7aef4bde96 Mon Sep 17 00:00:00 2001 From: xin Date: Fri, 6 May 2022 10:40:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=86shutter=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E6=A8=A1=E5=9D=97=E5=AF=B9=E5=8F=8C=E9=80=9A=E9=81=93?= =?UTF-8?q?=E7=9A=84=E6=94=AF=E6=8C=81=20=E4=BF=AE=E6=94=B9=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +++ othersoft/movingliner/main.cpp | 8 +++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 8dc4e25..0dac025 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,6 @@ /othersoft/calibration_console/build/ /othersoft/shuttercali/project/LocationCali/cmake-build-debug /othersoft/calibration_console/cmake-build-debug/ +/othersoft/movingliner/cmake-build-debug/ +/othersoft/movingliner/cmake-build-debug-toweris2/ +/othersoft/movingliner/cmake-build-release/ diff --git a/othersoft/movingliner/main.cpp b/othersoft/movingliner/main.cpp index 4f4e4fb..aa813f8 100644 --- a/othersoft/movingliner/main.cpp +++ b/othersoft/movingliner/main.cpp @@ -35,10 +35,12 @@ int main(int argc, char *argv[]) { // m_qsDeviceConfig->value("LINEAR SHUTTER/Port").toString() if( m_qsDeviceConfig->value("LINEAR SHUTTER/Port").toString()=="GPIO") { + //cout1<<"ERROR number position"<value("LINEAR SHUTTER/TotalPosition").toInt(); - if (str>=positionnumber) + if (str.toInt()>=positionnumber) { cout1<<"ERROR number position"<value("LINEAR SHUTTER/Position"+str).toLongLong(); @@ -51,10 +53,10 @@ int main(int argc, char *argv[]) { system(com.toStdString().c_str()); } - QThread::sleep(500); + QThread::msleep(500); QString com="gpio write "+QString::number(targetpos)+" 1"; system(com.toStdString().c_str()); - QThread::sleep(500); + QThread::msleep(500); cout1<<"FINISH Change Shutter
"<