mirror of
http://172.16.0.230/r/SIF/TowerOptoSifAndSpectral.git
synced 2025-10-18 19:39:43 +08:00
增加了shutter切换模块对双通道的支持 修改错误
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@ -16,3 +16,6 @@
|
|||||||
/othersoft/calibration_console/build/
|
/othersoft/calibration_console/build/
|
||||||
/othersoft/shuttercali/project/LocationCali/cmake-build-debug
|
/othersoft/shuttercali/project/LocationCali/cmake-build-debug
|
||||||
/othersoft/calibration_console/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/
|
||||||
|
@ -35,10 +35,12 @@ int main(int argc, char *argv[]) {
|
|||||||
// m_qsDeviceConfig->value("LINEAR SHUTTER/Port").toString()
|
// m_qsDeviceConfig->value("LINEAR SHUTTER/Port").toString()
|
||||||
if( m_qsDeviceConfig->value("LINEAR SHUTTER/Port").toString()=="GPIO")
|
if( m_qsDeviceConfig->value("LINEAR SHUTTER/Port").toString()=="GPIO")
|
||||||
{
|
{
|
||||||
|
//cout1<<"ERROR number position"<<flush;
|
||||||
int positionnumber=m_qsDeviceConfig->value("LINEAR SHUTTER/TotalPosition").toInt();
|
int positionnumber=m_qsDeviceConfig->value("LINEAR SHUTTER/TotalPosition").toInt();
|
||||||
if (str>=positionnumber)
|
if (str.toInt()>=positionnumber)
|
||||||
{
|
{
|
||||||
cout1<<"ERROR number position"<<flush;
|
cout1<<"ERROR number position"<<flush;
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int targetpos=m_qsDeviceConfig->value("LINEAR SHUTTER/Position"+str).toLongLong();
|
int targetpos=m_qsDeviceConfig->value("LINEAR SHUTTER/Position"+str).toLongLong();
|
||||||
@ -51,10 +53,10 @@ int main(int argc, char *argv[]) {
|
|||||||
system(com.toStdString().c_str());
|
system(com.toStdString().c_str());
|
||||||
|
|
||||||
}
|
}
|
||||||
QThread::sleep(500);
|
QThread::msleep(500);
|
||||||
QString com="gpio write "+QString::number(targetpos)+" 1";
|
QString com="gpio write "+QString::number(targetpos)+" 1";
|
||||||
system(com.toStdString().c_str());
|
system(com.toStdString().c_str());
|
||||||
QThread::sleep(500);
|
QThread::msleep(500);
|
||||||
cout1<<"FINISH Change Shutter <br>"<<flush;
|
cout1<<"FINISH Change Shutter <br>"<<flush;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user