Merge branch 'main' of https://git.vernonbach.com/rd/VX5-DiaphragmPump-GeneralVersion
This commit is contained in:
@@ -3179,7 +3179,6 @@ void DevOp::writeCnt1GroupSetting(bool bCntByGroupEnable){
|
||||
{
|
||||
fpgaWr(WRITE_CNT1GROUP_COUNT,(unsigned char *)&sysPara->para.Cnt1ByGroup.cnt1GroupCnt,sizeof(sysPara->para.Cnt1ByGroup.cnt1GroupCnt));
|
||||
|
||||
qDebug() << "Groups of CNT1: " << sysPara->para.Cnt1ByGroup.cnt1GroupCnt;
|
||||
for(int i=0;i<sysPara->para.Cnt1ByGroup.cnt1GroupCnt;i++)
|
||||
{
|
||||
cnt1GroupSettingSend.cnt1GroupNum = (unsigned char)i;
|
||||
@@ -3225,7 +3224,6 @@ void DevOp::writeCnt2GroupSetting(bool bCntByGroupEnable)
|
||||
{
|
||||
fpgaWr(WRITE_CNT2GROUP_COUNT,(unsigned char *)&sysPara->para.Cnt2ByGroup.cnt2GroupCnt,sizeof(sysPara->para.Cnt2ByGroup.cnt2GroupCnt));
|
||||
|
||||
qDebug() << "sysPara->para.Cnt2ByGroup.cnt2GroupCnt: " << sysPara->para.Cnt2ByGroup.cnt2GroupCnt;
|
||||
for(int i=0;i<sysPara->para.Cnt2ByGroup.cnt2GroupCnt;i++)
|
||||
{
|
||||
cnt2GroupSettingSend.cnt2GroupNum = (unsigned char)i;
|
||||
|
||||
+5
-4
@@ -882,7 +882,7 @@ void InkJetPrinter::handleStoppedState(int err, bool canSwitch)
|
||||
void InkJetPrinter::handleStartingState(int err, int actual, int target)
|
||||
{
|
||||
const int STARTING_TO_RUNNING_RANGE = 30; // 进入目标±50范围转到运行状态
|
||||
const float MAX_WORKING_SPEED = 500.0f; // 最大工作转速
|
||||
const float MAX_WORKING_SPEED = 350.0f; // 最大工作转速
|
||||
const float START_SPEED_STEP_LARGE = 40.0f;
|
||||
const float START_SPEED_STEP_MED = 30.0f;
|
||||
const float START_SPEED_STEP_SMALL = 20.0f;
|
||||
@@ -1006,7 +1006,7 @@ void InkJetPrinter::handleRunningState(int err, bool canSwitch)
|
||||
|
||||
// 限制范围
|
||||
const float MIN_RUNNING_SPEED = 30.0f; // 最低运行转速(低于此值泵不转)
|
||||
const float MAX_WORKING_SPEED = 500.0f;
|
||||
const float MAX_WORKING_SPEED = 350.0f;
|
||||
|
||||
if(u < MIN_RUNNING_SPEED) u = MIN_RUNNING_SPEED;
|
||||
if(u > MAX_WORKING_SPEED) u = MAX_WORKING_SPEED;
|
||||
@@ -1705,9 +1705,10 @@ void InkJetPrinter::timerHandler(void){
|
||||
if(sysPara->status.RandomNum>0)
|
||||
sysPara->devOp->Read_RanddomFromFpga();
|
||||
#ifdef COUNTER1_BY_GROUP /* 分段计米 */
|
||||
cnt1GroupCheck();//分段计米
|
||||
#endif
|
||||
// cnt1GroupCheck();//分段计米
|
||||
cntGroupCheck();//分段计米
|
||||
#endif
|
||||
|
||||
|
||||
QWidget *widget = this->currentWidget();
|
||||
static bool read_flag = false;
|
||||
|
||||
+63
-68
@@ -139,9 +139,6 @@ PrintSetting::PrintSetting(QWidget *parent) :
|
||||
current_print_col_num=0;
|
||||
ui->tabWidget_2->addTab(ui->tab_11,tr("打印电压缩放"));
|
||||
|
||||
#ifdef COUNTER2_BY_GROUP
|
||||
ui->secionCountPanel->hide();
|
||||
#endif
|
||||
}
|
||||
|
||||
PrintSetting::~PrintSetting()
|
||||
@@ -197,7 +194,11 @@ void PrintSetting::bindSysPara(SysPara *sysPara){
|
||||
this->sysPara =sysPara;
|
||||
//ui->volDacEdit
|
||||
//ui->volDacEdit->bindSysPara(sysPara);
|
||||
if(sectionalWid) sectionalWid->bindSysPara(sysPara);
|
||||
#ifdef COUNTER2_BY_GROUP
|
||||
ui->secionCountPanel->hide();
|
||||
ui->tabWidget_2->addTab(ui->tab_9,tr("其他设置"));
|
||||
initSection();
|
||||
#endif
|
||||
}
|
||||
|
||||
void PrintSetting::PrintupdateSysParaToUI()
|
||||
@@ -383,26 +384,24 @@ void PrintSetting::updateSysParaToUI(){
|
||||
ModuleHideDisplay();
|
||||
displayForAdjustVoltage(sysPara->para.flagOfAdjustVoltage);
|
||||
|
||||
// todo
|
||||
LoadCnt1GroupSettingsToUI();
|
||||
#ifdef COUNTER2_BY_GROUP
|
||||
SectionalManager::instance()->emitLoadUI();
|
||||
#else
|
||||
LoadCnt1GroupSettingsToUI();
|
||||
#endif
|
||||
if(sysPara->para.mode0211 || sysPara->para.FullColFixVal)
|
||||
{
|
||||
ui->spinBoxStartVoltage->setEnabled(false);
|
||||
ui->spinBoxEndVoltage->setEnabled(false);
|
||||
}
|
||||
if(sysPara->para.flagOfCnt1GroupDisp)
|
||||
{
|
||||
//edit@12-03
|
||||
const int indexTab=ui->tabWidget_2->indexOf(ui->tab_9);
|
||||
if(-1==indexTab) {
|
||||
ui->tabWidget_2->addTab(ui->tab_9,tr("其他设置"));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
// if(sysPara->para.flagOfCnt1GroupDisp)
|
||||
// {
|
||||
// //edit@12-03
|
||||
// const int indexTab=ui->tabWidget_2->indexOf(ui->tab_9);
|
||||
// if(-1==indexTab) {
|
||||
// ui->tabWidget_2->addTab(ui->tab_9,tr("其他设置"));
|
||||
// }
|
||||
// }
|
||||
if(sysPara->para.flagOfstepPrint)
|
||||
{
|
||||
//edit@12-03
|
||||
@@ -423,8 +422,7 @@ void PrintSetting::showMachInfo(QString Mac)
|
||||
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=SUB_RFID;
|
||||
VernonBach.sprintf("%s.%s.", MACHINAE_VER, PUMP_VER);
|
||||
VernonBach = VernonBach + (QString) Public::DateToString(__DATE__)+"_";//+UP_PRINTER_STAGE_VER;
|
||||
}
|
||||
|
||||
@@ -480,7 +478,7 @@ void PrintSetting::applyUIPara(){
|
||||
sysPara->status.cnt1CurrentValueInitDoneFlag = !ui->checkBoxResetCnt1CurrValue->isChecked();
|
||||
sysPara->status.cnt2CurrentValueInitDoneFlag = !ui->checkBoxResetCnt2CurrValue->isChecked();
|
||||
sysPara->status.cnt3CurrentValueInitDoneFlag = !ui->checkBoxResetCnt3CurrValue->isChecked();
|
||||
//将vx4的分段计米功能迁移了,这个应用设置以及界面后续会删除 hlp todo 0602
|
||||
//将vx4的分段计米功能迁移了,这个应用设置后续会删除 hlp todo 0602
|
||||
#ifndef COUNTER2_BY_GROUP
|
||||
if(sysPara->para.cnt1ByGroupEnalbe)
|
||||
ApplyCnt1GroupSetting();
|
||||
@@ -665,19 +663,6 @@ void PrintSetting::applyUIPara(){
|
||||
ui->checkBoxResetCnt3CurrValue->setChecked(false);
|
||||
|
||||
emit checkPrintIntervalSignal();
|
||||
// if(sysPara->para.EditMode==SCENE)
|
||||
// {
|
||||
// QList<QGraphicsItem *> items = pGetPicScene->selectedItems();
|
||||
// if(items.size() > 0)
|
||||
// {
|
||||
// PicTextItem* picText = qgraphicsitem_cast<PicTextItem*>(items.at(0));
|
||||
// picText->CatchCnt1StartValue = ui->lineEditStartValue->text().toInt();
|
||||
// picText->CatchCnt1CurrValue = ui->lineEditCountValue->text().toInt();
|
||||
// picText->SpecialConditions = ui->radioButtonSpecialCondition->isChecked();
|
||||
// pGetPicScene->clearSelection();
|
||||
// //emit SwitchTimerShowItem(true);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
@@ -842,11 +827,11 @@ void PrintSetting::ondialogAuthorizationAccepted(){
|
||||
ModuleDecimalDisplay();
|
||||
ModuleHideDisplay();
|
||||
displayForAdjustVoltage(sysPara->para.flagOfAdjustVoltage);
|
||||
const int indexTab1=ui->tabWidget_2->indexOf(ui->tab_9);
|
||||
if(sysPara->para.flagOfCnt1GroupDisp)
|
||||
ui->tabWidget_2->addTab(ui->tab_9,tr("其他设置"));
|
||||
else
|
||||
ui->tabWidget_2->removeTab(indexTab1);
|
||||
// const int indexTab1=ui->tabWidget_2->indexOf(ui->tab_9);
|
||||
// if(sysPara->para.flagOfCnt1GroupDisp)
|
||||
// ui->tabWidget_2->addTab(ui->tab_9,tr("其他设置"));
|
||||
// else
|
||||
// ui->tabWidget_2->removeTab(indexTab1);
|
||||
const int indexTab2=ui->tabWidget->indexOf(ui->tab_6);
|
||||
if(sysPara->para.flagOfstepPrint)
|
||||
ui->tabWidget->addTab(ui->tab_6,tr("跳米设置"));
|
||||
@@ -867,11 +852,11 @@ void PrintSetting::ondialogAuthorizationAccepted(){
|
||||
ModuleDecimalDisplay();
|
||||
ModuleHideDisplay();
|
||||
displayForAdjustVoltage(sysPara->para.flagOfAdjustVoltage);
|
||||
const int indexTab1=ui->tabWidget_2->indexOf(ui->tab_9);
|
||||
if(sysPara->para.flagOfCnt1GroupDisp)
|
||||
ui->tabWidget_2->addTab(ui->tab_9,tr("其他设置"));
|
||||
else
|
||||
ui->tabWidget_2->removeTab(indexTab1);
|
||||
// const int indexTab1=ui->tabWidget_2->indexOf(ui->tab_9);
|
||||
// if(sysPara->para.flagOfCnt1GroupDisp)
|
||||
// ui->tabWidget_2->addTab(ui->tab_9,tr("其他设置"));
|
||||
// else
|
||||
// ui->tabWidget_2->removeTab(indexTab1);
|
||||
const int indexTab2=ui->tabWidget->indexOf(ui->tab_6);
|
||||
if(sysPara->para.flagOfstepPrint)
|
||||
ui->tabWidget->addTab(ui->tab_6,tr("跳米设置"));
|
||||
@@ -926,11 +911,11 @@ void PrintSetting::ondialogAuthorizationAccepted(){
|
||||
sysPara->para.flagOfCnt1GroupDisp = true;
|
||||
else
|
||||
sysPara->para.flagOfCnt1GroupDisp = false;
|
||||
const int indexTab1=ui->tabWidget_2->indexOf(ui->tab_9);
|
||||
if(sysPara->para.flagOfCnt1GroupDisp)
|
||||
ui->tabWidget_2->addTab(ui->tab_9,tr("其他设置"));
|
||||
else
|
||||
ui->tabWidget_2->removeTab(indexTab1);
|
||||
// const int indexTab1=ui->tabWidget_2->indexOf(ui->tab_9);
|
||||
// if(sysPara->para.flagOfCnt1GroupDisp)
|
||||
// ui->tabWidget_2->addTab(ui->tab_9,tr("其他设置"));
|
||||
// else
|
||||
// ui->tabWidget_2->removeTab(indexTab1);
|
||||
|
||||
if (type & 1<<3)
|
||||
sysPara->para.flagOfstepPrint = true;
|
||||
@@ -968,11 +953,11 @@ void PrintSetting::ondialogAuthorizationAccepted(){
|
||||
//edit@11-29 输入密码显示,再次输入隐藏
|
||||
else if(authString == "07710441"){
|
||||
//edit@12-03
|
||||
const int indexTab=ui->tabWidget_2->indexOf(ui->tab_9);
|
||||
if(sysPara->para.flagOfCnt1GroupDisp)
|
||||
ui->tabWidget_2->removeTab(indexTab);
|
||||
else
|
||||
ui->tabWidget_2->addTab(ui->tab_9,tr("其他设置"));
|
||||
// const int indexTab=ui->tabWidget_2->indexOf(ui->tab_9);
|
||||
// if(sysPara->para.flagOfCnt1GroupDisp)
|
||||
// ui->tabWidget_2->removeTab(indexTab);
|
||||
// else
|
||||
// ui->tabWidget_2->addTab(ui->tab_9,tr("其他设置"));
|
||||
sysPara->para.flagOfCnt1GroupDisp=!sysPara->para.flagOfCnt1GroupDisp;
|
||||
|
||||
}
|
||||
@@ -1066,7 +1051,9 @@ void PrintSetting::SpecailSettingsDisplay()
|
||||
{
|
||||
if(flagOfSpecailSettng)
|
||||
{
|
||||
ui->tabWidget_2->addTab(ui->tab_11,tr("打印电压缩放"));
|
||||
const int indexTab=ui->tabWidget_2->indexOf(ui->tab_11);
|
||||
if (indexTab == -1)
|
||||
ui->tabWidget_2->addTab(ui->tab_11,tr("打印电压缩放"));
|
||||
ui->comboBoxIndustry->setVisible(1);
|
||||
ui->checkBoxNewAmplifyPlate->setVisible(1);
|
||||
// ui->labelRecommendedPrintSpeed->setVisible(1);
|
||||
@@ -1081,8 +1068,8 @@ void PrintSetting::SpecailSettingsDisplay()
|
||||
{
|
||||
if(flagOfEngineeringMode)
|
||||
ui->tabWidget_2->removeTab(5);
|
||||
else
|
||||
ui->tabWidget_2->removeTab(4);
|
||||
// else
|
||||
// ui->tabWidget_2->removeTab(4);
|
||||
ui->comboBoxIndustry->hide();
|
||||
ui->checkBoxNewAmplifyPlate->hide();
|
||||
// ui->labelRecommendedPrintSpeed->hide();
|
||||
@@ -1099,14 +1086,17 @@ void PrintSetting::EngineeringModeDisplay()
|
||||
{
|
||||
if(flagOfEngineeringMode)
|
||||
{
|
||||
#ifdef COUNTER2_BY_GROUP
|
||||
ui->tabWidget_2->addTab(ui->tab_9,tr("其他设置"));
|
||||
// hlp test todo
|
||||
#ifdef COUNTER2_BY_GROUP /* 分段计米 */
|
||||
// 初始化先于bindSysPara
|
||||
initSection();
|
||||
#endif
|
||||
if(flagOfSpecailSettng)
|
||||
ui->tabWidget_2->addTab(ui->tab_11,tr("打印电压缩放"));
|
||||
ui->tabWidget_2->addTab(sectionalWid, tr("分段计数"));
|
||||
#endif
|
||||
|
||||
if(flagOfSpecailSettng) {
|
||||
const int indexTab=ui->tabWidget_2->indexOf(ui->tab_11);
|
||||
if (indexTab == -1)
|
||||
ui->tabWidget_2->addTab(ui->tab_11,tr("打印电压缩放"));
|
||||
}
|
||||
|
||||
ui->tabWidget->addTab(ui->tab_8,tr("计数器3设置"));
|
||||
ui->tabWidget->addTab(ui->tab_6,tr("跳米设置"));
|
||||
ui->checkBoxSpeedOver->setVisible(1);
|
||||
@@ -1134,11 +1124,13 @@ void PrintSetting::EngineeringModeDisplay()
|
||||
if(flagOfSpecailSettng)
|
||||
{
|
||||
ui->tabWidget_2->removeTab(5);
|
||||
ui->tabWidget_2->removeTab(4);
|
||||
ui->tabWidget_2->addTab(ui->tab_11,tr("打印电压缩放"));
|
||||
const int indexTab=ui->tabWidget_2->indexOf(ui->tab_11);
|
||||
if (indexTab == -1)
|
||||
ui->tabWidget_2->addTab(ui->tab_11,tr("打印电压缩放"));
|
||||
} else {
|
||||
// ui->tabWidget_2->removeTab(4);
|
||||
}
|
||||
else
|
||||
ui->tabWidget_2->removeTab(4);
|
||||
|
||||
ui->tabWidget->removeTab(3);
|
||||
ui->tabWidget->removeTab(2);
|
||||
ui->checkBoxSpeedOver->hide();
|
||||
@@ -1491,6 +1483,7 @@ void PrintSetting::ApplyCnt1GroupSetting()
|
||||
updateCnt1GroupsTblWgt();
|
||||
#endif
|
||||
}
|
||||
|
||||
void PrintSetting::rowWidgetCreate(int rowIndex)
|
||||
{
|
||||
#ifdef COUNTER1_BY_GROUP /* 分段计米 */
|
||||
@@ -2308,8 +2301,10 @@ void PrintSetting::initSection()
|
||||
ui->tabWidget_2->addTab(sectionalWid, tr("分段计数"));
|
||||
connect(SectionalManager::instance(), &SectionalManager::sig_updateCntShow,
|
||||
this, &PrintSetting::slt_updateCntShow);
|
||||
SectionalManager::instance()->emitLoadUI();
|
||||
}
|
||||
// SectionalManager::instance()->emitLoadUI();
|
||||
} /*else {
|
||||
ui->tabWidget_2->addTab(sectionalWid, tr("分段计数"));
|
||||
}*/
|
||||
}
|
||||
|
||||
int tempReclaimTankStatus = 0;
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -25,6 +25,11 @@ void SectionalManager::emitLoadUI()
|
||||
emit sig_loadSettings2UI();
|
||||
}
|
||||
|
||||
void SectionalManager::emitCancelSection()
|
||||
{
|
||||
emit sig_cancelSection();
|
||||
}
|
||||
|
||||
SectionalManager::SectionalManager()
|
||||
{
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@ public:
|
||||
//应用配置
|
||||
void emitLoadUI();
|
||||
|
||||
// 取消分段计米
|
||||
void emitCancelSection();
|
||||
private:
|
||||
SectionalManager();
|
||||
|
||||
@@ -33,7 +35,7 @@ signals:
|
||||
void sig_applySetting();
|
||||
void sig_loadSettings2UI();
|
||||
void sig_updateCntGroupDisp(bool);
|
||||
|
||||
void sig_cancelSection();
|
||||
};
|
||||
|
||||
#endif // SECTIONALMANAGER_H
|
||||
|
||||
@@ -18,6 +18,8 @@ SectionalWid::SectionalWid(QWidget *parent) :
|
||||
this, &SectionalWid::slt_loadSettings2UI);
|
||||
connect(SectionalManager::instance(), &SectionalManager::sig_updateCntGroupDisp,
|
||||
this, &SectionalWid::slt_updateCntGroupDisp);
|
||||
connect(SectionalManager::instance(), &SectionalManager::sig_cancelSection,
|
||||
this, &SectionalWid::slt_cancelSection);
|
||||
}
|
||||
|
||||
SectionalWid::~SectionalWid()
|
||||
@@ -152,7 +154,7 @@ void SectionalWid::on_cnt3RemoveAllRowsBtn_3_clicked()
|
||||
void SectionalWid::on_checkBoxGroupCnt1_clicked(bool checked)
|
||||
{
|
||||
// 信号修改计数器的显示
|
||||
ui->checkBoxGroupCnt_2->setChecked(checked);
|
||||
// ui->checkBoxGroupCnt_2->setChecked(checked);
|
||||
SectionalManager::instance()->emitUpdateCntShow(checked);
|
||||
}
|
||||
|
||||
@@ -234,27 +236,30 @@ void SectionalWid::rowWidgetCreate2(int rowIndex)
|
||||
|
||||
void SectionalWid::LoadCnt2GroupSettingsToUI()
|
||||
{
|
||||
ui->checkBoxGroupCnt_2->setChecked(sysPara->para.cnt2ByGroupEnalbe);
|
||||
// 两个同时启用,这个cb设true就会都取消
|
||||
// ui->checkBoxGroupCnt_2->setChecked(sysPara->para.cnt2ByGroupEnalbe);
|
||||
on_checkBoxGroupCnt_2_clicked(sysPara->para.cnt2ByGroupEnalbe);
|
||||
//qDebug()<<"LoadCnt1GroupSettingsToUI:cnt1GroupCnt "<<sysPara->para.Cnt1ByGroup.cnt1GroupCnt;
|
||||
ui->tableWidget_2->setRowCount(sysPara->para.Cnt2ByGroup.cnt2GroupCnt);
|
||||
for(int i=0; i<sysPara->para.Cnt2ByGroup.cnt2GroupCnt; i++)
|
||||
{
|
||||
QSpinBox *spinBox = new QSpinBox();
|
||||
spinBox->setButtonSymbols(QSpinBox::NoButtons);
|
||||
spinBox->setValue(sysPara->para.Cnt2ByGroup.cnt2GroupSettings[i].StartValue);
|
||||
int startV = sysPara->para.Cnt2ByGroup.cnt2GroupSettings[i].StartValue;
|
||||
spinBox->setValue(startV);
|
||||
spinBox->setRange(0, INT_MAX);
|
||||
ui->tableWidget_2->setCellWidget(i,0,spinBox);
|
||||
|
||||
spinBox = new QSpinBox();
|
||||
spinBox->setButtonSymbols(QSpinBox::NoButtons);
|
||||
spinBox->setValue(sysPara->para.Cnt2ByGroup.cnt2GroupSettings[i].EndValue);
|
||||
int endV = sysPara->para.Cnt2ByGroup.cnt2GroupSettings[i].EndValue;
|
||||
spinBox->setValue(endV);
|
||||
spinBox->setRange(0, INT_MAX);
|
||||
ui->tableWidget_2->setCellWidget(i,1,spinBox);
|
||||
|
||||
spinBox = new QSpinBox();
|
||||
spinBox->setButtonSymbols(QSpinBox::NoButtons);
|
||||
spinBox->setValue(sysPara->para.Cnt2ByGroup.cnt2GroupSettings[i].LoopTimes);
|
||||
int loopV = sysPara->para.Cnt2ByGroup.cnt2GroupSettings[i].LoopTimes;
|
||||
spinBox->setValue(loopV);
|
||||
spinBox->setRange(1, INT_MAX);
|
||||
ui->tableWidget_2->setCellWidget(i,2,spinBox);
|
||||
}
|
||||
@@ -265,7 +270,7 @@ void SectionalWid::LoadCnt2GroupSettingsToUI()
|
||||
void SectionalWid::on_checkBoxGroupCnt_2_clicked(bool checked)
|
||||
{
|
||||
// 信号修改计数器的显示
|
||||
ui->checkBoxGroupCnt1->setChecked(checked);
|
||||
// ui->checkBoxGroupCnt1->setChecked(checked);
|
||||
SectionalManager::instance()->emitUpdateCntShow(checked);
|
||||
}
|
||||
|
||||
@@ -306,7 +311,8 @@ void SectionalWid::ApplyCnt2GroupSetting()
|
||||
{
|
||||
QSpinBox *spinBox = nullptr;
|
||||
sysPara->para.cnt2ByGroupEnalbe = ui->checkBoxGroupCnt_2->isChecked();
|
||||
sysPara->para.Cnt2ByGroup.cnt2GroupCnt=ui->tableWidget_2->rowCount();
|
||||
sysPara->para.Cnt2ByGroup.cnt2GroupCnt = ui->tableWidget_2->rowCount();
|
||||
int r = ui->tableWidget_2->rowCount();
|
||||
if(sysPara->para.cnt2ByGroupEnalbe && sysPara->para.Cnt2ByGroup.cnt2GroupCnt==0)
|
||||
{
|
||||
sysPara->para.cnt2ByGroupEnalbe=false;
|
||||
@@ -547,6 +553,12 @@ void SectionalWid::slt_updateCntGroupDisp(bool bChangeToNext)
|
||||
}
|
||||
}
|
||||
|
||||
void SectionalWid::slt_cancelSection()
|
||||
{
|
||||
ui->checkBoxGroupCnt1->setChecked(false);
|
||||
ui->checkBoxGroupCnt_2->setChecked(false);
|
||||
}
|
||||
|
||||
void SectionalWid::initUI()
|
||||
{
|
||||
#ifdef COUNTER1_BY_GROUP /* 分段计米 */
|
||||
|
||||
@@ -64,7 +64,7 @@ private slots:
|
||||
void slt_applySetting();
|
||||
void slt_loadSettings2UI();
|
||||
void slt_updateCntGroupDisp(bool bChangeToNext);
|
||||
|
||||
void slt_cancelSection();
|
||||
private:
|
||||
Ui::SectionalWid *ui;
|
||||
SysPara* sysPara = nullptr;
|
||||
|
||||
+6
-4
@@ -2,7 +2,7 @@
|
||||
#include "ui_texteditoption.h"
|
||||
#include "PicWidget.h"
|
||||
#include "scene/picscene.h"
|
||||
|
||||
#include "SectionalCounting/sectionalmanager.h"
|
||||
#include <QFileDialog>
|
||||
#include <QDebug>
|
||||
#include <QInputDialog>
|
||||
@@ -645,10 +645,13 @@ bool TextEditOption::maybeSave(){
|
||||
on_bottonSave_clicked();
|
||||
return false;
|
||||
} else if (msgBox.clickedButton() == cancleSaveButton) {
|
||||
SectionalManager::instance()->emitCancelSection();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -663,13 +666,12 @@ void TextEditOption::on_bottonNew_pressed()
|
||||
textEdit->clear();
|
||||
fileName = "";
|
||||
sysPara->sysFile = "";
|
||||
QFile file(fileName);
|
||||
QFile file(fileName);
|
||||
emit fileNameChanged(QFileInfo(fileName).fileName());
|
||||
}
|
||||
#ifdef VARCOLOR
|
||||
textEdit->insertHtml(QString("<span style='background:#ffffff;color=#000000;'> <span />"));
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void TextEditOption::onOpenNewFile()
|
||||
|
||||
+8
-4
@@ -840,7 +840,10 @@ void MainWindow::updateSysStatusToUI(){ //100ms
|
||||
sysPara->devOp->readbuilDat();
|
||||
}
|
||||
firstGetFpgaVersionNumFlag=1;
|
||||
ui->labelFpgaVersionNum->setText(QString("%1/F%2.%3.%4").arg(SOFTWARE_VER_NUM).arg(0).arg(0).arg(0) );
|
||||
QString ARM_Version;
|
||||
ARM_Version.sprintf("%s.%s.", MACHINAE_VER, PUMP_VER);
|
||||
ARM_Version = ARM_Version + (QString) Public::DateToString(__DATE__)+"."+SUB_VER+SUB_RFID;
|
||||
ui->labelFpgaVersionNum->setText(QString("%1/F%2.%3.%4").arg(ARM_Version).arg(0).arg(0).arg(0) );
|
||||
}
|
||||
else{
|
||||
static bool logflag5 = true;
|
||||
@@ -852,9 +855,10 @@ void MainWindow::updateSysStatusToUI(){ //100ms
|
||||
emit readFPGAVersionReady();
|
||||
logflag5 = false;
|
||||
sysPara->devOp->writeFpgaPrintPara(true);
|
||||
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)
|
||||
QString ARM_Version;
|
||||
ARM_Version.sprintf("%s.%s.", MACHINAE_VER, PUMP_VER);
|
||||
ARM_Version = ARM_Version + (QString) Public::DateToString(__DATE__)+"."+SUB_VER+SUB_RFID;
|
||||
ui->labelFpgaVersionNum->setText(QString("%1/F%2.%3.%4").arg(ARM_Version).arg(sysPara->status.fpgaVersionNum >> 12)
|
||||
.arg((sysPara->status.fpgaVersionNum>>8) & 0x0f).arg(sysPara->status.fpgaVersionNum&0xff) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
#define SYS_ROOT_DIR "/home/plg/"
|
||||
#include "qnamespace.h"
|
||||
|
||||
#define SOFTWARE_VER_NUM "A3.09"
|
||||
|
||||
#define MYSAVEFILEDLG // 定义自己的保存文件对话框,解决系统对话框按键不弹起问题
|
||||
#define LANINTERFACE_NAME "eth0"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user