回滚旧的最大速度计算方法

This commit is contained in:
2026-09-07 17:31:04 +08:00
parent a882c30e09
commit eb5d824e02
2 changed files with 8 additions and 14 deletions
+7 -13
View File
@@ -708,12 +708,12 @@ bool MainWindow::updatePhaseIndicatorLight(){
return sysPara->status.lastPhaseFault;
}
double MainWindow::getMaxSpeedCalcPara(){
int MainWindow::getMaxSpeedCalcPara(){
sysPara->para.printRowDelay = sysPara->para.currPrintMode;
if(sysPara->status.isPrinting == false)
sysPara->status.pixNumPerCol = sysPara->status.currPrintRow;
// else
// sysPara->status.currPrintRow = sysPara->status.pixNumPerCol;
else
sysPara->status.currPrintRow = sysPara->status.pixNumPerCol;
sysPara->para.pixNumPerCol = sysPara->status.pixNumPerCol;
sysPara->para.reducedPixelNum = sysPara->para.reducedPixelNumRatio*sysPara->para.pixNumPerCol/100;
@@ -726,15 +726,9 @@ double MainWindow::getMaxSpeedCalcPara(){
int dotNum = sysPara->para.divideRatio?(FPGA_SYS_HZ/(sysPara->para.divideRatio*2)):0;// 1s时间内墨点数 (即晶振频率 64000)
int colNum = dotNumPerCol?dotNum/dotNumPerCol:0; // 第列可用墨点数 = 1s时间内墨点数/ 列需要墨点数
double pulseNum = colNum*sysPara->para.synNumPerCol/(1<<8); //synNumPerCol是被放大后的值
int pulseNum = colNum*sysPara->para.synNumPerCol/(1<<8); //synNumPerCol是被放大后的值
if(sysPara->para.divideRatio == 0 || sysPara->para.synPulseNumPerMm == 0)
return 600.0f;
double freq = (FPGA_SYS_HZ/(sysPara->para.divideRatio*2));
double ddotNumPerCol = sysPara->status.currPrintRow - (sysPara->status.currPrintRow * sysPara->para.reducedPixelNumRatio / 100.0);
pulseNum = sysPara->para.printColDelay / sysPara->para.synPulseNumPerMm / 1000.0 * freq / ddotNumPerCol * 60.0;
return qBound(0.0, pulseNum, 600.0);
return pulseNum;
}
static int reclaimTankDelay = 0;
@@ -800,8 +794,8 @@ void MainWindow::updateSysStatusToUI(){ //100ms
}
else
{
double speed = getMaxSpeedCalcPara();//No67
maxMM = int(speed * 1000.0);
int pulsePS = getMaxSpeedCalcPara();//No67
maxMM = (pulsePS/sysPara->para.synPulseNumPerMm) * 60;// 列的最大间距
}
ui->labelSynRate->setText(tr("%1.%2[%3.%4]米/分").arg(mm/1000).arg(mm%1000,3,10,QLatin1Char('0'))
.arg(maxMM/1000).arg(maxMM%1000,3,10,QLatin1Char('0')));