回滚旧的最大速度计算方法
This commit is contained in:
+7
-13
@@ -708,12 +708,12 @@ bool MainWindow::updatePhaseIndicatorLight(){
|
|||||||
return sysPara->status.lastPhaseFault;
|
return sysPara->status.lastPhaseFault;
|
||||||
}
|
}
|
||||||
|
|
||||||
double MainWindow::getMaxSpeedCalcPara(){
|
int MainWindow::getMaxSpeedCalcPara(){
|
||||||
sysPara->para.printRowDelay = sysPara->para.currPrintMode;
|
sysPara->para.printRowDelay = sysPara->para.currPrintMode;
|
||||||
if(sysPara->status.isPrinting == false)
|
if(sysPara->status.isPrinting == false)
|
||||||
sysPara->status.pixNumPerCol = sysPara->status.currPrintRow;
|
sysPara->status.pixNumPerCol = sysPara->status.currPrintRow;
|
||||||
// else
|
else
|
||||||
// sysPara->status.currPrintRow = sysPara->status.pixNumPerCol;
|
sysPara->status.currPrintRow = sysPara->status.pixNumPerCol;
|
||||||
sysPara->para.pixNumPerCol = sysPara->status.pixNumPerCol;
|
sysPara->para.pixNumPerCol = sysPara->status.pixNumPerCol;
|
||||||
|
|
||||||
sysPara->para.reducedPixelNum = sysPara->para.reducedPixelNumRatio*sysPara->para.pixNumPerCol/100;
|
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 dotNum = sysPara->para.divideRatio?(FPGA_SYS_HZ/(sysPara->para.divideRatio*2)):0;// 1s时间内墨点数 (即晶振频率 64000)
|
||||||
int colNum = dotNumPerCol?dotNum/dotNumPerCol:0; // 第列可用墨点数 = 1s时间内墨点数/ 列需要墨点数
|
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 pulseNum;
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int reclaimTankDelay = 0;
|
static int reclaimTankDelay = 0;
|
||||||
@@ -800,8 +794,8 @@ void MainWindow::updateSysStatusToUI(){ //100ms
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
double speed = getMaxSpeedCalcPara();//No67
|
int pulsePS = getMaxSpeedCalcPara();//No67
|
||||||
maxMM = int(speed * 1000.0);
|
maxMM = (pulsePS/sysPara->para.synPulseNumPerMm) * 60;// 列的最大间距
|
||||||
}
|
}
|
||||||
ui->labelSynRate->setText(tr("%1.%2[%3.%4]米/分").arg(mm/1000).arg(mm%1000,3,10,QLatin1Char('0'))
|
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')));
|
.arg(maxMM/1000).arg(maxMM%1000,3,10,QLatin1Char('0')));
|
||||||
|
|||||||
+1
-1
@@ -63,7 +63,7 @@ public:
|
|||||||
void enableReclaimCtrlButton(bool enable);
|
void enableReclaimCtrlButton(bool enable);
|
||||||
void resetReclaimCtrlButtonText();
|
void resetReclaimCtrlButtonText();
|
||||||
void enablePushButtonStart(bool enable);
|
void enablePushButtonStart(bool enable);
|
||||||
double getMaxSpeedCalcPara();
|
int getMaxSpeedCalcPara();
|
||||||
|
|
||||||
void PreviewPressed();
|
void PreviewPressed();
|
||||||
int getCurrPrintStatus();
|
int getCurrPrintStatus();
|
||||||
|
|||||||
Reference in New Issue
Block a user