1、1轴/2轴:采集白板和暗电流时,移动马达;
2、移除以前的采集逻辑,马达控制全用多轴控制器,采集逻辑全放到采集逻辑控制器里; 3、删除了多余文件; 4、添加了辐亮度和反射率界面,并没有实现功能;
This commit is contained in:
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,5 +1,10 @@
|
||||
# tc
|
||||
GeneratedFiles/
|
||||
ResononAPISetup-3.12-64bit.exe
|
||||
gdal202.dll
|
||||
*.rej
|
||||
HPPA类图.drawio
|
||||
HPPA - 副本.ui
|
||||
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
|
@ -601,3 +601,116 @@ void OneMotionCaptureCoordinator::handleError(const QString& error)
|
||||
m_isRunning = false;
|
||||
emit errorOccurred(error);
|
||||
}
|
||||
|
||||
DarkAndWhiteCaptureCoordinator::DarkAndWhiteCaptureCoordinator(
|
||||
int model,
|
||||
IrisMultiMotorController* motorCtrl,
|
||||
ImagerOperationBase* cameraCtrl,
|
||||
QObject* parent)
|
||||
: QObject(parent)
|
||||
, m_model(model)
|
||||
, m_motorCtrl(motorCtrl)
|
||||
, m_cameraCtrl(cameraCtrl)
|
||||
, m_isRunning(false)
|
||||
{
|
||||
connect(this, SIGNAL(moveTo(int, double, double, int)),
|
||||
m_motorCtrl, SLOT(moveTo(int, double, double, int)));
|
||||
connect(this, SIGNAL(moveSignal(int, bool, double, int)), m_motorCtrl, SLOT(move(int, bool, double, int)));
|
||||
connect(this, &DarkAndWhiteCaptureCoordinator::stopMotorSignal, m_motorCtrl, &IrisMultiMotorController::stop);
|
||||
|
||||
connect(m_motorCtrl, &IrisMultiMotorController::motorStopSignal,
|
||||
this, &DarkAndWhiteCaptureCoordinator::handleMotorStoped);
|
||||
|
||||
if (m_model == 0)//dark
|
||||
{
|
||||
connect(this, &DarkAndWhiteCaptureCoordinator::startRecordHSISignal,
|
||||
m_cameraCtrl, &ImagerOperationBase::record_dark);
|
||||
connect(m_cameraCtrl, &ImagerOperationBase::RecordDarlFinishSignal,
|
||||
this, &DarkAndWhiteCaptureCoordinator::handleCaptureCompleteWhenFrameNumberMeet);
|
||||
}
|
||||
else if(m_model == 1)//white
|
||||
{
|
||||
connect(this, &DarkAndWhiteCaptureCoordinator::startRecordHSISignal,
|
||||
m_cameraCtrl, &ImagerOperationBase::record_white);
|
||||
connect(m_cameraCtrl, &ImagerOperationBase::RecordWhiteFinishSignal,
|
||||
this, &DarkAndWhiteCaptureCoordinator::handleCaptureCompleteWhenFrameNumberMeet);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
DarkAndWhiteCaptureCoordinator::~DarkAndWhiteCaptureCoordinator()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void DarkAndWhiteCaptureCoordinator::startStepMotion(double speed)
|
||||
{
|
||||
QMutexLocker locker(&m_dataMutex);
|
||||
|
||||
if (m_isRunning)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
m_isRunning = true;
|
||||
|
||||
m_speed = speed;
|
||||
|
||||
getLocBeforeStart();
|
||||
|
||||
//移动马达并开始采集高光谱
|
||||
emit moveSignal(0, false, m_speed, 1000);
|
||||
emit startRecordHSISignal();
|
||||
}
|
||||
|
||||
void DarkAndWhiteCaptureCoordinator::handleCaptureCompleteWhenFrameNumberMeet()
|
||||
{
|
||||
emit stopMotorSignal(0);
|
||||
}
|
||||
|
||||
void DarkAndWhiteCaptureCoordinator::getLocBeforeStart()
|
||||
{
|
||||
QEventLoop loop;
|
||||
bool received = false;
|
||||
|
||||
QTimer timer;
|
||||
timer.setSingleShot(true);
|
||||
connect(&timer, &QTimer::timeout, &loop, &QEventLoop::quit);
|
||||
|
||||
QMetaObject::Connection conn = QObject::connect(m_motorCtrl, &IrisMultiMotorController::locationSignal,
|
||||
[&](std::vector<double> pos) {
|
||||
m_locBeforeStart = pos;
|
||||
received = true;
|
||||
loop.quit();
|
||||
});
|
||||
|
||||
QMetaObject::invokeMethod(m_motorCtrl, "getLoc", Qt::QueuedConnection);
|
||||
timer.start(3000);
|
||||
|
||||
loop.exec();
|
||||
|
||||
disconnect(conn);
|
||||
}
|
||||
|
||||
void DarkAndWhiteCaptureCoordinator::move2LocBeforeStart()
|
||||
{
|
||||
std::cout << "\nmove2LocBeforeStart." << std::endl;
|
||||
|
||||
emit moveTo(0, m_locBeforeStart[0], m_speed, 1000);
|
||||
|
||||
m_isRunning = false;
|
||||
}
|
||||
|
||||
void DarkAndWhiteCaptureCoordinator::handleMotorStoped(int motorID, double pos)
|
||||
{
|
||||
QMutexLocker locker(&m_dataMutex);
|
||||
|
||||
if (!m_isRunning) return;
|
||||
|
||||
move2LocBeforeStart();
|
||||
}
|
||||
|
||||
void DarkAndWhiteCaptureCoordinator::handleCaptureComplete(double index)
|
||||
{
|
||||
QMutexLocker locker(&m_dataMutex);
|
||||
}
|
||||
|
@ -167,3 +167,44 @@ private:
|
||||
void getLocBeforeStart();
|
||||
void move2LocBeforeStart();
|
||||
};
|
||||
|
||||
class DarkAndWhiteCaptureCoordinator : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
DarkAndWhiteCaptureCoordinator(int model, IrisMultiMotorController* motorCtrl,
|
||||
ImagerOperationBase* cameraCtrl,
|
||||
QObject* parent = nullptr);
|
||||
~DarkAndWhiteCaptureCoordinator();
|
||||
|
||||
public slots:
|
||||
void startStepMotion(double speed);
|
||||
|
||||
void handleCaptureCompleteWhenFrameNumberMeet();
|
||||
|
||||
signals:
|
||||
void sequenceComplete(int);
|
||||
void moveTo(int, double, double, int);
|
||||
void moveSignal(int, bool, double, int);
|
||||
void stopMotorSignal(int axis);
|
||||
|
||||
void startRecordHSISignal();
|
||||
|
||||
private slots:
|
||||
void handleMotorStoped(int motorID, double pos);
|
||||
void handleCaptureComplete(double index);
|
||||
|
||||
private:
|
||||
IrisMultiMotorController* m_motorCtrl;
|
||||
ImagerOperationBase* m_cameraCtrl;
|
||||
mutable QMutex m_dataMutex;
|
||||
|
||||
bool m_isRunning;
|
||||
|
||||
double m_speed;
|
||||
int m_model;//0:dark,1:white
|
||||
|
||||
std::vector<double> m_locBeforeStart;
|
||||
void getLocBeforeStart();
|
||||
void move2LocBeforeStart();
|
||||
};
|
||||
|
1231
HPPA/HPPA.cpp
1231
HPPA/HPPA.cpp
File diff suppressed because it is too large
Load Diff
108
HPPA/HPPA.h
108
HPPA/HPPA.h
@ -32,7 +32,6 @@
|
||||
#include "aboutWindow.h"
|
||||
#include "adjustTable.h"
|
||||
#include "PowerControl.h"
|
||||
#include "PathPlan.h"
|
||||
#include "RobotArmControl.h"
|
||||
#include "OneMotorControl.h"
|
||||
#include "TwoMotorControl.h"
|
||||
@ -124,36 +123,6 @@ signals:
|
||||
void threadSignal(QString s);
|
||||
};
|
||||
|
||||
|
||||
class ForLoopControl :public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ForLoopControl();
|
||||
~ForLoopControl();
|
||||
|
||||
void setLoopCount(int loopCount);
|
||||
int getLoopCount() const;
|
||||
|
||||
bool m_boolRecordNextLine;
|
||||
bool m_boolQuitLoop;
|
||||
|
||||
protected:
|
||||
private:
|
||||
int m_loopCount;
|
||||
|
||||
|
||||
public slots:
|
||||
void startLoop();
|
||||
|
||||
signals:
|
||||
//<2F><><EFBFBD><EFBFBD>Ӱ<EFBFBD><D3B0><EFBFBD>źţ<C5BA>
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>źŷ<C5BA><C5B7><EFBFBD><EFBFBD><EFBFBD>ֵʱ<D6B5><CAB1>intֵ<74><D6B5><EFBFBD><EFBFBD><EFBFBD>òɼ<C3B2><C9BC>ڼ<EFBFBD><DABC><EFBFBD><EFBFBD>ɼ<EFBFBD><C9BC><EFBFBD><EFBFBD>ˣ<EFBFBD>
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>źŷ<C5BA><C5B7>为ֵʱ<D6B5><CAB1>-1<><31><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɼ<EFBFBD><C9BC><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD><D6B6><EFBFBD>ֹ<EFBFBD>ɼ<EFBFBD><C9BC><EFBFBD><EFBFBD><EFBFBD>-2<><32><EFBFBD>ֶ<EFBFBD><D6B6><EFBFBD>ֹ<EFBFBD>ɼ<EFBFBD><C9BC><EFBFBD><EFBFBD><EFBFBD>
|
||||
void recordSignal(int);
|
||||
};
|
||||
|
||||
class HPPA : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -181,12 +150,10 @@ private:
|
||||
|
||||
Configfile mConfigfile;
|
||||
|
||||
ForLoopControl * m_ForLoopControl;
|
||||
ImagerOperationBase* m_Imager;//
|
||||
|
||||
int m_RecordState;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɼ<EFBFBD><C9BC><EFBFBD><EFBFBD>̣<EFBFBD>ȡ2<C8A1><32><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1 <20><> <20><><EFBFBD>ڲɼ<DAB2><C9BC><EFBFBD>0 <20><> ֹͣ<CDA3>ɼ<EFBFBD>
|
||||
|
||||
QThread * m_ForLoopControlThread;//
|
||||
QThread * m_RecordThread;//Ӱ<><D3B0><EFBFBD>ɼ<EFBFBD><C9BC>߳<EFBFBD>
|
||||
QThread * m_RgbCameraThread;//rgb<67><62><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡͼ<C8A1><CDBC><EFBFBD>߳<EFBFBD>
|
||||
QThread * m_CopyFileThread;//Ӱ<><D3B0><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߳<EFBFBD>
|
||||
@ -197,34 +164,8 @@ private:
|
||||
//QLineSeries *series;
|
||||
//QChart *chart;
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD>
|
||||
VinceControl *m_yMotor;
|
||||
VinceControl *m_xMotor;
|
||||
|
||||
long m_lXmotorLocationOfStartRecord;//<2F><>ʼ<EFBFBD>ɼ<EFBFBD>ǰx<C7B0><78><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>
|
||||
long m_lYmotorLocationOfStartRecord;//<2F><>ʼ<EFBFBD>ɼ<EFBFBD>ǰy<C7B0><79><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>
|
||||
|
||||
unsigned long m_lManualSpeedOfXMotor;//X<><58><EFBFBD><EFBFBD><EFBFBD>˶<EFBFBD><CBB6>ٶȣ<D9B6>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>+X<><58><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̲<EFBFBD><CCB2><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD><CAB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ٶȣ<D9B6>12000*0.00052734375=6.328125cm/s
|
||||
unsigned long m_lManualSpeedOfYMotor;//Y<><59><EFBFBD><EFBFBD><EFBFBD><EFBFBD>X<EFBFBD><58><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>ͬ<EFBFBD>Ļ<EFBFBD><C4BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Y<EFBFBD><59><EFBFBD><EFBFBD><EFBFBD>л<EFBFBD>е<EFBFBD><D0B5><EFBFBD><EFBFBD>װ<EFBFBD>ã<EFBFBD>ʵ<EFBFBD><CAB5>Y<EFBFBD><59><EFBFBD><EFBFBD><EFBFBD>ٶ<EFBFBD>=X<><58><EFBFBD><EFBFBD><EFBFBD>ٶ<EFBFBD>/5
|
||||
|
||||
int m_xConnectCount;//<2F><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<D7B4><CCAC>0<EFBFBD><30><EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD>1<EFBFBD><31><EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD>ӣ<EFBFBD><D3A3><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>״̬Ϊ1ʱ<31><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD>
|
||||
int m_yConnectCount;
|
||||
|
||||
QTimer *m_timerMoveXmotor;
|
||||
QTimer *m_timerMoveYmotor;
|
||||
|
||||
QTimer *m_timerTestRangeOfxMotor;//<2F><><EFBFBD>ڲ<EFBFBD><DAB2><EFBFBD>x<EFBFBD><78><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
QTimer *m_timerTestRangeOfyMotor;//<2F><><EFBFBD>ڲ<EFBFBD><DAB2><EFBFBD>y<EFBFBD><79><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
QTimer *m_timerLocationFeedBackOfMotor_x_y;//<2F><><EFBFBD>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD>ƣ<EFBFBD>x/y<><79><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˶<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD>Զ<EFBFBD><D4B6>ķ<EFBFBD><C4B7><EFBFBD><EFBFBD><EFBFBD>slider<65><72>
|
||||
QTimer *m_timerYmotorLocationFeedBackAfterRecord;//<2F>ɼ<EFBFBD>Ӱ<EFBFBD><D3B0><EFBFBD><EFBFBD><EFBFBD>ɺ<C9BA><F3A3ACBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>ʵʱ<CAB5><CAB1><EFBFBD>ص<EFBFBD>slider<65><72>
|
||||
|
||||
QString operateWidget;//<2F><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD>Ŀؼ<C4BF><D8BC><EFBFBD>
|
||||
|
||||
bool isMotorConnected(VinceControl *motor);//<2F>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>Ͽ<EFBFBD><CFBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD><EFBFBD><EFBFBD>true<75><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD>false
|
||||
void SetXMotorWidgetEnable(bool enable);
|
||||
void SetYMotorWidgetEnable(bool enable);
|
||||
void setMotorRange();//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̷<EFBFBD>Χ
|
||||
|
||||
//ģ<><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>
|
||||
double widthScale;//QGraphicsView<65><77>viewport<72><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>widthScale = rect.width() / maxDistance;
|
||||
double heightScale;//QGraphicsView<65><77>viewport<72>ߺ<EFBFBD><DFBA><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>heightScale = rect.height() / maxDistance;
|
||||
@ -253,9 +194,6 @@ private:
|
||||
TwoMotorControl* tmc;
|
||||
QDockWidget* dock_tmc;
|
||||
|
||||
|
||||
PathPlan* m_pathPlan;
|
||||
|
||||
FILE* m_hTimesFile;
|
||||
|
||||
public Q_SLOTS:
|
||||
@ -277,7 +215,6 @@ public Q_SLOTS:
|
||||
void onReference();
|
||||
void recordWhiteFinish();
|
||||
void onStartRecordStep1();
|
||||
void onStartRecordStep2(int lineNumber);
|
||||
void onCreateTab(int trackNumber);
|
||||
void onTabWidgetCurrentChanged(int index);
|
||||
void onActionOpenDirectory();
|
||||
@ -293,50 +230,7 @@ public Q_SLOTS:
|
||||
void onLeftMouseButtonPressed(int x, int y);//<2F><><EFBFBD><EFBFBD>Ӱ<EFBFBD><D3B0><EFBFBD><EFBFBD>Ԫ<EFBFBD><D4AA>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
||||
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD>
|
||||
void deleteMotor();
|
||||
void newMotor();
|
||||
void timerEvent(QTimerEvent *event);
|
||||
void setMotorParamMicroscope(VinceControl* motor);
|
||||
void setXMotorParamFromCfgFile(VinceControl* motor);
|
||||
void setYMotorParamFromCfgFile(VinceControl* motor);
|
||||
|
||||
|
||||
void onxMotorLeft();
|
||||
void onxMotorRight();
|
||||
void onxMotorStop();
|
||||
|
||||
void onyMotorForward();
|
||||
void onyMotorBackward();
|
||||
void onyMotorStop();
|
||||
|
||||
void onMotorReset();
|
||||
|
||||
void OnXmotorSpeedEditingFinished();
|
||||
|
||||
void ontimerLocationFeedBackOfMotor_x_y();
|
||||
void ontimerYmotorLocationFeedBackAfterRecord();
|
||||
|
||||
void OnXmotorSpeedLineeditEditingFinished();
|
||||
void OnXmotorSpeedSliderChanged(double speed);
|
||||
void OnXmotorLocationLineeditEditingFinished();
|
||||
void OnXmotorLocationSliderChanged(double location);
|
||||
void OnXmotorLocationSliderReleased();
|
||||
|
||||
|
||||
void OnYmotorLocationLineeditEditingFinished();
|
||||
void OnYmotorLocationSliderChanged(double location);
|
||||
void OnYmotorLocationSliderReleased();
|
||||
|
||||
|
||||
|
||||
void ontestRangeOfMotor_x_y();
|
||||
void ontimerTestRangeOfxMotor();
|
||||
void ontimerTestRangeOfyMotor();
|
||||
|
||||
void ontimerMoveXmotor();
|
||||
void ontimerMoveYmotor();
|
||||
|
||||
//
|
||||
void onimagerSimulatorMove(int x, int y);
|
||||
void OnSendLogToCallClass(QString str);
|
||||
@ -354,10 +248,8 @@ public Q_SLOTS:
|
||||
void createOneMotorScenario();
|
||||
signals:
|
||||
void StartFocusSignal();
|
||||
void StartLoopSignal();
|
||||
void StartRecordSignal();
|
||||
void CopyFileThreadSignal(QString, QString);
|
||||
void BroadcastXMotorPosSignal(long long, int);
|
||||
|
||||
void RecordWhiteSignal();
|
||||
void RecordDarlSignal();
|
||||
|
770
HPPA/HPPA.ui
770
HPPA/HPPA.ui
@ -182,7 +182,6 @@ color:white;
|
||||
</property>
|
||||
<addaction name="mAction_is_no_motor"/>
|
||||
<addaction name="mAction_1AxisMotor"/>
|
||||
<addaction name="mAction_2AxisMotor"/>
|
||||
<addaction name="mAction_2AxisMotor_new"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="mAction_RobotArm"/>
|
||||
@ -726,768 +725,6 @@ QDockWidget::title {
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QDockWidget" name="mDockWidgetLinearStage">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">/* 标题设置 */
|
||||
QDockWidget::title {
|
||||
text-align: left;
|
||||
background-color: rgb(240, 240, 240);
|
||||
/*padding-left: 35px;*/
|
||||
}</string>
|
||||
</property>
|
||||
<property name="floating">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="allowedAreas">
|
||||
<set>Qt::AllDockWidgetAreas</set>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>线性平台</string>
|
||||
</property>
|
||||
<attribute name="dockWidgetArea">
|
||||
<number>2</number>
|
||||
</attribute>
|
||||
<widget class="QWidget" name="dockWidgetContents_5">
|
||||
<layout class="QGridLayout" name="gridLayout_14">
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QGroupBox{border:none}</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="3" column="2">
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>84</width>
|
||||
<height>19</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>84</width>
|
||||
<height>19</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QPushButton" name="ymotor_backward_btn">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>↓0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<spacer name="horizontalSpacer_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>84</width>
|
||||
<height>19</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QPushButton" name="xmotor_right_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 row="1" column="2">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>84</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QPushButton" name="test_range_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 row="2" column="1">
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>66</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QPushButton" name="xmotor_left_btn">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>←0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>84</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="3" column="3">
|
||||
<widget class="QPushButton" name="motor_reset_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 row="1" column="1">
|
||||
<widget class="QPushButton" name="ymotor_forward_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>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#QGroupBox{border:none}</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>x马达</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_15">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>速度</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="xmotor_speed_lineEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>1</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_7">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QMotorDoubleSlider" name="xmotor_speed_slider">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_8">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>17</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_9">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>37</width>
|
||||
<height>17</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>33</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>3</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_14">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>位置</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="xmotor_location_lineEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>33</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_10">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>14</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QMotorDoubleSlider" name="xmotor_location_slider">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="tickPosition">
|
||||
<enum>QSlider::NoTicks</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_11">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>17</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_12">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>128</width>
|
||||
<height>17</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="xmotor_max_location_label">
|
||||
<property name="text">
|
||||
<string>nan</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QGroupBox" name="groupBox_9">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>y马达</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_16">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>位置</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="ymotor_location_lineEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>21</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>33</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_13">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QMotorDoubleSlider" name="ymotor_location_slider">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="tickPosition">
|
||||
<enum>QSlider::NoTicks</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_9">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_14">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_15">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>146</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="ymotor_max_location_label">
|
||||
<property name="text">
|
||||
<string>nan</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<action name="action_exit">
|
||||
<property name="text">
|
||||
<string>退出</string>
|
||||
@ -1727,7 +964,7 @@ QDockWidget::title {
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>2 轴线性马达_new</string>
|
||||
<string>2 轴线性马达</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
@ -1738,11 +975,6 @@ QDockWidget::title {
|
||||
<extends>QSlider</extends>
|
||||
<header>qdoubleslider.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>QMotorDoubleSlider</class>
|
||||
<extends>QSlider</extends>
|
||||
<header location="global">qmotordoubleslider.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>ImagerPositionSimulation</class>
|
||||
<extends>QGraphicsView</extends>
|
||||
|
@ -31,7 +31,7 @@
|
||||
<Import Project="$(QtMsBuild)\qt_defaults.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'" Label="QtSettings">
|
||||
<QtInstall>5.9_msvc2017_64</QtInstall>
|
||||
<QtInstall>5.13.2_msvc2017_64</QtInstall>
|
||||
<QtModules>core;network;gui;widgets;serialport;websockets;charts</QtModules>
|
||||
<QtBuildConfig>debug</QtBuildConfig>
|
||||
</PropertyGroup>
|
||||
@ -55,11 +55,11 @@
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<IncludePath>D:\cpp_library\gdal2.2.3_vs2017\include;C:\Program Files\ResononAPI\include;D:\cpp_library\opencv3.4.11\opencv\build\include;D:\cpp_library\opencv3.4.11\opencv\build\include\opencv;D:\cpp_library\opencv3.4.11\opencv\build\include\opencv2;D:\cpp_project_vs2022\AutoFocus_InspireLinearMotor_DLL\AutoFocus_InspireLinearMotor_DLL\SDKs\PCOMM\Include;D:\cpp_project_vs2022\AutoFocus_InspireLinearMotor_DLL\AutoFocus_InspireLinearMotor_DLL\SDKs\PortControl;D:\cpp_project_vs2022\AutoFocus_InspireLinearMotor_DLL\AutoFocus_InspireLinearMotor_DLL;D:\cpp_project_vs2022\HPPA\HPPA;D:\cpp_library\libconfig-1.7.3\lib;D:\cpp_project_vs2022\HPPA\vincecontrol;D:\cpp_library\vincecontrol_vs2017;C:\XIMEA\API\xiAPI;D:\cpp_project_vs2022\HPPA\IrisMultiMotorController\IrisMultiMotorController;$(IncludePath)</IncludePath>
|
||||
<IncludePath>D:\cpp_library\gdal2.2.3_vs2017\include;C:\Program Files\ResononAPI\include;D:\cpp_library\opencv3.4.11\opencv\build\include;D:\cpp_library\opencv3.4.11\opencv\build\include\opencv;D:\cpp_library\opencv3.4.11\opencv\build\include\opencv2;D:\cpp_project_vs2022\AutoFocus_InspireLinearMotor_DLL\AutoFocus_InspireLinearMotor_DLL\SDKs\PCOMM\Include;D:\cpp_project_vs2022\AutoFocus_InspireLinearMotor_DLL\AutoFocus_InspireLinearMotor_DLL\SDKs\PortControl;D:\cpp_project_vs2022\AutoFocus_InspireLinearMotor_DLL\AutoFocus_InspireLinearMotor_DLL;D:\cpp_project_vs2022\HPPA\HPPA;D:\cpp_library\libconfig-1.7.3\lib;D:\cpp_project_vs2022\HPPA\vincecontrol;D:\cpp_library\vincecontrol_vs2017;C:\XIMEA\API\xiAPI;D:\cpp_project_vs2022\HPPA\IrisMultiMotorController\IrisMultiMotorController;D:\cpp_library\eigen-3.4-rc1;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>D:\cpp_library\opencv3.4.11\opencv\build\x64\vc15\lib;D:\cpp_library\gdal2.2.3_vs2017\lib;C:\Program Files\ResononAPI\lib64;D:\cpp_project_vs2022\AutoFocus_InspireLinearMotor_DLL\x64\Debug;D:\cpp_library\libconfig-1.7.3\build\x64;D:\cpp_project_vs2022\HPPA\x64\Debug;C:\XIMEA\API\xiAPI;D:\cpp_project_vs2022\HPPA\IrisMultiMotorController\x64\Debug;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<IncludePath>D:\cpp_library\gdal2.2.3_vs2017\include;C:\Program Files\ResononAPI\include;D:\cpp_library\opencv3.4.11\opencv\build\include;D:\cpp_library\opencv3.4.11\opencv\build\include\opencv;D:\cpp_library\opencv3.4.11\opencv\build\include\opencv2;D:\cpp_project_vs2022\AutoFocus_InspireLinearMotor_DLL\AutoFocus_InspireLinearMotor_DLL\SDKs\PCOMM\Include;D:\cpp_project_vs2022\AutoFocus_InspireLinearMotor_DLL\AutoFocus_InspireLinearMotor_DLL\SDKs\PortControl;D:\cpp_project_vs2022\AutoFocus_InspireLinearMotor_DLL\AutoFocus_InspireLinearMotor_DLL;D:\cpp_project_vs2022\HPPA\HPPA;D:\cpp_library\libconfig-1.7.3\lib;D:\cpp_project_vs2022\HPPA\vincecontrol;C:\XIMEA\API\xiAPI;D:\cpp_project_vs2022\HPPA\IrisMultiMotorController\IrisMultiMotorController;$(IncludePath)</IncludePath>
|
||||
<IncludePath>D:\cpp_library\gdal2.2.3_vs2017\include;C:\Program Files\ResononAPI\include;D:\cpp_library\opencv3.4.11\opencv\build\include;D:\cpp_library\opencv3.4.11\opencv\build\include\opencv;D:\cpp_library\opencv3.4.11\opencv\build\include\opencv2;D:\cpp_project_vs2022\AutoFocus_InspireLinearMotor_DLL\AutoFocus_InspireLinearMotor_DLL\SDKs\PCOMM\Include;D:\cpp_project_vs2022\AutoFocus_InspireLinearMotor_DLL\AutoFocus_InspireLinearMotor_DLL\SDKs\PortControl;D:\cpp_project_vs2022\AutoFocus_InspireLinearMotor_DLL\AutoFocus_InspireLinearMotor_DLL;D:\cpp_project_vs2022\HPPA\HPPA;D:\cpp_library\libconfig-1.7.3\lib;D:\cpp_project_vs2022\HPPA\vincecontrol;C:\XIMEA\API\xiAPI;D:\cpp_project_vs2022\HPPA\IrisMultiMotorController\IrisMultiMotorController;D:\cpp_library\eigen-3.4-rc1;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>D:\cpp_library\opencv3.4.11\opencv\build\x64\vc15\lib;D:\cpp_library\vincecontrol_vs2017_release;D:\cpp_library\gdal2.2.3_vs2017\lib;C:\Program Files\ResononAPI\lib64;D:\cpp_project_vs2022\AutoFocus_InspireLinearMotor_DLL\x64\Release;D:\cpp_library\libconfig-1.7.3\build\x64;D:\cpp_project_vs2022\IrisMultiMotorController\x64\Release;C:\XIMEA\API\xiAPI;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
@ -106,13 +106,13 @@
|
||||
<ItemGroup>
|
||||
<ClCompile Include="aboutWindow.cpp" />
|
||||
<ClCompile Include="adjustTable.cpp" />
|
||||
<ClCompile Include="CaptureCoordinator.cpp" />
|
||||
<ClCompile Include="Corning410Imager.cpp" />
|
||||
<ClCompile Include="hppaConfigFile.cpp" />
|
||||
<ClCompile Include="ImagerOperationBase.cpp" />
|
||||
<ClCompile Include="imager_base.cpp" />
|
||||
<ClCompile Include="irisximeaimager.cpp" />
|
||||
<ClCompile Include="OneMotorControl.cpp" />
|
||||
<ClCompile Include="PathPlan.cpp" />
|
||||
<ClCompile Include="path_tc.cpp" />
|
||||
<ClCompile Include="PowerControl.cpp" />
|
||||
<ClCompile Include="QDoubleSlider.cpp" />
|
||||
@ -125,6 +125,7 @@
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="TwoMotorControl.cpp" />
|
||||
<ClCompile Include="utility_tc.cpp" />
|
||||
<QtRcc Include="HPPA.qrc" />
|
||||
<QtUic Include="about.ui" />
|
||||
@ -145,7 +146,10 @@
|
||||
<QtUic Include="oneMotorControl.ui" />
|
||||
<QtUic Include="PathPlan.ui" />
|
||||
<QtUic Include="PowerControl.ui" />
|
||||
<QtUic Include="RadianceConversion.ui" />
|
||||
<QtUic Include="ReflectanceConversion.ui" />
|
||||
<QtUic Include="RobotArmControl.ui" />
|
||||
<QtUic Include="twoMotorControl.ui" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtMoc Include="fileOperation.h" />
|
||||
@ -159,12 +163,13 @@
|
||||
<ItemGroup>
|
||||
<QtMoc Include="adjustTable.h" />
|
||||
<QtMoc Include="PowerControl.h" />
|
||||
<QtMoc Include="PathPlan.h" />
|
||||
<QtMoc Include="RobotArmControl.h" />
|
||||
<QtMoc Include="Corning410Imager.h" />
|
||||
<QtMoc Include="CaptureCoordinator.h" />
|
||||
<ClInclude Include="imager_base.h" />
|
||||
<ClInclude Include="irisximeaimager.h" />
|
||||
<QtMoc Include="OneMotorControl.h" />
|
||||
<QtMoc Include="TwoMotorControl.h" />
|
||||
<ClInclude Include="utility_tc.h" />
|
||||
<QtMoc Include="aboutWindow.h" />
|
||||
<ClInclude Include="hppaConfigFile.h" />
|
||||
|
@ -27,6 +27,9 @@
|
||||
<Filter Include="Source Files\motor">
|
||||
<UniqueIdentifier>{4672856c-86fb-46e3-94ff-0a296dcc6111}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Header Files\focus">
|
||||
<UniqueIdentifier>{f2bfb93e-9ef8-4fdd-a776-db93b81af553}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtRcc Include="HPPA.qrc">
|
||||
@ -109,9 +112,6 @@
|
||||
<ClCompile Include="PowerControl.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="PathPlan.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="RobotArmControl.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -127,6 +127,12 @@
|
||||
<ClCompile Include="OneMotorControl.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="CaptureCoordinator.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="TwoMotorControl.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtMoc Include="fileOperation.h">
|
||||
@ -171,9 +177,6 @@
|
||||
<QtMoc Include="PowerControl.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="PathPlan.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="RobotArmControl.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
@ -183,6 +186,12 @@
|
||||
<QtMoc Include="OneMotorControl.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="TwoMotorControl.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="CaptureCoordinator.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="imageProcessor.h">
|
||||
@ -238,6 +247,15 @@
|
||||
<QtUic Include="oneMotorControl.ui">
|
||||
<Filter>Form Files</Filter>
|
||||
</QtUic>
|
||||
<QtUic Include="RadianceConversion.ui">
|
||||
<Filter>Form Files</Filter>
|
||||
</QtUic>
|
||||
<QtUic Include="ReflectanceConversion.ui">
|
||||
<Filter>Form Files</Filter>
|
||||
</QtUic>
|
||||
<QtUic Include="twoMotorControl.ui">
|
||||
<Filter>Form Files</Filter>
|
||||
</QtUic>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="cpp.hint" />
|
||||
|
@ -122,6 +122,30 @@ void OneMotorControl::setImager(ImagerOperationBase* imager)
|
||||
m_Imager = imager;
|
||||
}
|
||||
|
||||
void OneMotorControl::record_dark()
|
||||
{
|
||||
double s = ui.speed_lineEdit->text().toDouble();
|
||||
|
||||
if (m_darkCaptureCoordinator == nullptr)
|
||||
{
|
||||
m_darkCaptureCoordinator = new DarkAndWhiteCaptureCoordinator(0, m_multiAxisController, m_Imager);
|
||||
}
|
||||
|
||||
m_darkCaptureCoordinator->startStepMotion(s);
|
||||
}
|
||||
|
||||
void OneMotorControl::record_white()
|
||||
{
|
||||
double s = ui.speed_lineEdit->text().toDouble();
|
||||
|
||||
if (m_whiteCaptureCoordinator == nullptr)
|
||||
{
|
||||
m_whiteCaptureCoordinator = new DarkAndWhiteCaptureCoordinator(1, m_multiAxisController, m_Imager);
|
||||
}
|
||||
|
||||
m_whiteCaptureCoordinator->startStepMotion(s);
|
||||
}
|
||||
|
||||
void OneMotorControl::run()
|
||||
{
|
||||
if (m_coordinator == nullptr)
|
||||
|
@ -21,6 +21,9 @@ public:
|
||||
void run();
|
||||
void stop();
|
||||
|
||||
void record_dark();
|
||||
void record_white();
|
||||
|
||||
|
||||
public Q_SLOTS:
|
||||
void onConnectMotor();
|
||||
@ -60,4 +63,7 @@ private:
|
||||
|
||||
OneMotionCaptureCoordinator* m_coordinator = nullptr;
|
||||
ImagerOperationBase* m_Imager;
|
||||
|
||||
DarkAndWhiteCaptureCoordinator* m_darkCaptureCoordinator = nullptr;
|
||||
DarkAndWhiteCaptureCoordinator* m_whiteCaptureCoordinator = nullptr;
|
||||
};
|
||||
|
@ -1,308 +0,0 @@
|
||||
#include "PathPlan.h"
|
||||
#include <iostream>
|
||||
#include <QMessageBox>
|
||||
#include <QFileDialog>
|
||||
#include <fileOperation.h>
|
||||
|
||||
PathPlan::PathPlan(VinceControl* xMotor, VinceControl* yMotor, QMotorDoubleSlider* xSlider, QMotorDoubleSlider* ySlider, QWidget* parent)
|
||||
: QDialog(parent)
|
||||
{
|
||||
ui.setupUi(this);
|
||||
|
||||
m_xMotor = xMotor;
|
||||
m_yMotor = yMotor;
|
||||
|
||||
m_xSlider = xSlider;
|
||||
m_ySlider = ySlider;
|
||||
|
||||
ui.recordLine_tableWidget->setFocusPolicy(Qt::NoFocus);
|
||||
ui.recordLine_tableWidget->setStyleSheet("selection-background-color:rgb(255,209,128)");//<2F><><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD>и<EFBFBD><D0B8><EFBFBD>
|
||||
|
||||
ui.recordLine_tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows);//<2F><><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>λ
|
||||
//ui.recordLine_tableWidget->setSelectionMode(QAbstractItemView::SingleSelection);//<2F><><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1>ģʽ<C4A3><CABD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//QHeaderView* headerView = ui.recordLine_tableWidget->verticalHeader();
|
||||
//headerView->setHidden(true);//ȥ<><C8A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĭ<EFBFBD><C4AC><EFBFBD>Դ<EFBFBD><D4B4><EFBFBD><EFBFBD>к<EFBFBD>
|
||||
|
||||
|
||||
ui.recordLine_tableWidget->setColumnCount(2);
|
||||
ui.recordLine_tableWidget->setHorizontalHeaderLabels(QStringList() << "yPosition" << "xMaxPosition");
|
||||
|
||||
connect(ui.addRecordLine_btn, SIGNAL(clicked()), this, SLOT(onAddRecordLine_btn()));
|
||||
connect(ui.removeRecordLine_btn, SIGNAL(clicked()), this, SLOT(onRemoveRecordLine_btn()));
|
||||
connect(ui.generateRecordLine_btn, SIGNAL(clicked()), this, SLOT(onGenerateRecordLine_btn()));
|
||||
connect(ui.deleteRecordLine_btn, SIGNAL(clicked()), this, SLOT(onDeleteRecordLine_btn()));
|
||||
connect(ui.saveRecordLine2File_btn, SIGNAL(clicked()), this, SLOT(onSaveRecordLine2File_btn()));
|
||||
connect(ui.readRecordLineFile_btn, SIGNAL(clicked()), this, SLOT(onReadRecordLineFile_btn()));
|
||||
}
|
||||
|
||||
PathPlan::~PathPlan()
|
||||
{}
|
||||
|
||||
void PathPlan::setMotor(VinceControl* xMotor, VinceControl* yMotor)
|
||||
{
|
||||
m_xMotor = xMotor;
|
||||
m_yMotor = yMotor;
|
||||
}
|
||||
|
||||
QTableWidget* PathPlan::getRecordLineTableWidget()
|
||||
{
|
||||
return ui.recordLine_tableWidget;
|
||||
}
|
||||
|
||||
void PathPlan::onAddRecordLine_btn()
|
||||
{
|
||||
//<><D7BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
ByteBack MotorState = m_yMotor->GetState();
|
||||
double currentPosOfYmotor = m_ySlider->getDistanceFromPulse(MotorState.Location);
|
||||
double maxRangeOfXmotro = m_xSlider->maximum();
|
||||
|
||||
//<2F><>ȡѡ<C8A1><D1A1><EFBFBD>е<EFBFBD><D0B5><EFBFBD><EFBFBD><EFBFBD>
|
||||
int currentRow = ui.recordLine_tableWidget->currentRow();
|
||||
std::cout << "currentRow<EFBFBD><EFBFBD>" << currentRow << std::endl;
|
||||
|
||||
QTableWidgetItem* Item1 = new QTableWidgetItem(QString::number(currentPosOfYmotor, 10, 2));
|
||||
QTableWidgetItem* Item2 = new QTableWidgetItem(QString::number(maxRangeOfXmotro, 10, 2));
|
||||
Item1->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
||||
Item2->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
||||
if (currentRow == -1)//<2F><>û<EFBFBD><C3BB>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD>ʱ
|
||||
{
|
||||
int RowCount = ui.recordLine_tableWidget->rowCount();//Returns the number of rows. <20><>1<EFBFBD><31>ʼ<EFBFBD><CABC>
|
||||
ui.recordLine_tableWidget->insertRow(RowCount);//<2F><><EFBFBD><EFBFBD>һ<EFBFBD>У<EFBFBD><D0A3>β<EFBFBD><CEB2>Ǵ<EFBFBD>0<EFBFBD><30>ʼ<EFBFBD><CABC>
|
||||
|
||||
ui.recordLine_tableWidget->setItem(RowCount, 0, Item1);
|
||||
ui.recordLine_tableWidget->setItem(RowCount, 1, Item2);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.recordLine_tableWidget->insertRow(currentRow + 1);//<2F><><EFBFBD><EFBFBD>һ<EFBFBD>У<EFBFBD><D0A3>β<EFBFBD><CEB2>Ǵ<EFBFBD>0<EFBFBD><30>ʼ<EFBFBD><CABC>
|
||||
|
||||
ui.recordLine_tableWidget->setItem(currentRow + 1, 0, Item1);
|
||||
ui.recordLine_tableWidget->setItem(currentRow + 1, 1, Item2);
|
||||
}
|
||||
}
|
||||
|
||||
void PathPlan::onRemoveRecordLine_btn()
|
||||
{
|
||||
int rowIndex = ui.recordLine_tableWidget->currentRow();
|
||||
if (rowIndex != -1)
|
||||
ui.recordLine_tableWidget->removeRow(rowIndex);
|
||||
}
|
||||
|
||||
void PathPlan::onGenerateRecordLine_btn()
|
||||
{
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
double height = ui.height_lineEdit->text().toDouble();
|
||||
double fov = ui.fov_lineEdit->text().toDouble();
|
||||
double swath = (height * tan(fov / 2 * PI / 180)) * 2;//tan<61><6E><EFBFBD><EFBFBD><EFBFBD>ǻ<EFBFBD><C7BB><EFBFBD>
|
||||
ui.swath_lineEdit->setText(QString::number(swath));
|
||||
|
||||
|
||||
//<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Χ
|
||||
double xMotorRange = m_xSlider->maximum();
|
||||
double yMotorRange = m_ySlider->maximum();
|
||||
|
||||
|
||||
//ȷ<><C8B7><EFBFBD>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɼ<EFBFBD><C9BC>ߣ<EFBFBD><DFA3><EFBFBD>ʽ<EFBFBD><CABD>numberOfRecordLine_tmp * swath - repetitiveLength<74><68>numberOfRecordLine_tmp - 1<><31> = overallLength
|
||||
double overallLength = yMotorRange + swath;
|
||||
double repetitiveRate = ui.repetitiveRate_lineEdit->text().toDouble() / 100;
|
||||
double repetitiveLength = repetitiveRate * swath;
|
||||
double offset = ui.offset_lineEdit->text().toDouble();
|
||||
|
||||
double numberOfRecordLine_tmp = (overallLength - repetitiveLength - offset) / (swath - repetitiveLength);
|
||||
double tmp = numberOfRecordLine_tmp - (int)numberOfRecordLine_tmp;
|
||||
int numberOfRecordLine;
|
||||
double threshold = ui.LastLineThreshold_lineEdit->text().toDouble();//<2F><>numberOfRecordLine_tmpΪС<CEAA><D0A1>ʱ<EFBFBD><CAB1><EFBFBD>ж<EFBFBD><D0B6>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>ɼ<EFBFBD><C9BC><EFBFBD>
|
||||
if (tmp > threshold)
|
||||
{
|
||||
numberOfRecordLine = (int)numberOfRecordLine_tmp + 1;
|
||||
//std::cout << "<22><><EFBFBD>ڣ<EFBFBD>" << threshold << std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
numberOfRecordLine = (int)numberOfRecordLine_tmp;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//ȥ<><C8A5>tableWidget<65><74><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD><D0B5><EFBFBD>
|
||||
int rowCount = ui.recordLine_tableWidget->rowCount();
|
||||
for (size_t i = 0; i < rowCount; i++)
|
||||
{
|
||||
ui.recordLine_tableWidget->removeRow(0);
|
||||
}
|
||||
|
||||
|
||||
//<2F><>tableWidget<65><74><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD><D0A3>ɼ<EFBFBD><C9BC>ߣ<EFBFBD>
|
||||
QTableWidgetItem* tmpItem;
|
||||
for (size_t i = 0; i < numberOfRecordLine; i++)
|
||||
{
|
||||
//<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
|
||||
int RowCount = ui.recordLine_tableWidget->rowCount();
|
||||
ui.recordLine_tableWidget->insertRow(RowCount);
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD>yPosition
|
||||
if (tmp > threshold && i == numberOfRecordLine - 1)//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD>е<EFBFBD>yPosition
|
||||
{
|
||||
tmpItem = new QTableWidgetItem(QString::number(yMotorRange, 10, 2));
|
||||
tmpItem->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
||||
ui.recordLine_tableWidget->setItem(i, 0, tmpItem);
|
||||
}
|
||||
else
|
||||
{
|
||||
double x = swath * i - i * repetitiveLength + offset;
|
||||
tmpItem = new QTableWidgetItem(QString::number(x, 10, 2));
|
||||
tmpItem->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
||||
ui.recordLine_tableWidget->setItem(i, 0, tmpItem);
|
||||
}
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD>x<EFBFBD><78><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˶<EFBFBD>λ<EFBFBD><CEBB> <20><> ֵ<><D6B5><EFBFBD><EFBFBD>Ϊx<CEAA><78><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
tmpItem = new QTableWidgetItem(QString::number(xMotorRange, 10, 2));
|
||||
tmpItem->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
||||
ui.recordLine_tableWidget->setItem(i, 1, tmpItem);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void PathPlan::onDeleteRecordLine_btn()
|
||||
{
|
||||
int rowCount = ui.recordLine_tableWidget->rowCount();
|
||||
for (size_t i = 0; i < rowCount; i++)
|
||||
{
|
||||
ui.recordLine_tableWidget->removeRow(0);
|
||||
}
|
||||
}
|
||||
|
||||
void PathPlan::onSaveRecordLine2File_btn()
|
||||
{
|
||||
//ȷ<><C8B7><EFBFBD>ɼ<EFBFBD><C9BC>ߴ<EFBFBD><DFB4><EFBFBD>
|
||||
if (ui.recordLine_tableWidget->rowCount() <= 0)
|
||||
{
|
||||
QMessageBox::information(this, QString::fromLocal8Bit("<EFBFBD><EFBFBD>ʾ"), QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɹ켣<EFBFBD><EFBFBD>"));
|
||||
return;
|
||||
}
|
||||
|
||||
double height = ui.height_lineEdit->text().toDouble();
|
||||
double fov = ui.fov_lineEdit->text().toDouble();
|
||||
double swath = ui.swath_lineEdit->text().toDouble();
|
||||
double offset = ui.offset_lineEdit->text().toDouble();
|
||||
double repetitiveRate = ui.repetitiveRate_lineEdit->text().toDouble();
|
||||
double LastLineThreshold = ui.LastLineThreshold_lineEdit->text().toDouble();
|
||||
|
||||
FileOperation* fileOperation = new FileOperation();
|
||||
string directory = fileOperation->getDirectoryOfExe();
|
||||
|
||||
QString RecordLineFilePath = QFileDialog::getSaveFileName(this, tr("Save RecordLine File"),
|
||||
QString::fromStdString(directory),
|
||||
tr("RecordLineFile (*.RecordLine)"));
|
||||
|
||||
if (RecordLineFilePath.isEmpty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
FILE* RecordLineFileHandle = fopen(RecordLineFilePath.toStdString().c_str(), "wb+");
|
||||
|
||||
fwrite(&height, sizeof(double), 1, RecordLineFileHandle);
|
||||
fwrite(&fov, sizeof(double), 1, RecordLineFileHandle);
|
||||
fwrite(&swath, sizeof(double), 1, RecordLineFileHandle);
|
||||
fwrite(&offset, sizeof(double), 1, RecordLineFileHandle);
|
||||
fwrite(&repetitiveRate, sizeof(double), 1, RecordLineFileHandle);
|
||||
fwrite(&LastLineThreshold, sizeof(double), 1, RecordLineFileHandle);
|
||||
|
||||
double number = ui.recordLine_tableWidget->rowCount() * ui.recordLine_tableWidget->columnCount();
|
||||
fwrite(&number, sizeof(double), 1, RecordLineFileHandle);
|
||||
|
||||
double* data = new double[number];
|
||||
//double data[number];
|
||||
for (size_t i = 0; i < ui.recordLine_tableWidget->rowCount(); i++)
|
||||
{
|
||||
for (size_t j = 0; j < ui.recordLine_tableWidget->columnCount(); j++)
|
||||
{
|
||||
data[i * ui.recordLine_tableWidget->columnCount() + j] = ui.recordLine_tableWidget->item(i, j)->text().toDouble();
|
||||
}
|
||||
}
|
||||
|
||||
fwrite(data, sizeof(double), number, RecordLineFileHandle);
|
||||
|
||||
fclose(RecordLineFileHandle);
|
||||
delete[] data;
|
||||
|
||||
QMessageBox::information(this, QString::fromLocal8Bit("<EFBFBD><EFBFBD>ʾ"), QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD>"));
|
||||
}
|
||||
|
||||
void PathPlan::onReadRecordLineFile_btn()
|
||||
{
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
|
||||
FileOperation* fileOperation = new FileOperation();
|
||||
string directory = fileOperation->getDirectoryOfExe();
|
||||
//string RecordLineFilePath = directory + "\\test.RecordLine";
|
||||
|
||||
QString RecordLineFilePath = QFileDialog::getOpenFileName(this, tr("Open RecordLine File"),
|
||||
QString::fromStdString(directory),
|
||||
tr("RecordLineFile (*.RecordLine)"));
|
||||
|
||||
if (RecordLineFilePath.isEmpty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
FILE* RecordLineFileHandle = fopen(RecordLineFilePath.toStdString().c_str(), "rb");
|
||||
double height, fov, swath, offset, repetitiveRate, LastLineThreshold, number;
|
||||
|
||||
//<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>
|
||||
fread(&height, sizeof(double), 1, RecordLineFileHandle);
|
||||
fread(&fov, sizeof(double), 1, RecordLineFileHandle);
|
||||
fread(&swath, sizeof(double), 1, RecordLineFileHandle);
|
||||
fread(&offset, sizeof(double), 1, RecordLineFileHandle);
|
||||
fread(&repetitiveRate, sizeof(double), 1, RecordLineFileHandle);
|
||||
fread(&LastLineThreshold, sizeof(double), 1, RecordLineFileHandle);
|
||||
fread(&number, sizeof(double), 1, RecordLineFileHandle);
|
||||
|
||||
double* data = new double[number];
|
||||
for (size_t i = 0; i < number; i++)
|
||||
{
|
||||
fread(data + i, sizeof(double), 1, RecordLineFileHandle);
|
||||
//std::cout << *(data + i) << std::endl;
|
||||
}
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д
|
||||
ui.height_lineEdit->setText(QString::number(height));
|
||||
ui.fov_lineEdit->setText(QString::number(fov));
|
||||
ui.swath_lineEdit->setText(QString::number(swath));
|
||||
ui.offset_lineEdit->setText(QString::number(offset));
|
||||
ui.repetitiveRate_lineEdit->setText(QString::number(repetitiveRate));
|
||||
ui.LastLineThreshold_lineEdit->setText(QString::number(LastLineThreshold));
|
||||
|
||||
|
||||
//<2F><>tableWidget<65><74><EFBFBD>Ӳɼ<D3B2><C9BC><EFBFBD>
|
||||
//<2F><>1<EFBFBD><31>ȥ<EFBFBD><C8A5>tableWidget<65><74><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD><D0B5><EFBFBD>
|
||||
int rowCount = ui.recordLine_tableWidget->rowCount();
|
||||
for (size_t i = 0; i < rowCount; i++)
|
||||
{
|
||||
ui.recordLine_tableWidget->removeRow(0);
|
||||
}
|
||||
//<2F><>2<EFBFBD><32><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD><D0A3>ɼ<EFBFBD><C9BC>ߣ<EFBFBD>
|
||||
int RecordLineCount = number / ui.recordLine_tableWidget->columnCount();
|
||||
for (size_t i = 0; i < RecordLineCount; i++)
|
||||
{
|
||||
ui.recordLine_tableWidget->insertRow(0);
|
||||
|
||||
}
|
||||
//<2F><>3<EFBFBD><33><EFBFBD><EFBFBD>tableWidget<65><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
for (size_t i = 0; i < ui.recordLine_tableWidget->rowCount(); i++)
|
||||
{
|
||||
for (size_t j = 0; j < ui.recordLine_tableWidget->columnCount(); j++)
|
||||
{
|
||||
QTableWidgetItem* tmp = new QTableWidgetItem(QString::number(data[i * ui.recordLine_tableWidget->columnCount() + j], 10, 5));
|
||||
tmp->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
||||
ui.recordLine_tableWidget->setItem(i, j, tmp);
|
||||
}
|
||||
}
|
||||
|
||||
fclose(RecordLineFileHandle);
|
||||
delete[] data;
|
||||
|
||||
QMessageBox::information(this, QString::fromLocal8Bit("<EFBFBD><EFBFBD>ʾ"), QString::fromLocal8Bit("<EFBFBD><EFBFBD>ȡ<EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD>"));
|
||||
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <QDialog>
|
||||
#include "ui_PathPlan.h"
|
||||
#include "vincecontrol.h"
|
||||
#include <QMotorDoubleSlider.h>
|
||||
|
||||
#define PI 3.1415926
|
||||
|
||||
class PathPlan : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
PathPlan(VinceControl* xMotor, VinceControl* yMotor, QMotorDoubleSlider* xSlider, QMotorDoubleSlider* ySlider, QWidget* parent = nullptr);
|
||||
~PathPlan();
|
||||
|
||||
void setMotor(VinceControl* xMotor, VinceControl* yMotor);
|
||||
QTableWidget* getRecordLineTableWidget();
|
||||
|
||||
private:
|
||||
Ui::PathPlanClass ui;
|
||||
|
||||
VinceControl* m_xMotor;
|
||||
VinceControl* m_yMotor;
|
||||
|
||||
QMotorDoubleSlider* m_xSlider;
|
||||
QMotorDoubleSlider* m_ySlider;
|
||||
|
||||
public Q_SLOTS:
|
||||
void onAddRecordLine_btn();
|
||||
void onRemoveRecordLine_btn();
|
||||
void onGenerateRecordLine_btn();
|
||||
void onDeleteRecordLine_btn();
|
||||
void onSaveRecordLine2File_btn();
|
||||
void onReadRecordLineFile_btn();
|
||||
};
|
167
HPPA/RadianceConversion.ui
Normal file
167
HPPA/RadianceConversion.ui
Normal file
@ -0,0 +1,167 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>RadianceConversion_UI</class>
|
||||
<widget class="QDialog" name="RadianceConversion_UI">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>544</width>
|
||||
<height>177</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>辐亮度转换</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>影像</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>定标文件</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="imgPath_lineEdit">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="calFilePath_lineEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QPushButton" name="imgSelect_btn">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="calFileSelect_btn">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="conversion_btn">
|
||||
<property name="text">
|
||||
<string>转换</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>191</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
167
HPPA/ReflectanceConversion.ui
Normal file
167
HPPA/ReflectanceConversion.ui
Normal file
@ -0,0 +1,167 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ReflectanceConversion_UI</class>
|
||||
<widget class="QDialog" name="ReflectanceConversion_UI">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>544</width>
|
||||
<height>177</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>反射率转换</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>影像</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>白板影像</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="imgPath_lineEdit">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="whiteImgPath_lineEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QPushButton" name="imgSelect_btn">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="whiteImgSelect_btn">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="conversion_btn">
|
||||
<property name="text">
|
||||
<string>转换</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>191</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -65,6 +65,30 @@ bool TwoMotorControl::getState()
|
||||
return tmp;
|
||||
}
|
||||
|
||||
void TwoMotorControl::record_dark()
|
||||
{
|
||||
double s = ui.xmotor_move_speed_lineEdit->text().toDouble();
|
||||
|
||||
if (m_darkCaptureCoordinator == nullptr)
|
||||
{
|
||||
m_darkCaptureCoordinator = new DarkAndWhiteCaptureCoordinator(0, m_multiAxisController, m_Imager);
|
||||
}
|
||||
|
||||
m_darkCaptureCoordinator->startStepMotion(s);
|
||||
}
|
||||
|
||||
void TwoMotorControl::record_white()
|
||||
{
|
||||
double s = ui.xmotor_move_speed_lineEdit->text().toDouble();
|
||||
|
||||
if (m_whiteCaptureCoordinator == nullptr)
|
||||
{
|
||||
m_whiteCaptureCoordinator = new DarkAndWhiteCaptureCoordinator(1, m_multiAxisController, m_Imager);
|
||||
}
|
||||
|
||||
m_whiteCaptureCoordinator->startStepMotion(s);
|
||||
}
|
||||
|
||||
void TwoMotorControl::run()
|
||||
{
|
||||
if (m_coordinator==nullptr)
|
||||
|
@ -24,6 +24,9 @@ public:
|
||||
void setImager(ImagerOperationBase* imager);
|
||||
void setPosFileName(QString posFileName);
|
||||
|
||||
void record_dark();
|
||||
void record_white();
|
||||
|
||||
private:
|
||||
ImagerOperationBase* m_Imager;
|
||||
bool getState();
|
||||
@ -84,6 +87,9 @@ private:
|
||||
QThread m_coordinatorThread;
|
||||
TwoMotionCaptureCoordinator* m_coordinator = nullptr;
|
||||
|
||||
DarkAndWhiteCaptureCoordinator* m_darkCaptureCoordinator = nullptr;
|
||||
DarkAndWhiteCaptureCoordinator* m_whiteCaptureCoordinator = nullptr;
|
||||
|
||||
QThread m_motorThread;
|
||||
IrisMultiMotorController* m_multiAxisController;
|
||||
};
|
||||
|
@ -70,7 +70,7 @@
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>版本:1.9.0</string>
|
||||
<string>版本:2.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_4">
|
||||
|
Reference in New Issue
Block a user