1、在光谱相机操作基类中添加自动调焦指数,并通过信号发送;

2、将位置-指数写入csv文件,使用Eigen,通过高斯拟合加速实现自动调焦算法;
3、界面兼容老版(张卓)和新版(唐超)的马达控制和自动调焦算法流程,添加采样间隔参数;
4、配置文件备份,自动调焦电机厂商没有导程信息,唐超通过行程算出的,不准确,但完全够用;
This commit is contained in:
tangchao0503
2025-08-14 17:40:27 +08:00
parent 48be580226
commit 1867291c9b
8 changed files with 929 additions and 129 deletions

43
cfg_file_backup/HPPA.cfg Normal file
View File

@ -0,0 +1,43 @@
SN = "2004";
autoFocus :
{
PositionRestriction :
{
max = 1000;
min = 120;
};
TuningStepSize :
{
coarse = 10;
fine = 2;
};
FitParams :
{
fa = 0.0017;
fb = 0.3277;
};
AutoFocusRange :
{
max = 688;
min = 144;
};
};
motionPlatform :
{
x :
{
StepAnglemar = 1.8;
Lead = 1.0;
SubdivisionMultiples = 8;
ScaleFactor = 1.0;
MaxRange = 30.742266;
};
y :
{
StepAnglemar = 1.8;
Lead = 1.0;
SubdivisionMultiples = 8;
ScaleFactor = 1.0;
MaxRange = 31.283163;
};
};

View File

@ -0,0 +1,60 @@
SN = "0";
motors :
{
motor1 :
{
platformParams :
{
hardwareParams :
{
StepAngle = 1.8;
Lead = 4.0;
ScaleFactor = 1.0;
};
runParams :
{
RecordSpeed = 1.8;
MoveSpeed = 1.8;
ReturnSpeed = 1.8;
MaxRange = 120.0;
};
};
motorParams :
{
Manufacturer = 0;
CommunicationProtocol = 0;
connectionParams :
{
SerialPortNumber = "COM10";
BaudRate = 9600;
};
initParams :
{
limit :
{
msr = 1;
msv = 0;
psr = 2;
psv = 0;
};
other :
{
acc = 20000.0;
cra = 4.0;
crh = 1.0;
crn = 4.0;
dec = 20000.0;
mcs = 7;
};
zeroStart :
{
osv = 0;
snr = 0;
zmd = 2;
zsd = 3000;
zsp = 2400;
};
};
};
};
};

View File

@ -0,0 +1,60 @@
SN = "0";
motors :
{
motor1 :
{
platformParams :
{
hardwareParams :
{
StepAngle = 1.8;
Lead = 1.37;
ScaleFactor = 1.0;
};
runParams :
{
RecordSpeed = 1.0;
MoveSpeed = 1.0;
ReturnSpeed = 1.0;
MaxRange = 11.559696;
};
};
motorParams :
{
Manufacturer = 0;
CommunicationProtocol = 1;
connectionParams :
{
SerialPortNumber = "COM10";
BaudRate = 9600;
};
initParams :
{
limit :
{
msr = 1;
msv = 1;
psr = 2;
psv = 1;
};
other :
{
acc = 19200.0;
cra = 0.2;
crh = 0.0;
crn = 0.2;
dec = 19200.0;
mcs = 6;
};
zeroStart :
{
osv = 1;
snr = 0;
zmd = 1;
zsd = 4000;
zsp = 2400;
};
};
};
};
};