Files
HPPA/HPPA/QMotorDoubleSlider.h
tangchao0503 0b4ee48355 1、实现了光谱仪简单的采集功能:曝光、调焦、暗电流、采集影像、保存影像;
2、设置光谱仪帧率、曝光时间、gain;
3、在页面中嵌入了rgb相机图传(通过opencv实现);
4、平台的相机位置模拟、x/y马达的分别控制、x/y马达的量程检测;
5、轨迹规划;
6、加入了张卓的自动调焦模块;
7、加入了自动电源控制;
2023-03-14 22:52:38 +08:00

38 lines
1.1 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef Q_MOTOR_DOUBLE_SLIDER_H
#define Q_MOTOR_DOUBLE_SLIDER_H
#include <QtGui/QtGui>
#include <QSlider>
class QMotorDoubleSlider : public QSlider
{
Q_OBJECT
public:
QMotorDoubleSlider(QWidget* pParent = NULL);
double m_Multiplier;//根据公式将脉冲换算为距离1脉冲距离(m_Multiplier)=导程/(360/步距角*细分倍数)网址https://wenku.baidu.com/view/4b2ea88bd0d233d4b14e69b8.html
double m_yMultiplier;//步距角1.8导程135mm
void setRange(double Min, double Max);
void setMinimum(double Min);
double minimum() const;
void setMaximum(double Max);
double maximum() const;
double value() const;
double OriginalValue() const;//返回脉冲值:马达需要实际的脉冲值,而不是距离
long getPositionPulse(double position);//根据传入的距离返回脉冲值
double getDistanceFromPulse(int pulse);
public slots:
void notifyValueChanged(int value);//信号valueChanged(int)的wrap
void setValue(double Value, bool BlockSignals = true);//QSlider::setValue函数的wrap
private slots:
signals :
void valueChanged(double Value);
void rangeChanged(double Min, double Max);
private:
};
#endif