hlp:修改版本号规则
This commit is contained in:
@@ -2700,23 +2700,30 @@ int DevOp::writeFpgaPrintPara(bool ignoreWarn){
|
||||
QMessageBox::critical(NULL,tr("错误"),tr("在同步计米的情况下无打印串或显示区域为零"));
|
||||
}
|
||||
else {
|
||||
if(currPrintCol && type == 2){
|
||||
int synNumPerCol = displayAreaTotalSynNum*(1<<8)/(currPrintCol*(1 + sysPara->para.charBold));
|
||||
//加宽的时候,相当于列数翻倍
|
||||
if(displayAreaTotalSynNum >= (1<<24)){
|
||||
if(!ignoreWarn)
|
||||
QMessageBox::critical(NULL,tr("错误"),tr("在同步计米的情况下喷印同步脉冲数过多,请检查你的配置"));
|
||||
}
|
||||
if(synNumPerCol >= (1<< 16)){
|
||||
if(!ignoreWarn)
|
||||
QMessageBox::critical(NULL,tr("警告"),tr("喷印字符串太短,请增加字符串长度或在打印设置中减少喷印长度"));
|
||||
}
|
||||
if(synNumPerCol < 5){
|
||||
if(!ignoreWarn)
|
||||
QMessageBox::critical(NULL,tr("警告"),tr("喷印长度太短,请减少字符串长度或在打印设置中增加喷印长度"));
|
||||
}
|
||||
sysPara->para.synNumPerCol = synNumPerCol;
|
||||
// if(currPrintCol && type == 2){
|
||||
// int synNumPerCol = displayAreaTotalSynNum*(1<<8)/(currPrintCol*(1 + sysPara->para.charBold));
|
||||
// //加宽的时候,相当于列数翻倍
|
||||
// if(displayAreaTotalSynNum >= (1<<24)){
|
||||
// if(!ignoreWarn)
|
||||
// QMessageBox::critical(NULL,tr("错误"),tr("在同步计米的情况下喷印同步脉冲数过多,请检查你的配置"));
|
||||
// }
|
||||
// if(synNumPerCol >= (1<< 16)){
|
||||
// if(!ignoreWarn)
|
||||
// QMessageBox::critical(NULL,tr("警告"),tr("喷印字符串太短,请增加字符串长度或在打印设置中减少喷印长度"));
|
||||
// }
|
||||
// if(synNumPerCol < 5){
|
||||
// if(!ignoreWarn)
|
||||
// QMessageBox::critical(NULL,tr("警告"),tr("喷印长度太短,请减少字符串长度或在打印设置中增加喷印长度"));
|
||||
// }
|
||||
// sysPara->para.synNumPerCol = synNumPerCol;
|
||||
|
||||
// sysPara->para.synNumPerCol = sysPara->para.printColDelay << 8;
|
||||
// }/
|
||||
|
||||
if(currPrintCol){
|
||||
sysPara->para.synNumPerCol = sysPara->para.printColDelay << 8;
|
||||
}
|
||||
|
||||
if(sysPara->para.synPulseNumPerMm<1 || sysPara->para.synPulseNumPerMm>50) {
|
||||
}
|
||||
sysPara->para.synPulsePerMmX8 = (unsigned short)((unsigned int)sysPara->para.synPulseNumPerMm <<8);
|
||||
@@ -3377,6 +3384,8 @@ void DevOp::printCtrl2(int cmd){
|
||||
}
|
||||
|
||||
unsigned int DevOp::readFpgaVersionNum(){
|
||||
if (sysPara == NULL) return 0;
|
||||
|
||||
fpgaRd(0x00EC,&sysPara->status.FPGAChipType,1);
|
||||
fpgaRd(0x00FE,(unsigned char *)&sysPara->status.fpgaVersionNum,2);
|
||||
fpgaRd(READ_BUILD_DAT, (unsigned char *)&sysPara->status.build_dat.builTime, sizeof(sysPara->status.build_dat.builTime));
|
||||
|
||||
+570
-532
File diff suppressed because it is too large
Load Diff
+26
-8
@@ -101,14 +101,32 @@ private:
|
||||
QTimer* viscosity_timer;
|
||||
QTimer* timer;
|
||||
QTime t1;
|
||||
bool m_rampDone = false; // pressureAdj 软启动完成标志
|
||||
int m_adjSkip = 0; // pressureAdj 节拍计数
|
||||
int m_lastPressure = 0; // pressureAdj 上次采样压力(稳定检测用)
|
||||
int m_stableCount = 0; // pressureAdj 压力连续稳定计数
|
||||
int m_pressureBuf[10] = {}; // pressureAdj 压力滑动平均缓冲(10点=1s)
|
||||
int m_bufIdx = 0; // pressureAdj 滑动平均写入索引
|
||||
bool m_lastReclaimMode = false; // 上次 flagOfReclaimPumEnable 状态,用于检测切换
|
||||
bool m_lastByHand = false; // 上次 isPumpValveControledByHand 状态,用于检测手动、自动
|
||||
|
||||
// 隔膜泵状态枚举
|
||||
enum DiaphragmPumpState {
|
||||
DPUMP_STOPPED = 0, // 停止状态
|
||||
DPUMP_STARTING = 1, // 启动爬升状态
|
||||
DPUMP_RUNNING = 2 // 运行微调状态
|
||||
};
|
||||
|
||||
// 隔膜泵控制参数
|
||||
DiaphragmPumpState m_pumpState = DPUMP_STOPPED; // 泵当前状态
|
||||
int m_stateChangeCount = 0; // 状态切换计数器(用于实现800ms间隔)
|
||||
int m_adjSkip = 0; // 调节跳过计数器
|
||||
int m_lastActualPressure = 0; // 上次实时压力(微分项用)
|
||||
int m_startingStepCount = 0; // 启动步进计数器
|
||||
int m_pressureBuf[10] = {}; // 压力滑动平均缓冲(10点=1s)
|
||||
int m_bufIdx = 0; // 滑动平均写入索引
|
||||
int m_bufValidCount = 0; // 缓冲区有效点数(用于启动阶段判断)
|
||||
bool m_lastReclaimMode = false; // 上次回收泵使能状态
|
||||
bool m_lastByHand = false; // 上次手动控制状态
|
||||
|
||||
// 隔膜泵控制函数
|
||||
float calculateTargetSpeed(int err);
|
||||
void handleStoppedState(int err, bool canSwitch);
|
||||
void handleStartingState(int err, int actual, int target);
|
||||
void handleRunningState(int err, bool canSwitch);
|
||||
|
||||
void autoControlHeater();
|
||||
void autoControlValvePump();
|
||||
void detectAndcontrolReclaimTank();
|
||||
|
||||
+3
-2
@@ -417,13 +417,14 @@ void PrintSetting::updateSysParaToUI(){
|
||||
void PrintSetting::showMachInfo(QString Mac)
|
||||
{
|
||||
QString VernonBach;
|
||||
VernonBach.sprintf("%d.%d.%02d%s%s_", UP_PRINTER_MAJOR_VER, UP_PRINTER_MINOR_VER,UP_PRINTER_RIVISION_VER,SUB_VERSION,SUB_RFID);
|
||||
VernonBach.sprintf("%s.%s.", MACHINAE_VER, PUMP_VER);
|
||||
VernonBach = VernonBach + (QString) Public::DateToString(__DATE__)+"_";//+UP_PRINTER_STAGE_VER;
|
||||
}
|
||||
void PrintSetting::showRemoteControl(QString SuperNodeIP,QString EdgeIP)
|
||||
{
|
||||
QString VernonBach;
|
||||
VernonBach.sprintf("%d.%d.%02d%s%s_", UP_PRINTER_MAJOR_VER, UP_PRINTER_MINOR_VER,UP_PRINTER_RIVISION_VER,SUB_VERSION,SUB_RFID);
|
||||
// VernonBach.sprintf("%d.%d.%02d%s%s_", UP_PRINTER_MAJOR_VER, UP_PRINTER_MINOR_VER,UP_PRINTER_RIVISION_VER,SUB_VERSION,SUB_RFID);
|
||||
VernonBach=SUB_RFID;
|
||||
VernonBach = VernonBach + (QString) Public::DateToString(__DATE__)+"_";//+UP_PRINTER_STAGE_VER;
|
||||
}
|
||||
|
||||
|
||||
+2
-23
@@ -369,33 +369,12 @@ QString Public::DateToString(char const *time){
|
||||
int month, day, year;
|
||||
//struct tm t = {0};
|
||||
static const char month_names[] = "JanFebMarAprMayJunJulAugSepOctNovDec";
|
||||
//qDebug()<<time;
|
||||
sscanf(time, "%s %d %d", s_month, &day, &year);
|
||||
//qDebug()<<time<<s_month<<day<<year;
|
||||
|
||||
month = ((strstr(month_names, s_month)-month_names)/3)+1;
|
||||
//qDebug()<<month<<s_month;
|
||||
QString s;
|
||||
s.sprintf("%04d-%02d-%02d",year,month,day);
|
||||
return s;
|
||||
}
|
||||
|
||||
QString Public::ArmDate2String(const char *date, const char *time)
|
||||
{
|
||||
char s_month[5];
|
||||
int month, day, year;
|
||||
static const char month_names[] = "JanFebMarAprMayJunJulAugSepOctNovDec";
|
||||
sscanf(date, "%s %d %d", s_month, &day, &year);
|
||||
month = ((strstr(month_names, s_month)-month_names)/3)+1;
|
||||
QString dateStr;
|
||||
dateStr.sprintf("A%04d%02d%02d",year,month,day);
|
||||
|
||||
int hour, min, secend;
|
||||
sscanf(time, "%d:%d:%d", &hour, &min, &secend);
|
||||
QString timeStr;
|
||||
timeStr.sprintf("%02d%02d", hour, min);
|
||||
|
||||
QString s = dateStr+timeStr;
|
||||
// s.sprintf("%04d-%02d-%02d",year,month,day);
|
||||
s.sprintf("%02d%02d",month,day);
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,8 +36,6 @@ public:
|
||||
static time_t getDateFromMacro(const char *time);
|
||||
static QString DateToString(const char *time);
|
||||
|
||||
static QString ArmDate2String(const char * date, const char * time);
|
||||
|
||||
static QString ReadKeyBoardUse();
|
||||
|
||||
static int getType(int vartype); // 将变量类型进行转换,以处理横向字体
|
||||
|
||||
@@ -57,7 +57,7 @@ DEFINES+=WARNING
|
||||
|
||||
DEFINES+=TEMPMIMA
|
||||
DEFINES+=COUNTER1_BY_GROUP #分段计米
|
||||
# DEFINES+=COUNTER2_BY_GROUP #分段计米2
|
||||
#DEFINES+=COUNTER2_BY_GROUP #分段计米2
|
||||
DEFINES+=_2DCODE_ #QR二维码
|
||||
DEFINES+=PICSCENE
|
||||
#DEFINES+=__2451WIFI__
|
||||
|
||||
+7
-21
@@ -93,13 +93,11 @@ TriggerCtrl::TriggerCtrl(QWidget *parent) :
|
||||
connect(pulseNumFix,SIGNAL(pulseNuxFixDone(float)),this,SLOT(onPulseNumFixDone(float)));
|
||||
|
||||
updateSysStatusToUI();
|
||||
|
||||
QString s;
|
||||
|
||||
s.sprintf("%d.%d.%02d%s%s_", UP_PRINTER_MAJOR_VER, UP_PRINTER_MINOR_VER,UP_PRINTER_RIVISION_VER,SUB_VERSION,SUB_RFID);
|
||||
s = s + (QString) Public::DateToString(__DATE__)+"_"+ QString(__TIME__)+"_";
|
||||
// hlp :邓总要求,采用新的格式进行转换 0727
|
||||
// s = Public::ArmDate2String(__DATE__, __TIME__);
|
||||
|
||||
// s.sprintf("%d.%d.%02d%s%s_", UP_PRINTER_MAJOR_VER, UP_PRINTER_MINOR_VER,UP_PRINTER_RIVISION_VER,SUB_VERSION,SUB_RFID);
|
||||
s.sprintf("%s.%s.", MACHINAE_VER, PUMP_VER);
|
||||
s = s + (QString) Public::DateToString(__DATE__)+"."+SUB_VER+SUB_RFID;
|
||||
ui->test_version->setText(s);
|
||||
ui->checkBoxEleEyeMakeClean->setVisible(false);
|
||||
tr("独立参数");
|
||||
@@ -398,16 +396,6 @@ void TriggerCtrl::updateSysStatusToUI(){
|
||||
ui->spinBoxpluseSinal->setValue(sysPara->para.pulse_sinal_value);
|
||||
t_init = 1;
|
||||
}
|
||||
// if((sysPara->para.printTriggerMode == PRINT_TRIGGER_SYNCHRONIZER))
|
||||
// {
|
||||
// ui->lineEditPulseCount ->setText(QString::number((int )((sysPara->para.synTriggerPrintLenMm)*sysPara->para.synPulseNumPerMm)));
|
||||
// }
|
||||
// else if(((sysPara->para.printTriggerMode == PRINT_TRIGGER_ELEC_EYE_VOLTATE_LEVEL
|
||||
// ||sysPara->para.printTriggerMode == PRINT_TRIGGER_ELEC_EYE_EDGE)
|
||||
// && sysPara->para.eleEyeTriggerSynPrintEn))
|
||||
// {
|
||||
// ui->lineEditPulseCount ->setText(QString::number( (int )((sysPara->para.elecEyeTriggerInterval)*sysPara->para.synPulseNumPerMm)));
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -511,11 +499,9 @@ void TriggerCtrl::on_checkBoxPulseOutputEnable_clicked()
|
||||
void TriggerCtrl::setBuildTime(QString s1)
|
||||
{
|
||||
QString s;
|
||||
s.sprintf("A%d.%d.%02d%s%s_", UP_PRINTER_MAJOR_VER, UP_PRINTER_MINOR_VER,UP_PRINTER_RIVISION_VER,SUB_VERSION,SUB_RFID);
|
||||
s = s + (QString) Public::DateToString(__DATE__)+ "_"+ QString(__TIME__);
|
||||
// hlp :邓总要求,采用新的格式进行转换 0727
|
||||
// s = Public::ArmDate2String(__DATE__, __TIME__);
|
||||
|
||||
// s.sprintf("A%d.%d.%02d%s%s_", UP_PRINTER_MAJOR_VER, UP_PRINTER_MINOR_VER,UP_PRINTER_RIVISION_VER,SUB_VERSION,SUB_RFID);
|
||||
s.sprintf("%s.%s.", MACHINAE_VER, PUMP_VER);
|
||||
s = s + (QString) Public::DateToString(__DATE__)+"."+SUB_VER+SUB_RFID;//+ "_"+ QString(__TIME__)
|
||||
ui->test_version->setText(s+s1);
|
||||
|
||||
}
|
||||
|
||||
+6
-10
@@ -2,21 +2,17 @@
|
||||
#define VERBVERSION_H
|
||||
#include "myinclude.h"
|
||||
/*
|
||||
Major.Minor.Rivison.yyyy-MM-DD_Beta
|
||||
VX5.D.0826.0100-C
|
||||
MACHINAE_VER.PUMP_VER.MMdd.SUB_VER+SUB_RFID
|
||||
*/
|
||||
#define UP_PRINTER_MAJOR_VER 6
|
||||
#define UP_PRINTER_MINOR_VER 8
|
||||
#define UP_PRINTER_RIVISION_VER 3
|
||||
// #define SUB_VERSION "_GuiL"
|
||||
//#define SUB_VERSION "_JingZ"
|
||||
//#define SUB_VERSION "_RFID"
|
||||
#define SUB_VERSION "_Std"
|
||||
// #define SUB_VERSION "_Std_VZ"
|
||||
#define MACHINAE_VER "VX5"
|
||||
#define PUMP_VER "D"
|
||||
#define SUB_VER "0100"
|
||||
|
||||
#ifdef __RFID_OLD
|
||||
#define SUB_RFID "_RO"
|
||||
#else
|
||||
#define SUB_RFID ""
|
||||
#define SUB_RFID "-C"
|
||||
#endif
|
||||
//#define UP_PRINTER_STAGE_VER "Std"
|
||||
//#define UP_PRINTER_STAGE_VER "Beta"
|
||||
|
||||
+17
-11
@@ -706,12 +706,12 @@ bool MainWindow::updatePhaseIndicatorLight(){
|
||||
return sysPara->status.lastPhaseFault;
|
||||
}
|
||||
|
||||
int MainWindow::getMaxSpeedCalcPara(){
|
||||
double 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;
|
||||
@@ -724,9 +724,15 @@ int MainWindow::getMaxSpeedCalcPara(){
|
||||
|
||||
int dotNum = sysPara->para.divideRatio?(FPGA_SYS_HZ/(sysPara->para.divideRatio*2)):0;// 1s时间内墨点数 (即晶振频率 64000)
|
||||
int colNum = dotNumPerCol?dotNum/dotNumPerCol:0; // 第列可用墨点数 = 1s时间内墨点数/ 列需要墨点数
|
||||
int pulseNum = colNum*sysPara->para.synNumPerCol/(1<<8); //synNumPerCol是被放大后的值
|
||||
double pulseNum = colNum*sysPara->para.synNumPerCol/(1<<8); //synNumPerCol是被放大后的值
|
||||
|
||||
return pulseNum;
|
||||
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);
|
||||
}
|
||||
|
||||
static int reclaimTankDelay = 0;
|
||||
@@ -792,8 +798,8 @@ void MainWindow::updateSysStatusToUI(){ //100ms
|
||||
}
|
||||
else
|
||||
{
|
||||
int pulsePS = getMaxSpeedCalcPara();//No67
|
||||
maxMM = (pulsePS/sysPara->para.synPulseNumPerMm) * 60;// 列的最大间距
|
||||
double speed = getMaxSpeedCalcPara();//No67
|
||||
maxMM = int(speed * 1000.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')));
|
||||
@@ -846,8 +852,8 @@ void MainWindow::updateSysStatusToUI(){ //100ms
|
||||
emit readFPGAVersionReady();
|
||||
logflag5 = false;
|
||||
sysPara->devOp->writeFpgaPrintPara(true);
|
||||
QString ARM_Version;
|
||||
ARM_Version.sprintf("%d.%d.%02d%s%s", UP_PRINTER_MAJOR_VER, UP_PRINTER_MINOR_VER,UP_PRINTER_RIVISION_VER,SUB_VERSION,SUB_RFID);
|
||||
QString ARM_Version = SUB_RFID;
|
||||
// ARM_Version.sprintf("%d.%d.%02d%s%s", UP_PRINTER_MAJOR_VER, UP_PRINTER_MINOR_VER,UP_PRINTER_RIVISION_VER,SUB_VERSION,SUB_RFID);
|
||||
ui->labelFpgaVersionNum->setText(QString("A%1/F%2.%3.%4").arg(ARM_Version).arg(sysPara->status.fpgaVersionNum >> 12)
|
||||
.arg((sysPara->status.fpgaVersionNum>>8) & 0x0f).arg(sysPara->status.fpgaVersionNum&0xff) );
|
||||
}
|
||||
@@ -4621,8 +4627,8 @@ void MainWindow::UpdateUIVersion(){
|
||||
QString STM32Ver = QString("S:%1.%2.%3_B%4").arg((sysPara->status.stm32Verion>>16)&0x7F)
|
||||
.arg((sysPara->status.stm32Verion>>8) & 0xFF).arg(sysPara->status.stm32Verion&0xFF).arg(baudRateValue);
|
||||
|
||||
QString VernonBach;
|
||||
VernonBach.sprintf("A%d.%d.%02d%s%s", UP_PRINTER_MAJOR_VER, UP_PRINTER_MINOR_VER,UP_PRINTER_RIVISION_VER,SUB_VERSION,SUB_RFID);
|
||||
QString VernonBach = SUB_RFID;
|
||||
// VernonBach.sprintf("A%d.%d.%02d%s%s", UP_PRINTER_MAJOR_VER, UP_PRINTER_MINOR_VER,UP_PRINTER_RIVISION_VER,SUB_VERSION,SUB_RFID);
|
||||
|
||||
QString Mac = QString::number(sysPara->status.machineMac);
|
||||
LogInfo::showVerionInformation(Mac,VernonBach,fpgaVersion,STM32Ver,sysPara->status.flagOfPowerOnMode);
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@ public:
|
||||
void enableReclaimCtrlButton(bool enable);
|
||||
void resetReclaimCtrlButtonText();
|
||||
void enablePushButtonStart(bool enable);
|
||||
int getMaxSpeedCalcPara();
|
||||
double getMaxSpeedCalcPara();
|
||||
|
||||
void PreviewPressed();
|
||||
int getCurrPrintStatus();
|
||||
|
||||
+1
-1
@@ -301,7 +301,7 @@ QTabBar::tab:selected {background-color: rgb(255, 170, 127)}
|
||||
QTabBar::tab:!selected {margin-top: 5px;}</string>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>2</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab_3">
|
||||
<attribute name="title">
|
||||
|
||||
Reference in New Issue
Block a user