新的一轴采集逻辑控制器

This commit is contained in:
tangchao0503
2025-09-15 11:18:38 +08:00
parent 496f61c0e1
commit 1e0cf1aa12
6 changed files with 269 additions and 40 deletions

View File

@ -105,3 +105,65 @@ private:
int m_numCurrentPathLine;
};
struct OneMotionCapturePathLine
{
double startPosition;
double stopPosition;
double speedRecord;
double speedBack;
QDateTime timestamp1;//开始
QDateTime timestamp2;//结束
OneMotionCapturePathLine()
: startPosition(0), stopPosition(0), speedRecord(0), speedBack(0),
timestamp1(QDateTime::currentDateTime()), timestamp2(QDateTime::currentDateTime()) {}
};
Q_DECLARE_METATYPE(OneMotionCapturePathLine);
class OneMotionCaptureCoordinator : public QObject
{
Q_OBJECT
public:
OneMotionCaptureCoordinator(IrisMultiMotorController* motorCtrl,
ImagerOperationBase* cameraCtrl,
QObject* parent = nullptr);
~OneMotionCaptureCoordinator();
bool saveToCsv(const QString& filename);
public slots:
void startStepMotion(OneMotionCapturePathLine pathLine);
void stopStepMotion();
void handleCaptureCompleteWhenFrameNumberMeet();
signals:
void sequenceComplete(int);
void errorOccurred(const QString& error);
void moveTo(int, double, double, int);
void moveSignal(int, bool, double, int);
void stopMotorSignal(int axis);
void startRecordHSISignal();
void stopRecordHSISignal();
private slots:
void handleMotorStoped(int motorID, double pos);
void handleCaptureComplete(double index);
void handleError(const QString& error);
private:
IrisMultiMotorController* m_motorCtrl;
ImagerOperationBase* m_cameraCtrl;
OneMotionCapturePathLine m_pathLine;
mutable QMutex m_dataMutex;
bool m_isRunning;
std::vector<double> m_locBeforeStart;
void getLocBeforeStart();
void move2LocBeforeStart();
};