diff --git a/InkJetPrinter.cpp b/InkJetPrinter.cpp
index 4e12134..d81b67e 100644
--- a/InkJetPrinter.cpp
+++ b/InkJetPrinter.cpp
@@ -284,6 +284,7 @@ void InkJetPrinter::init()
connect(m_SystemUpdate,&SystemUpdate::sendUpDateSOFTSignal,m_SystemManage,&SystemManage::on_pushButtonUpdateSoftware_pressed);
connect(m_SystemUpdate,&SystemUpdate::sendUpDateChARLIBSignal,m_SystemManage,&SystemManage::on_pushButtonUpdateCharLib_pressed);
connect(m_SystemUpdate,&SystemUpdate::sendButtonClickedSignal,this,&InkJetPrinter::getSystemManageWidgetButtonClickSlot);
+ connect(m_SystemUpdate,&SystemUpdate::sig_reboot,this,&InkJetPrinter::rebootApp);
// 原注释的默认页面设置(按需启用)
diff --git a/MainWidget.ui b/MainWidget.ui
index 6885835..dc83fe6 100644
--- a/MainWidget.ui
+++ b/MainWidget.ui
@@ -217,7 +217,7 @@ QScrollBar::add-line:horizontal { bottom: 0px; }
0
0
780
- 177
+ 169
@@ -583,9 +583,15 @@ QScrollBar::add-line:horizontal { bottom: 0px; }
-
+
+
+ 200
+ 0
+
+
- 180
+ 200
140
diff --git a/SystemSetting.cpp b/SystemSetting.cpp
index f849f53..0d05686 100644
--- a/SystemSetting.cpp
+++ b/SystemSetting.cpp
@@ -11,7 +11,6 @@
//#include "LogInfo.h"
#include "myinclude.h"
#include "QInputDialog"
-#include "dlgmutilanguage.h"
//#define FINDVOL
#include "InputMethod.h"
diff --git a/SystemUpdate.cpp b/SystemUpdate.cpp
index d37fbf1..686cbaa 100644
--- a/SystemUpdate.cpp
+++ b/SystemUpdate.cpp
@@ -14,6 +14,8 @@ SystemUpdate::SystemUpdate(QWidget *parent) :
connect(ui->closeBtn, &QPushButton::clicked, this, &SystemUpdate::on_closeBtn_clicked);
applyStyleSheet();
+
+ connect(&dlgLanguage, &DlgMutiLanguage::sig_reboot, this, &SystemUpdate::sig_reboot);
}
SystemUpdate::~SystemUpdate()
diff --git a/SystemUpdate.h b/SystemUpdate.h
index 0686623..4ace7cb 100644
--- a/SystemUpdate.h
+++ b/SystemUpdate.h
@@ -36,6 +36,7 @@ signals:
void sendUpDateSOFTSignal();
void sendUpDateChARLIBSignal();
+ void sig_reboot();
private slots:
void on_pushButtonProgramFPGA_clicked();
void on_pushButtonProgramStm32_clicked();
diff --git a/VerBVersion.h b/VerBVersion.h
index 720081f..3abbb29 100644
--- a/VerBVersion.h
+++ b/VerBVersion.h
@@ -6,8 +6,8 @@
*/
#define UP_PRINTER_MAJOR_VER 6
#define UP_PRINTER_MINOR_VER 6
-#define UP_PRINTER_RIVISION_VER 1
-#define SUB_VERSION "_test"
+#define UP_PRINTER_RIVISION_VER 3
+#define SUB_VERSION "_beta"
#ifdef __RFID_OLD
#define SUB_RFID "_RO"
#else
diff --git a/dlgmutilanguage.cpp b/dlgmutilanguage.cpp
index 34f29f5..b32605e 100644
--- a/dlgmutilanguage.cpp
+++ b/dlgmutilanguage.cpp
@@ -130,11 +130,7 @@ void DlgMutiLanguage::SetNewLanguage()
QMessageBox::information(this, tr("提示"),tr("是否重启?"),
QMessageBox::Ok | QMessageBox::Cancel);
if (ret == QMessageBox::Ok) {
- sysPara->saveParaToFile(); // 关机前将相关配置保存
- sysPara->saveRFIDPara();
- mySleep(200);
- system("sync");//缓存同步
- QCoreApplication::quit();
+ emit sig_reboot();
}
}
diff --git a/dlgmutilanguage.h b/dlgmutilanguage.h
index a36ceef..735a594 100644
--- a/dlgmutilanguage.h
+++ b/dlgmutilanguage.h
@@ -30,6 +30,9 @@ private:
SysPara* sysPara = nullptr;
void mySleep(unsigned int msec);
+
+signals:
+ void sig_reboot();
};
#endif // DLGMUTILANGUAGE_H
diff --git a/mainwidget.cpp b/mainwidget.cpp
index b4f91e5..f726f6a 100644
--- a/mainwidget.cpp
+++ b/mainwidget.cpp
@@ -1933,7 +1933,7 @@ void MainWidget::initSheet()
QString startBtnSheet = R"(
QPushButton {
background-color: #1e8449;
- color: black;
+ color: #99A89B;
border-radius: 5px;
}
QPushButton:disabled {
@@ -1947,8 +1947,8 @@ void MainWidget::initSheet()
QString stopBtnSheet = R"(
QPushButton {
- background-color: #e74c3c;
- color: black;
+ background-color: #D5614E;
+ color: #99A89B;
border-radius: 5px;
}
QPushButton:disabled {
@@ -1987,12 +1987,13 @@ void MainWidget::changeHighLight(bool isStart)
QString highlightStyle =
R"(
QPushButton {
- background-color: #27ae60;
+ background-color: #29B561;
color: black;
border-radius: 5px;
border: 3px solid #f39c12;
box-shadow: 0 0 8px rgba(231, 76, 60, 0.6);
}
+
QPushButton:disabled {
background-color: #bdc3c7; /* 灰色背景 */
color: #7f8c8d; /* 灰色文字 */
@@ -2006,7 +2007,7 @@ void MainWidget::changeHighLight(bool isStart)
QString highlightStyle =
R"(
QPushButton {
- background-color: #f07167;
+ background-color: #e55f5f;
color: black;
border-radius: 5px;
border: 3px solid #f39c12;
@@ -2351,14 +2352,13 @@ void MainWidget::updateSysStatusToUI(){ //100ms
// ui->pushButton_Reboot->setEnabled(false);
}
- // if(sysPara->RFIDPara.inkCardTimeOut || sysPara->RFIDPara.solventCardTimeOut || sysPara->RFIDPara.needMaintenance)
- // m_RightBtn->setEnabled(false); todo
- // else if(sysPara->status.selfCheckDone == 1)
- // {
- // m_RightBtn->setEnabled(true);
- // }
+ if(sysPara->RFIDPara.inkCardTimeOut || sysPara->RFIDPara.solventCardTimeOut || sysPara->RFIDPara.needMaintenance) {
+ m_RightBtn->setEnabled(false);
+ }
+ else if(sysPara->status.selfCheckDone == 1) {
+ m_RightBtn->setEnabled(true);
+ }
}
-
}
bool MainWidget::checkRed(AlarmStatus &status)
diff --git a/oldProject/0/image/digitalWidth1.bmp b/oldProject/0/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/0/image/digitalWidth1.bmp differ
diff --git a/oldProject/0/image/digitalWidth175.bmp b/oldProject/0/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/0/image/digitalWidth175.bmp differ
diff --git a/oldProject/0/image/digitalWidth2.bmp b/oldProject/0/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/0/image/digitalWidth2.bmp differ
diff --git a/oldProject/0/image/digitalWidth275.bmp b/oldProject/0/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/0/image/digitalWidth275.bmp differ
diff --git a/oldProject/0/image/digitalWidth3.bmp b/oldProject/0/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/0/image/digitalWidth3.bmp differ
diff --git a/oldProject/0/image/digitalWidth375.bmp b/oldProject/0/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/0/image/digitalWidth375.bmp differ
diff --git a/oldProject/0/image/digitalWidth4.bmp b/oldProject/0/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/0/image/digitalWidth4.bmp differ
diff --git a/oldProject/0/image/digitalWidth475.bmp b/oldProject/0/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/0/image/digitalWidth475.bmp differ
diff --git a/oldProject/0/image/digitalWidth5.bmp b/oldProject/0/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/0/image/digitalWidth5.bmp differ
diff --git a/oldProject/0/image/digitalWidth575.bmp b/oldProject/0/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/0/image/digitalWidth575.bmp differ
diff --git a/oldProject/0/image/digitalWidth6.bmp b/oldProject/0/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/0/image/digitalWidth6.bmp differ
diff --git a/oldProject/0/image/digitalWidth675.bmp b/oldProject/0/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/0/image/digitalWidth675.bmp differ
diff --git a/oldProject/0/image/digitalWidth7.bmp b/oldProject/0/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/0/image/digitalWidth7.bmp differ
diff --git a/oldProject/0/image/digitalWidth775.bmp b/oldProject/0/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/0/image/digitalWidth775.bmp differ
diff --git a/oldProject/0/image/digitalWidth8.bmp b/oldProject/0/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/0/image/digitalWidth8.bmp differ
diff --git a/oldProject/0/image/digitalWidth875.bmp b/oldProject/0/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/0/image/digitalWidth875.bmp differ
diff --git a/oldProject/1/image/digitalWidth1.bmp b/oldProject/1/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/1/image/digitalWidth1.bmp differ
diff --git a/oldProject/1/image/digitalWidth175.bmp b/oldProject/1/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/1/image/digitalWidth175.bmp differ
diff --git a/oldProject/1/image/digitalWidth2.bmp b/oldProject/1/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/1/image/digitalWidth2.bmp differ
diff --git a/oldProject/1/image/digitalWidth275.bmp b/oldProject/1/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/1/image/digitalWidth275.bmp differ
diff --git a/oldProject/1/image/digitalWidth3.bmp b/oldProject/1/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/1/image/digitalWidth3.bmp differ
diff --git a/oldProject/1/image/digitalWidth375.bmp b/oldProject/1/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/1/image/digitalWidth375.bmp differ
diff --git a/oldProject/1/image/digitalWidth4.bmp b/oldProject/1/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/1/image/digitalWidth4.bmp differ
diff --git a/oldProject/1/image/digitalWidth475.bmp b/oldProject/1/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/1/image/digitalWidth475.bmp differ
diff --git a/oldProject/1/image/digitalWidth5.bmp b/oldProject/1/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/1/image/digitalWidth5.bmp differ
diff --git a/oldProject/1/image/digitalWidth575.bmp b/oldProject/1/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/1/image/digitalWidth575.bmp differ
diff --git a/oldProject/1/image/digitalWidth6.bmp b/oldProject/1/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/1/image/digitalWidth6.bmp differ
diff --git a/oldProject/1/image/digitalWidth675.bmp b/oldProject/1/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/1/image/digitalWidth675.bmp differ
diff --git a/oldProject/1/image/digitalWidth7.bmp b/oldProject/1/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/1/image/digitalWidth7.bmp differ
diff --git a/oldProject/1/image/digitalWidth775.bmp b/oldProject/1/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/1/image/digitalWidth775.bmp differ
diff --git a/oldProject/1/image/digitalWidth8.bmp b/oldProject/1/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/1/image/digitalWidth8.bmp differ
diff --git a/oldProject/1/image/digitalWidth875.bmp b/oldProject/1/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/1/image/digitalWidth875.bmp differ
diff --git a/oldProject/10/image/QRV21.bmp b/oldProject/10/image/QRV21.bmp
new file mode 100644
index 0000000..b576bf6
Binary files /dev/null and b/oldProject/10/image/QRV21.bmp differ
diff --git a/oldProject/10/image/QRV25.bmp b/oldProject/10/image/QRV25.bmp
new file mode 100644
index 0000000..505f4a6
Binary files /dev/null and b/oldProject/10/image/QRV25.bmp differ
diff --git a/oldProject/10/image/QRV25X21.bmp b/oldProject/10/image/QRV25X21.bmp
new file mode 100644
index 0000000..54da2a7
Binary files /dev/null and b/oldProject/10/image/QRV25X21.bmp differ
diff --git a/oldProject/10/image/QRV29.bmp b/oldProject/10/image/QRV29.bmp
new file mode 100644
index 0000000..2c9295a
Binary files /dev/null and b/oldProject/10/image/QRV29.bmp differ
diff --git a/oldProject/10/image/QRV33.bmp b/oldProject/10/image/QRV33.bmp
new file mode 100644
index 0000000..ecf6ded
Binary files /dev/null and b/oldProject/10/image/QRV33.bmp differ
diff --git a/oldProject/10/image/QRV37.bmp b/oldProject/10/image/QRV37.bmp
new file mode 100644
index 0000000..8082eb3
Binary files /dev/null and b/oldProject/10/image/QRV37.bmp differ
diff --git a/oldProject/100/EXPIRYXX.xcf b/oldProject/100/EXPIRYXX.xcf
new file mode 100644
index 0000000..a1674a6
Binary files /dev/null and b/oldProject/100/EXPIRYXX.xcf differ
diff --git a/oldProject/100/digitalWidth4.bmp b/oldProject/100/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/100/digitalWidth4.bmp differ
diff --git a/oldProject/100/expiryDate8.bmp b/oldProject/100/expiryDate8.bmp
new file mode 100644
index 0000000..6072a3f
Binary files /dev/null and b/oldProject/100/expiryDate8.bmp differ
diff --git a/oldProject/100/image/digitalWidth1.bmp b/oldProject/100/image/digitalWidth1.bmp
new file mode 100644
index 0000000..9b0bef1
Binary files /dev/null and b/oldProject/100/image/digitalWidth1.bmp differ
diff --git a/oldProject/100/image/digitalWidth175.bmp b/oldProject/100/image/digitalWidth175.bmp
new file mode 100644
index 0000000..9b0bef1
Binary files /dev/null and b/oldProject/100/image/digitalWidth175.bmp differ
diff --git a/oldProject/100/image/digitalWidth8 (____).bmp b/oldProject/100/image/digitalWidth8 (____).bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/100/image/digitalWidth8 (____).bmp differ
diff --git a/oldProject/100/image/digitalWidth8.bmp b/oldProject/100/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/100/image/digitalWidth8.bmp differ
diff --git a/oldProject/100/image/digitalWidth8.xcf b/oldProject/100/image/digitalWidth8.xcf
new file mode 100644
index 0000000..4165c8c
Binary files /dev/null and b/oldProject/100/image/digitalWidth8.xcf differ
diff --git a/oldProject/100/image/digitalWidth88.bmp b/oldProject/100/image/digitalWidth88.bmp
new file mode 100644
index 0000000..e806c6c
Binary files /dev/null and b/oldProject/100/image/digitalWidth88.bmp differ
diff --git a/oldProject/100/image/expiryDate8.bmp b/oldProject/100/image/expiryDate8.bmp
new file mode 100644
index 0000000..58e7d4e
Binary files /dev/null and b/oldProject/100/image/expiryDate8.bmp differ
diff --git a/oldProject/100/image/expiryDate875.bmp b/oldProject/100/image/expiryDate875.bmp
new file mode 100644
index 0000000..58e7d4e
Binary files /dev/null and b/oldProject/100/image/expiryDate875.bmp differ
diff --git a/oldProject/100/image/expiryDate875_backup.bmp b/oldProject/100/image/expiryDate875_backup.bmp
new file mode 100644
index 0000000..e806c6c
Binary files /dev/null and b/oldProject/100/image/expiryDate875_backup.bmp differ
diff --git a/oldProject/100/image/expiryDate8_backup.bmp b/oldProject/100/image/expiryDate8_backup.bmp
new file mode 100644
index 0000000..e806c6c
Binary files /dev/null and b/oldProject/100/image/expiryDate8_backup.bmp differ
diff --git a/oldProject/101/EXPIRYXX.xcf b/oldProject/101/EXPIRYXX.xcf
new file mode 100644
index 0000000..a1674a6
Binary files /dev/null and b/oldProject/101/EXPIRYXX.xcf differ
diff --git a/oldProject/101/digitalWidth1.bmp b/oldProject/101/digitalWidth1.bmp
new file mode 100644
index 0000000..9b0bef1
Binary files /dev/null and b/oldProject/101/digitalWidth1.bmp differ
diff --git a/oldProject/101/digitalWidth4.bmp b/oldProject/101/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/101/digitalWidth4.bmp differ
diff --git a/oldProject/101/expiryDate8.bmp b/oldProject/101/expiryDate8.bmp
new file mode 100644
index 0000000..6072a3f
Binary files /dev/null and b/oldProject/101/expiryDate8.bmp differ
diff --git a/oldProject/101/image/curDate1.bmp b/oldProject/101/image/curDate1.bmp
new file mode 100644
index 0000000..bc9c77f
Binary files /dev/null and b/oldProject/101/image/curDate1.bmp differ
diff --git a/oldProject/101/image/curDate8.bmp b/oldProject/101/image/curDate8.bmp
new file mode 100644
index 0000000..8094d0e
Binary files /dev/null and b/oldProject/101/image/curDate8.bmp differ
diff --git a/oldProject/101/image/curDate875.bmp b/oldProject/101/image/curDate875.bmp
new file mode 100644
index 0000000..21e5a5a
Binary files /dev/null and b/oldProject/101/image/curDate875.bmp differ
diff --git a/oldProject/101/image/curDate8_backup.bmp b/oldProject/101/image/curDate8_backup.bmp
new file mode 100644
index 0000000..21e5a5a
Binary files /dev/null and b/oldProject/101/image/curDate8_backup.bmp differ
diff --git a/oldProject/101/image/digitalWidth1.bmp b/oldProject/101/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/101/image/digitalWidth1.bmp differ
diff --git a/oldProject/101/image/digitalWidth8 (____).bmp b/oldProject/101/image/digitalWidth8 (____).bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/101/image/digitalWidth8 (____).bmp differ
diff --git a/oldProject/101/image/digitalWidth8.bmp b/oldProject/101/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/101/image/digitalWidth8.bmp differ
diff --git a/oldProject/101/image/digitalWidth8.xcf b/oldProject/101/image/digitalWidth8.xcf
new file mode 100644
index 0000000..4165c8c
Binary files /dev/null and b/oldProject/101/image/digitalWidth8.xcf differ
diff --git a/oldProject/101/image/digitalWidth88.bmp b/oldProject/101/image/digitalWidth88.bmp
new file mode 100644
index 0000000..e806c6c
Binary files /dev/null and b/oldProject/101/image/digitalWidth88.bmp differ
diff --git a/oldProject/101/image/expiryDate8.bmp b/oldProject/101/image/expiryDate8.bmp
new file mode 100644
index 0000000..e806c6c
Binary files /dev/null and b/oldProject/101/image/expiryDate8.bmp differ
diff --git a/oldProject/101/image/expiryDate875.bmp b/oldProject/101/image/expiryDate875.bmp
new file mode 100644
index 0000000..e806c6c
Binary files /dev/null and b/oldProject/101/image/expiryDate875.bmp differ
diff --git a/oldProject/11/image/BARV105.bmp b/oldProject/11/image/BARV105.bmp
new file mode 100644
index 0000000..63ec41b
Binary files /dev/null and b/oldProject/11/image/BARV105.bmp differ
diff --git a/oldProject/11/image/BARV107.bmp b/oldProject/11/image/BARV107.bmp
new file mode 100644
index 0000000..f0d6e4b
Binary files /dev/null and b/oldProject/11/image/BARV107.bmp differ
diff --git a/oldProject/11/image/BARV109.bmp b/oldProject/11/image/BARV109.bmp
new file mode 100644
index 0000000..f8323c2
Binary files /dev/null and b/oldProject/11/image/BARV109.bmp differ
diff --git a/oldProject/11/image/BARV112.bmp b/oldProject/11/image/BARV112.bmp
new file mode 100644
index 0000000..35ffc37
Binary files /dev/null and b/oldProject/11/image/BARV112.bmp differ
diff --git a/oldProject/11/image/BARV116.bmp b/oldProject/11/image/BARV116.bmp
new file mode 100644
index 0000000..2fd9a1d
Binary files /dev/null and b/oldProject/11/image/BARV116.bmp differ
diff --git a/oldProject/11/image/BARV12.bmp b/oldProject/11/image/BARV12.bmp
new file mode 100644
index 0000000..57a3151
Binary files /dev/null and b/oldProject/11/image/BARV12.bmp differ
diff --git a/oldProject/11/image/BARV124.bmp b/oldProject/11/image/BARV124.bmp
new file mode 100644
index 0000000..f8f72d8
Binary files /dev/null and b/oldProject/11/image/BARV124.bmp differ
diff --git a/oldProject/11/image/BARV16.bmp b/oldProject/11/image/BARV16.bmp
new file mode 100644
index 0000000..fd14bee
Binary files /dev/null and b/oldProject/11/image/BARV16.bmp differ
diff --git a/oldProject/11/image/BARV205.bmp b/oldProject/11/image/BARV205.bmp
new file mode 100644
index 0000000..a893e0e
Binary files /dev/null and b/oldProject/11/image/BARV205.bmp differ
diff --git a/oldProject/11/image/BARV207.bmp b/oldProject/11/image/BARV207.bmp
new file mode 100644
index 0000000..1feb715
Binary files /dev/null and b/oldProject/11/image/BARV207.bmp differ
diff --git a/oldProject/11/image/BARV209.bmp b/oldProject/11/image/BARV209.bmp
new file mode 100644
index 0000000..60df46e
Binary files /dev/null and b/oldProject/11/image/BARV209.bmp differ
diff --git a/oldProject/11/image/BARV212.bmp b/oldProject/11/image/BARV212.bmp
new file mode 100644
index 0000000..a49ff4f
Binary files /dev/null and b/oldProject/11/image/BARV212.bmp differ
diff --git a/oldProject/11/image/BARV216.bmp b/oldProject/11/image/BARV216.bmp
new file mode 100644
index 0000000..031eda9
Binary files /dev/null and b/oldProject/11/image/BARV216.bmp differ
diff --git a/oldProject/11/image/BARV224.bmp b/oldProject/11/image/BARV224.bmp
new file mode 100644
index 0000000..5003d90
Binary files /dev/null and b/oldProject/11/image/BARV224.bmp differ
diff --git a/oldProject/11/image/BARV24.bmp b/oldProject/11/image/BARV24.bmp
new file mode 100644
index 0000000..021860a
Binary files /dev/null and b/oldProject/11/image/BARV24.bmp differ
diff --git a/oldProject/11/image/BARV5.bmp b/oldProject/11/image/BARV5.bmp
new file mode 100644
index 0000000..a8b28b5
Binary files /dev/null and b/oldProject/11/image/BARV5.bmp differ
diff --git a/oldProject/11/image/BARV7.bmp b/oldProject/11/image/BARV7.bmp
new file mode 100644
index 0000000..f7c37d8
Binary files /dev/null and b/oldProject/11/image/BARV7.bmp differ
diff --git a/oldProject/11/image/BARV9.bmp b/oldProject/11/image/BARV9.bmp
new file mode 100644
index 0000000..1f50e6c
Binary files /dev/null and b/oldProject/11/image/BARV9.bmp differ
diff --git a/oldProject/12/image/digitalWidth1.bmp b/oldProject/12/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/12/image/digitalWidth1.bmp differ
diff --git a/oldProject/12/image/digitalWidth10.bmp b/oldProject/12/image/digitalWidth10.bmp
new file mode 100644
index 0000000..36f4532
Binary files /dev/null and b/oldProject/12/image/digitalWidth10.bmp differ
diff --git a/oldProject/12/image/digitalWidth1075.bmp b/oldProject/12/image/digitalWidth1075.bmp
new file mode 100644
index 0000000..36f4532
Binary files /dev/null and b/oldProject/12/image/digitalWidth1075.bmp differ
diff --git a/oldProject/12/image/digitalWidth11.bmp b/oldProject/12/image/digitalWidth11.bmp
new file mode 100644
index 0000000..171d070
Binary files /dev/null and b/oldProject/12/image/digitalWidth11.bmp differ
diff --git a/oldProject/12/image/digitalWidth1175.bmp b/oldProject/12/image/digitalWidth1175.bmp
new file mode 100644
index 0000000..171d070
Binary files /dev/null and b/oldProject/12/image/digitalWidth1175.bmp differ
diff --git a/oldProject/12/image/digitalWidth12.bmp b/oldProject/12/image/digitalWidth12.bmp
new file mode 100644
index 0000000..0c5a440
Binary files /dev/null and b/oldProject/12/image/digitalWidth12.bmp differ
diff --git a/oldProject/12/image/digitalWidth1275.bmp b/oldProject/12/image/digitalWidth1275.bmp
new file mode 100644
index 0000000..0c5a440
Binary files /dev/null and b/oldProject/12/image/digitalWidth1275.bmp differ
diff --git a/oldProject/12/image/digitalWidth13.bmp b/oldProject/12/image/digitalWidth13.bmp
new file mode 100644
index 0000000..0fa65a5
Binary files /dev/null and b/oldProject/12/image/digitalWidth13.bmp differ
diff --git a/oldProject/12/image/digitalWidth1375.bmp b/oldProject/12/image/digitalWidth1375.bmp
new file mode 100644
index 0000000..0fa65a5
Binary files /dev/null and b/oldProject/12/image/digitalWidth1375.bmp differ
diff --git a/oldProject/12/image/digitalWidth14.bmp b/oldProject/12/image/digitalWidth14.bmp
new file mode 100644
index 0000000..939c6c4
Binary files /dev/null and b/oldProject/12/image/digitalWidth14.bmp differ
diff --git a/oldProject/12/image/digitalWidth1475.bmp b/oldProject/12/image/digitalWidth1475.bmp
new file mode 100644
index 0000000..939c6c4
Binary files /dev/null and b/oldProject/12/image/digitalWidth1475.bmp differ
diff --git a/oldProject/12/image/digitalWidth15.bmp b/oldProject/12/image/digitalWidth15.bmp
new file mode 100644
index 0000000..b6beec9
Binary files /dev/null and b/oldProject/12/image/digitalWidth15.bmp differ
diff --git a/oldProject/12/image/digitalWidth1575.bmp b/oldProject/12/image/digitalWidth1575.bmp
new file mode 100644
index 0000000..b6beec9
Binary files /dev/null and b/oldProject/12/image/digitalWidth1575.bmp differ
diff --git a/oldProject/12/image/digitalWidth16.bmp b/oldProject/12/image/digitalWidth16.bmp
new file mode 100644
index 0000000..2a30f73
Binary files /dev/null and b/oldProject/12/image/digitalWidth16.bmp differ
diff --git a/oldProject/12/image/digitalWidth1675.bmp b/oldProject/12/image/digitalWidth1675.bmp
new file mode 100644
index 0000000..2a30f73
Binary files /dev/null and b/oldProject/12/image/digitalWidth1675.bmp differ
diff --git a/oldProject/12/image/digitalWidth175.bmp b/oldProject/12/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/12/image/digitalWidth175.bmp differ
diff --git a/oldProject/12/image/digitalWidth2.bmp b/oldProject/12/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/12/image/digitalWidth2.bmp differ
diff --git a/oldProject/12/image/digitalWidth275.bmp b/oldProject/12/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/12/image/digitalWidth275.bmp differ
diff --git a/oldProject/12/image/digitalWidth3.bmp b/oldProject/12/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/12/image/digitalWidth3.bmp differ
diff --git a/oldProject/12/image/digitalWidth375.bmp b/oldProject/12/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/12/image/digitalWidth375.bmp differ
diff --git a/oldProject/12/image/digitalWidth4.bmp b/oldProject/12/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/12/image/digitalWidth4.bmp differ
diff --git a/oldProject/12/image/digitalWidth475.bmp b/oldProject/12/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/12/image/digitalWidth475.bmp differ
diff --git a/oldProject/12/image/digitalWidth5.bmp b/oldProject/12/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/12/image/digitalWidth5.bmp differ
diff --git a/oldProject/12/image/digitalWidth575.bmp b/oldProject/12/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/12/image/digitalWidth575.bmp differ
diff --git a/oldProject/12/image/digitalWidth6.bmp b/oldProject/12/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/12/image/digitalWidth6.bmp differ
diff --git a/oldProject/12/image/digitalWidth675.bmp b/oldProject/12/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/12/image/digitalWidth675.bmp differ
diff --git a/oldProject/12/image/digitalWidth7.bmp b/oldProject/12/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/12/image/digitalWidth7.bmp differ
diff --git a/oldProject/12/image/digitalWidth775.bmp b/oldProject/12/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/12/image/digitalWidth775.bmp differ
diff --git a/oldProject/12/image/digitalWidth8.bmp b/oldProject/12/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/12/image/digitalWidth8.bmp differ
diff --git a/oldProject/12/image/digitalWidth875.bmp b/oldProject/12/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/12/image/digitalWidth875.bmp differ
diff --git a/oldProject/12/image/digitalWidth9.bmp b/oldProject/12/image/digitalWidth9.bmp
new file mode 100644
index 0000000..da84387
Binary files /dev/null and b/oldProject/12/image/digitalWidth9.bmp differ
diff --git a/oldProject/12/image/digitalWidth975.bmp b/oldProject/12/image/digitalWidth975.bmp
new file mode 100644
index 0000000..da84387
Binary files /dev/null and b/oldProject/12/image/digitalWidth975.bmp differ
diff --git a/oldProject/13/image/digitalWidth1.bmp b/oldProject/13/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/13/image/digitalWidth1.bmp differ
diff --git a/oldProject/13/image/digitalWidth175.bmp b/oldProject/13/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/13/image/digitalWidth175.bmp differ
diff --git a/oldProject/13/image/digitalWidth2.bmp b/oldProject/13/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/13/image/digitalWidth2.bmp differ
diff --git a/oldProject/13/image/digitalWidth275.bmp b/oldProject/13/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/13/image/digitalWidth275.bmp differ
diff --git a/oldProject/13/image/digitalWidth3.bmp b/oldProject/13/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/13/image/digitalWidth3.bmp differ
diff --git a/oldProject/13/image/digitalWidth375.bmp b/oldProject/13/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/13/image/digitalWidth375.bmp differ
diff --git a/oldProject/13/image/digitalWidth4.bmp b/oldProject/13/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/13/image/digitalWidth4.bmp differ
diff --git a/oldProject/13/image/digitalWidth475.bmp b/oldProject/13/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/13/image/digitalWidth475.bmp differ
diff --git a/oldProject/13/image/digitalWidth5.bmp b/oldProject/13/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/13/image/digitalWidth5.bmp differ
diff --git a/oldProject/13/image/digitalWidth575.bmp b/oldProject/13/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/13/image/digitalWidth575.bmp differ
diff --git a/oldProject/13/image/digitalWidth6.bmp b/oldProject/13/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/13/image/digitalWidth6.bmp differ
diff --git a/oldProject/13/image/digitalWidth675.bmp b/oldProject/13/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/13/image/digitalWidth675.bmp differ
diff --git a/oldProject/13/image/digitalWidth7.bmp b/oldProject/13/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/13/image/digitalWidth7.bmp differ
diff --git a/oldProject/13/image/digitalWidth775.bmp b/oldProject/13/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/13/image/digitalWidth775.bmp differ
diff --git a/oldProject/13/image/digitalWidth8.bmp b/oldProject/13/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/13/image/digitalWidth8.bmp differ
diff --git a/oldProject/13/image/digitalWidth875.bmp b/oldProject/13/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/13/image/digitalWidth875.bmp differ
diff --git a/oldProject/14/image/digitalWidth1.bmp b/oldProject/14/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/14/image/digitalWidth1.bmp differ
diff --git a/oldProject/14/image/digitalWidth175.bmp b/oldProject/14/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/14/image/digitalWidth175.bmp differ
diff --git a/oldProject/14/image/digitalWidth2.bmp b/oldProject/14/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/14/image/digitalWidth2.bmp differ
diff --git a/oldProject/14/image/digitalWidth275.bmp b/oldProject/14/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/14/image/digitalWidth275.bmp differ
diff --git a/oldProject/14/image/digitalWidth3.bmp b/oldProject/14/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/14/image/digitalWidth3.bmp differ
diff --git a/oldProject/14/image/digitalWidth375.bmp b/oldProject/14/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/14/image/digitalWidth375.bmp differ
diff --git a/oldProject/14/image/digitalWidth4.bmp b/oldProject/14/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/14/image/digitalWidth4.bmp differ
diff --git a/oldProject/14/image/digitalWidth475.bmp b/oldProject/14/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/14/image/digitalWidth475.bmp differ
diff --git a/oldProject/14/image/digitalWidth5.bmp b/oldProject/14/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/14/image/digitalWidth5.bmp differ
diff --git a/oldProject/14/image/digitalWidth575.bmp b/oldProject/14/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/14/image/digitalWidth575.bmp differ
diff --git a/oldProject/14/image/digitalWidth6.bmp b/oldProject/14/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/14/image/digitalWidth6.bmp differ
diff --git a/oldProject/14/image/digitalWidth675.bmp b/oldProject/14/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/14/image/digitalWidth675.bmp differ
diff --git a/oldProject/14/image/digitalWidth7.bmp b/oldProject/14/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/14/image/digitalWidth7.bmp differ
diff --git a/oldProject/14/image/digitalWidth775.bmp b/oldProject/14/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/14/image/digitalWidth775.bmp differ
diff --git a/oldProject/14/image/digitalWidth8.bmp b/oldProject/14/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/14/image/digitalWidth8.bmp differ
diff --git a/oldProject/14/image/digitalWidth875.bmp b/oldProject/14/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/14/image/digitalWidth875.bmp differ
diff --git a/oldProject/15/image/digitalWidth1.bmp b/oldProject/15/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/15/image/digitalWidth1.bmp differ
diff --git a/oldProject/15/image/digitalWidth175.bmp b/oldProject/15/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/15/image/digitalWidth175.bmp differ
diff --git a/oldProject/15/image/digitalWidth2.bmp b/oldProject/15/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/15/image/digitalWidth2.bmp differ
diff --git a/oldProject/15/image/digitalWidth275.bmp b/oldProject/15/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/15/image/digitalWidth275.bmp differ
diff --git a/oldProject/15/image/digitalWidth3.bmp b/oldProject/15/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/15/image/digitalWidth3.bmp differ
diff --git a/oldProject/15/image/digitalWidth375.bmp b/oldProject/15/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/15/image/digitalWidth375.bmp differ
diff --git a/oldProject/15/image/digitalWidth4.bmp b/oldProject/15/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/15/image/digitalWidth4.bmp differ
diff --git a/oldProject/15/image/digitalWidth475.bmp b/oldProject/15/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/15/image/digitalWidth475.bmp differ
diff --git a/oldProject/15/image/digitalWidth5.bmp b/oldProject/15/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/15/image/digitalWidth5.bmp differ
diff --git a/oldProject/15/image/digitalWidth575.bmp b/oldProject/15/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/15/image/digitalWidth575.bmp differ
diff --git a/oldProject/15/image/digitalWidth6.bmp b/oldProject/15/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/15/image/digitalWidth6.bmp differ
diff --git a/oldProject/15/image/digitalWidth675.bmp b/oldProject/15/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/15/image/digitalWidth675.bmp differ
diff --git a/oldProject/15/image/digitalWidth7.bmp b/oldProject/15/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/15/image/digitalWidth7.bmp differ
diff --git a/oldProject/15/image/digitalWidth775.bmp b/oldProject/15/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/15/image/digitalWidth775.bmp differ
diff --git a/oldProject/15/image/digitalWidth8.bmp b/oldProject/15/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/15/image/digitalWidth8.bmp differ
diff --git a/oldProject/15/image/digitalWidth875.bmp b/oldProject/15/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/15/image/digitalWidth875.bmp differ
diff --git a/oldProject/2/image/digitalWidth1.bmp b/oldProject/2/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/2/image/digitalWidth1.bmp differ
diff --git a/oldProject/2/image/digitalWidth175.bmp b/oldProject/2/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/2/image/digitalWidth175.bmp differ
diff --git a/oldProject/2/image/digitalWidth2.bmp b/oldProject/2/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/2/image/digitalWidth2.bmp differ
diff --git a/oldProject/2/image/digitalWidth275.bmp b/oldProject/2/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/2/image/digitalWidth275.bmp differ
diff --git a/oldProject/2/image/digitalWidth3.bmp b/oldProject/2/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/2/image/digitalWidth3.bmp differ
diff --git a/oldProject/2/image/digitalWidth375.bmp b/oldProject/2/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/2/image/digitalWidth375.bmp differ
diff --git a/oldProject/2/image/digitalWidth4.bmp b/oldProject/2/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/2/image/digitalWidth4.bmp differ
diff --git a/oldProject/2/image/digitalWidth475.bmp b/oldProject/2/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/2/image/digitalWidth475.bmp differ
diff --git a/oldProject/2/image/digitalWidth5.bmp b/oldProject/2/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/2/image/digitalWidth5.bmp differ
diff --git a/oldProject/2/image/digitalWidth575.bmp b/oldProject/2/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/2/image/digitalWidth575.bmp differ
diff --git a/oldProject/2/image/digitalWidth6.bmp b/oldProject/2/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/2/image/digitalWidth6.bmp differ
diff --git a/oldProject/2/image/digitalWidth675.bmp b/oldProject/2/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/2/image/digitalWidth675.bmp differ
diff --git a/oldProject/2/image/digitalWidth7.bmp b/oldProject/2/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/2/image/digitalWidth7.bmp differ
diff --git a/oldProject/2/image/digitalWidth775.bmp b/oldProject/2/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/2/image/digitalWidth775.bmp differ
diff --git a/oldProject/2/image/digitalWidth8.bmp b/oldProject/2/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/2/image/digitalWidth8.bmp differ
diff --git a/oldProject/2/image/digitalWidth875.bmp b/oldProject/2/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/2/image/digitalWidth875.bmp differ
diff --git a/oldProject/20/image/digitalWidth1.bmp b/oldProject/20/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/20/image/digitalWidth1.bmp differ
diff --git a/oldProject/20/image/digitalWidth175.bmp b/oldProject/20/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/20/image/digitalWidth175.bmp differ
diff --git a/oldProject/20/image/digitalWidth2.bmp b/oldProject/20/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/20/image/digitalWidth2.bmp differ
diff --git a/oldProject/20/image/digitalWidth275.bmp b/oldProject/20/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/20/image/digitalWidth275.bmp differ
diff --git a/oldProject/20/image/digitalWidth3.bmp b/oldProject/20/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/20/image/digitalWidth3.bmp differ
diff --git a/oldProject/20/image/digitalWidth375.bmp b/oldProject/20/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/20/image/digitalWidth375.bmp differ
diff --git a/oldProject/20/image/digitalWidth4.bmp b/oldProject/20/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/20/image/digitalWidth4.bmp differ
diff --git a/oldProject/20/image/digitalWidth475.bmp b/oldProject/20/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/20/image/digitalWidth475.bmp differ
diff --git a/oldProject/20/image/digitalWidth5.bmp b/oldProject/20/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/20/image/digitalWidth5.bmp differ
diff --git a/oldProject/20/image/digitalWidth575.bmp b/oldProject/20/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/20/image/digitalWidth575.bmp differ
diff --git a/oldProject/20/image/digitalWidth6.bmp b/oldProject/20/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/20/image/digitalWidth6.bmp differ
diff --git a/oldProject/20/image/digitalWidth675.bmp b/oldProject/20/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/20/image/digitalWidth675.bmp differ
diff --git a/oldProject/20/image/digitalWidth7.bmp b/oldProject/20/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/20/image/digitalWidth7.bmp differ
diff --git a/oldProject/20/image/digitalWidth775.bmp b/oldProject/20/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/20/image/digitalWidth775.bmp differ
diff --git a/oldProject/20/image/digitalWidth8.bmp b/oldProject/20/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/20/image/digitalWidth8.bmp differ
diff --git a/oldProject/20/image/digitalWidth875.bmp b/oldProject/20/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/20/image/digitalWidth875.bmp differ
diff --git a/oldProject/21/image/digitalWidth1.bmp b/oldProject/21/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/21/image/digitalWidth1.bmp differ
diff --git a/oldProject/21/image/digitalWidth175.bmp b/oldProject/21/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/21/image/digitalWidth175.bmp differ
diff --git a/oldProject/21/image/digitalWidth2.bmp b/oldProject/21/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/21/image/digitalWidth2.bmp differ
diff --git a/oldProject/21/image/digitalWidth275.bmp b/oldProject/21/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/21/image/digitalWidth275.bmp differ
diff --git a/oldProject/21/image/digitalWidth3.bmp b/oldProject/21/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/21/image/digitalWidth3.bmp differ
diff --git a/oldProject/21/image/digitalWidth375.bmp b/oldProject/21/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/21/image/digitalWidth375.bmp differ
diff --git a/oldProject/21/image/digitalWidth4.bmp b/oldProject/21/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/21/image/digitalWidth4.bmp differ
diff --git a/oldProject/21/image/digitalWidth475.bmp b/oldProject/21/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/21/image/digitalWidth475.bmp differ
diff --git a/oldProject/21/image/digitalWidth5.bmp b/oldProject/21/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/21/image/digitalWidth5.bmp differ
diff --git a/oldProject/21/image/digitalWidth575.bmp b/oldProject/21/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/21/image/digitalWidth575.bmp differ
diff --git a/oldProject/21/image/digitalWidth6.bmp b/oldProject/21/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/21/image/digitalWidth6.bmp differ
diff --git a/oldProject/21/image/digitalWidth675.bmp b/oldProject/21/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/21/image/digitalWidth675.bmp differ
diff --git a/oldProject/21/image/digitalWidth7.bmp b/oldProject/21/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/21/image/digitalWidth7.bmp differ
diff --git a/oldProject/21/image/digitalWidth775.bmp b/oldProject/21/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/21/image/digitalWidth775.bmp differ
diff --git a/oldProject/21/image/digitalWidth8.bmp b/oldProject/21/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/21/image/digitalWidth8.bmp differ
diff --git a/oldProject/21/image/digitalWidth875.bmp b/oldProject/21/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/21/image/digitalWidth875.bmp differ
diff --git a/oldProject/22/image/digitalWidth1.bmp b/oldProject/22/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/22/image/digitalWidth1.bmp differ
diff --git a/oldProject/22/image/digitalWidth175.bmp b/oldProject/22/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/22/image/digitalWidth175.bmp differ
diff --git a/oldProject/22/image/digitalWidth2.bmp b/oldProject/22/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/22/image/digitalWidth2.bmp differ
diff --git a/oldProject/22/image/digitalWidth275.bmp b/oldProject/22/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/22/image/digitalWidth275.bmp differ
diff --git a/oldProject/22/image/digitalWidth3.bmp b/oldProject/22/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/22/image/digitalWidth3.bmp differ
diff --git a/oldProject/22/image/digitalWidth375.bmp b/oldProject/22/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/22/image/digitalWidth375.bmp differ
diff --git a/oldProject/22/image/digitalWidth4.bmp b/oldProject/22/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/22/image/digitalWidth4.bmp differ
diff --git a/oldProject/22/image/digitalWidth475.bmp b/oldProject/22/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/22/image/digitalWidth475.bmp differ
diff --git a/oldProject/22/image/digitalWidth5.bmp b/oldProject/22/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/22/image/digitalWidth5.bmp differ
diff --git a/oldProject/22/image/digitalWidth575.bmp b/oldProject/22/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/22/image/digitalWidth575.bmp differ
diff --git a/oldProject/22/image/digitalWidth6.bmp b/oldProject/22/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/22/image/digitalWidth6.bmp differ
diff --git a/oldProject/22/image/digitalWidth675.bmp b/oldProject/22/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/22/image/digitalWidth675.bmp differ
diff --git a/oldProject/22/image/digitalWidth7.bmp b/oldProject/22/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/22/image/digitalWidth7.bmp differ
diff --git a/oldProject/22/image/digitalWidth775.bmp b/oldProject/22/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/22/image/digitalWidth775.bmp differ
diff --git a/oldProject/22/image/digitalWidth8.bmp b/oldProject/22/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/22/image/digitalWidth8.bmp differ
diff --git a/oldProject/22/image/digitalWidth875.bmp b/oldProject/22/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/22/image/digitalWidth875.bmp differ
diff --git a/oldProject/23/image/digitalWidth1.bmp b/oldProject/23/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/23/image/digitalWidth1.bmp differ
diff --git a/oldProject/23/image/digitalWidth175.bmp b/oldProject/23/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/23/image/digitalWidth175.bmp differ
diff --git a/oldProject/23/image/digitalWidth2.bmp b/oldProject/23/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/23/image/digitalWidth2.bmp differ
diff --git a/oldProject/23/image/digitalWidth275.bmp b/oldProject/23/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/23/image/digitalWidth275.bmp differ
diff --git a/oldProject/23/image/digitalWidth3.bmp b/oldProject/23/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/23/image/digitalWidth3.bmp differ
diff --git a/oldProject/23/image/digitalWidth375.bmp b/oldProject/23/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/23/image/digitalWidth375.bmp differ
diff --git a/oldProject/23/image/digitalWidth4.bmp b/oldProject/23/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/23/image/digitalWidth4.bmp differ
diff --git a/oldProject/23/image/digitalWidth475.bmp b/oldProject/23/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/23/image/digitalWidth475.bmp differ
diff --git a/oldProject/23/image/digitalWidth5.bmp b/oldProject/23/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/23/image/digitalWidth5.bmp differ
diff --git a/oldProject/23/image/digitalWidth575.bmp b/oldProject/23/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/23/image/digitalWidth575.bmp differ
diff --git a/oldProject/23/image/digitalWidth6.bmp b/oldProject/23/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/23/image/digitalWidth6.bmp differ
diff --git a/oldProject/23/image/digitalWidth675.bmp b/oldProject/23/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/23/image/digitalWidth675.bmp differ
diff --git a/oldProject/23/image/digitalWidth7.bmp b/oldProject/23/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/23/image/digitalWidth7.bmp differ
diff --git a/oldProject/23/image/digitalWidth775.bmp b/oldProject/23/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/23/image/digitalWidth775.bmp differ
diff --git a/oldProject/23/image/digitalWidth8.bmp b/oldProject/23/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/23/image/digitalWidth8.bmp differ
diff --git a/oldProject/23/image/digitalWidth875.bmp b/oldProject/23/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/23/image/digitalWidth875.bmp differ
diff --git a/oldProject/24/image/digitalWidth1.bmp b/oldProject/24/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/24/image/digitalWidth1.bmp differ
diff --git a/oldProject/24/image/digitalWidth175.bmp b/oldProject/24/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/24/image/digitalWidth175.bmp differ
diff --git a/oldProject/24/image/digitalWidth2.bmp b/oldProject/24/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/24/image/digitalWidth2.bmp differ
diff --git a/oldProject/24/image/digitalWidth275.bmp b/oldProject/24/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/24/image/digitalWidth275.bmp differ
diff --git a/oldProject/24/image/digitalWidth3.bmp b/oldProject/24/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/24/image/digitalWidth3.bmp differ
diff --git a/oldProject/24/image/digitalWidth375.bmp b/oldProject/24/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/24/image/digitalWidth375.bmp differ
diff --git a/oldProject/24/image/digitalWidth4.bmp b/oldProject/24/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/24/image/digitalWidth4.bmp differ
diff --git a/oldProject/24/image/digitalWidth475.bmp b/oldProject/24/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/24/image/digitalWidth475.bmp differ
diff --git a/oldProject/24/image/digitalWidth5.bmp b/oldProject/24/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/24/image/digitalWidth5.bmp differ
diff --git a/oldProject/24/image/digitalWidth575.bmp b/oldProject/24/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/24/image/digitalWidth575.bmp differ
diff --git a/oldProject/24/image/digitalWidth6.bmp b/oldProject/24/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/24/image/digitalWidth6.bmp differ
diff --git a/oldProject/24/image/digitalWidth675.bmp b/oldProject/24/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/24/image/digitalWidth675.bmp differ
diff --git a/oldProject/24/image/digitalWidth7.bmp b/oldProject/24/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/24/image/digitalWidth7.bmp differ
diff --git a/oldProject/24/image/digitalWidth775.bmp b/oldProject/24/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/24/image/digitalWidth775.bmp differ
diff --git a/oldProject/24/image/digitalWidth8.bmp b/oldProject/24/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/24/image/digitalWidth8.bmp differ
diff --git a/oldProject/24/image/digitalWidth875.bmp b/oldProject/24/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/24/image/digitalWidth875.bmp differ
diff --git a/oldProject/25/image/digitalWidth1.bmp b/oldProject/25/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/25/image/digitalWidth1.bmp differ
diff --git a/oldProject/25/image/digitalWidth175.bmp b/oldProject/25/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/25/image/digitalWidth175.bmp differ
diff --git a/oldProject/25/image/digitalWidth2.bmp b/oldProject/25/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/25/image/digitalWidth2.bmp differ
diff --git a/oldProject/25/image/digitalWidth275.bmp b/oldProject/25/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/25/image/digitalWidth275.bmp differ
diff --git a/oldProject/25/image/digitalWidth3.bmp b/oldProject/25/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/25/image/digitalWidth3.bmp differ
diff --git a/oldProject/25/image/digitalWidth375.bmp b/oldProject/25/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/25/image/digitalWidth375.bmp differ
diff --git a/oldProject/25/image/digitalWidth4.bmp b/oldProject/25/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/25/image/digitalWidth4.bmp differ
diff --git a/oldProject/25/image/digitalWidth475.bmp b/oldProject/25/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/25/image/digitalWidth475.bmp differ
diff --git a/oldProject/25/image/digitalWidth5.bmp b/oldProject/25/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/25/image/digitalWidth5.bmp differ
diff --git a/oldProject/25/image/digitalWidth575.bmp b/oldProject/25/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/25/image/digitalWidth575.bmp differ
diff --git a/oldProject/25/image/digitalWidth6.bmp b/oldProject/25/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/25/image/digitalWidth6.bmp differ
diff --git a/oldProject/25/image/digitalWidth675.bmp b/oldProject/25/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/25/image/digitalWidth675.bmp differ
diff --git a/oldProject/25/image/digitalWidth7.bmp b/oldProject/25/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/25/image/digitalWidth7.bmp differ
diff --git a/oldProject/25/image/digitalWidth775.bmp b/oldProject/25/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/25/image/digitalWidth775.bmp differ
diff --git a/oldProject/25/image/digitalWidth8.bmp b/oldProject/25/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/25/image/digitalWidth8.bmp differ
diff --git a/oldProject/25/image/digitalWidth875.bmp b/oldProject/25/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/25/image/digitalWidth875.bmp differ
diff --git a/oldProject/26/image/digitalWidth1.bmp b/oldProject/26/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/26/image/digitalWidth1.bmp differ
diff --git a/oldProject/26/image/digitalWidth175.bmp b/oldProject/26/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/26/image/digitalWidth175.bmp differ
diff --git a/oldProject/26/image/digitalWidth2.bmp b/oldProject/26/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/26/image/digitalWidth2.bmp differ
diff --git a/oldProject/26/image/digitalWidth275.bmp b/oldProject/26/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/26/image/digitalWidth275.bmp differ
diff --git a/oldProject/26/image/digitalWidth3.bmp b/oldProject/26/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/26/image/digitalWidth3.bmp differ
diff --git a/oldProject/26/image/digitalWidth375.bmp b/oldProject/26/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/26/image/digitalWidth375.bmp differ
diff --git a/oldProject/26/image/digitalWidth4.bmp b/oldProject/26/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/26/image/digitalWidth4.bmp differ
diff --git a/oldProject/26/image/digitalWidth475.bmp b/oldProject/26/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/26/image/digitalWidth475.bmp differ
diff --git a/oldProject/26/image/digitalWidth5.bmp b/oldProject/26/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/26/image/digitalWidth5.bmp differ
diff --git a/oldProject/26/image/digitalWidth575.bmp b/oldProject/26/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/26/image/digitalWidth575.bmp differ
diff --git a/oldProject/26/image/digitalWidth6.bmp b/oldProject/26/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/26/image/digitalWidth6.bmp differ
diff --git a/oldProject/26/image/digitalWidth675.bmp b/oldProject/26/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/26/image/digitalWidth675.bmp differ
diff --git a/oldProject/26/image/digitalWidth7.bmp b/oldProject/26/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/26/image/digitalWidth7.bmp differ
diff --git a/oldProject/26/image/digitalWidth775.bmp b/oldProject/26/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/26/image/digitalWidth775.bmp differ
diff --git a/oldProject/26/image/digitalWidth8.bmp b/oldProject/26/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/26/image/digitalWidth8.bmp differ
diff --git a/oldProject/26/image/digitalWidth875.bmp b/oldProject/26/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/26/image/digitalWidth875.bmp differ
diff --git a/oldProject/27/image (╕┤╝■)/digitalWidth1.bmp b/oldProject/27/image (╕┤╝■)/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/27/image (╕┤╝■)/digitalWidth1.bmp differ
diff --git a/oldProject/27/image (╕┤╝■)/digitalWidth175.bmp b/oldProject/27/image (╕┤╝■)/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/27/image (╕┤╝■)/digitalWidth175.bmp differ
diff --git a/oldProject/27/image (╕┤╝■)/digitalWidth2.bmp b/oldProject/27/image (╕┤╝■)/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/27/image (╕┤╝■)/digitalWidth2.bmp differ
diff --git a/oldProject/27/image (╕┤╝■)/digitalWidth275.bmp b/oldProject/27/image (╕┤╝■)/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/27/image (╕┤╝■)/digitalWidth275.bmp differ
diff --git a/oldProject/27/image (╕┤╝■)/digitalWidth3.bmp b/oldProject/27/image (╕┤╝■)/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/27/image (╕┤╝■)/digitalWidth3.bmp differ
diff --git a/oldProject/27/image (╕┤╝■)/digitalWidth375.bmp b/oldProject/27/image (╕┤╝■)/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/27/image (╕┤╝■)/digitalWidth375.bmp differ
diff --git a/oldProject/27/image (╕┤╝■)/digitalWidth4.bmp b/oldProject/27/image (╕┤╝■)/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/27/image (╕┤╝■)/digitalWidth4.bmp differ
diff --git a/oldProject/27/image (╕┤╝■)/digitalWidth475.bmp b/oldProject/27/image (╕┤╝■)/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/27/image (╕┤╝■)/digitalWidth475.bmp differ
diff --git a/oldProject/27/image (╕┤╝■)/digitalWidth5.bmp b/oldProject/27/image (╕┤╝■)/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/27/image (╕┤╝■)/digitalWidth5.bmp differ
diff --git a/oldProject/27/image (╕┤╝■)/digitalWidth575.bmp b/oldProject/27/image (╕┤╝■)/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/27/image (╕┤╝■)/digitalWidth575.bmp differ
diff --git a/oldProject/27/image (╕┤╝■)/digitalWidth6.bmp b/oldProject/27/image (╕┤╝■)/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/27/image (╕┤╝■)/digitalWidth6.bmp differ
diff --git a/oldProject/27/image (╕┤╝■)/digitalWidth675.bmp b/oldProject/27/image (╕┤╝■)/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/27/image (╕┤╝■)/digitalWidth675.bmp differ
diff --git a/oldProject/27/image (╕┤╝■)/digitalWidth7.bmp b/oldProject/27/image (╕┤╝■)/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/27/image (╕┤╝■)/digitalWidth7.bmp differ
diff --git a/oldProject/27/image (╕┤╝■)/digitalWidth775.bmp b/oldProject/27/image (╕┤╝■)/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/27/image (╕┤╝■)/digitalWidth775.bmp differ
diff --git a/oldProject/27/image (╕┤╝■)/digitalWidth8.bmp b/oldProject/27/image (╕┤╝■)/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/27/image (╕┤╝■)/digitalWidth8.bmp differ
diff --git a/oldProject/27/image (╕┤╝■)/digitalWidth875.bmp b/oldProject/27/image (╕┤╝■)/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/27/image (╕┤╝■)/digitalWidth875.bmp differ
diff --git a/oldProject/27/image.tar.gz b/oldProject/27/image.tar.gz
new file mode 100644
index 0000000..953eecb
Binary files /dev/null and b/oldProject/27/image.tar.gz differ
diff --git a/oldProject/27/image/digitalWidth1.bmp b/oldProject/27/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/27/image/digitalWidth1.bmp differ
diff --git a/oldProject/27/image/digitalWidth175.bmp b/oldProject/27/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/27/image/digitalWidth175.bmp differ
diff --git a/oldProject/27/image/digitalWidth2.bmp b/oldProject/27/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/27/image/digitalWidth2.bmp differ
diff --git a/oldProject/27/image/digitalWidth275.bmp b/oldProject/27/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/27/image/digitalWidth275.bmp differ
diff --git a/oldProject/27/image/digitalWidth3.bmp b/oldProject/27/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/27/image/digitalWidth3.bmp differ
diff --git a/oldProject/27/image/digitalWidth375.bmp b/oldProject/27/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/27/image/digitalWidth375.bmp differ
diff --git a/oldProject/27/image/digitalWidth4.bmp b/oldProject/27/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/27/image/digitalWidth4.bmp differ
diff --git a/oldProject/27/image/digitalWidth475.bmp b/oldProject/27/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/27/image/digitalWidth475.bmp differ
diff --git a/oldProject/27/image/digitalWidth5.bmp b/oldProject/27/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/27/image/digitalWidth5.bmp differ
diff --git a/oldProject/27/image/digitalWidth575.bmp b/oldProject/27/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/27/image/digitalWidth575.bmp differ
diff --git a/oldProject/27/image/digitalWidth6.bmp b/oldProject/27/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/27/image/digitalWidth6.bmp differ
diff --git a/oldProject/27/image/digitalWidth675.bmp b/oldProject/27/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/27/image/digitalWidth675.bmp differ
diff --git a/oldProject/27/image/digitalWidth7.bmp b/oldProject/27/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/27/image/digitalWidth7.bmp differ
diff --git a/oldProject/27/image/digitalWidth775.bmp b/oldProject/27/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/27/image/digitalWidth775.bmp differ
diff --git a/oldProject/27/image/digitalWidth8.bmp b/oldProject/27/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/27/image/digitalWidth8.bmp differ
diff --git a/oldProject/27/image/digitalWidth875.bmp b/oldProject/27/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/27/image/digitalWidth875.bmp differ
diff --git a/oldProject/28/image/digitalWidth1.bmp b/oldProject/28/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/28/image/digitalWidth1.bmp differ
diff --git a/oldProject/28/image/digitalWidth175.bmp b/oldProject/28/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/28/image/digitalWidth175.bmp differ
diff --git a/oldProject/28/image/digitalWidth2.bmp b/oldProject/28/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/28/image/digitalWidth2.bmp differ
diff --git a/oldProject/28/image/digitalWidth275.bmp b/oldProject/28/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/28/image/digitalWidth275.bmp differ
diff --git a/oldProject/28/image/digitalWidth3.bmp b/oldProject/28/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/28/image/digitalWidth3.bmp differ
diff --git a/oldProject/28/image/digitalWidth375.bmp b/oldProject/28/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/28/image/digitalWidth375.bmp differ
diff --git a/oldProject/28/image/digitalWidth4.bmp b/oldProject/28/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/28/image/digitalWidth4.bmp differ
diff --git a/oldProject/28/image/digitalWidth475.bmp b/oldProject/28/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/28/image/digitalWidth475.bmp differ
diff --git a/oldProject/28/image/digitalWidth5.bmp b/oldProject/28/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/28/image/digitalWidth5.bmp differ
diff --git a/oldProject/28/image/digitalWidth575.bmp b/oldProject/28/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/28/image/digitalWidth575.bmp differ
diff --git a/oldProject/28/image/digitalWidth6.bmp b/oldProject/28/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/28/image/digitalWidth6.bmp differ
diff --git a/oldProject/28/image/digitalWidth675.bmp b/oldProject/28/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/28/image/digitalWidth675.bmp differ
diff --git a/oldProject/28/image/digitalWidth7.bmp b/oldProject/28/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/28/image/digitalWidth7.bmp differ
diff --git a/oldProject/28/image/digitalWidth775.bmp b/oldProject/28/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/28/image/digitalWidth775.bmp differ
diff --git a/oldProject/28/image/digitalWidth8.bmp b/oldProject/28/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/28/image/digitalWidth8.bmp differ
diff --git a/oldProject/28/image/digitalWidth875.bmp b/oldProject/28/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/28/image/digitalWidth875.bmp differ
diff --git a/oldProject/3/image/digitalWidth1.bmp b/oldProject/3/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/3/image/digitalWidth1.bmp differ
diff --git a/oldProject/3/image/digitalWidth175.bmp b/oldProject/3/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/3/image/digitalWidth175.bmp differ
diff --git a/oldProject/3/image/digitalWidth2.bmp b/oldProject/3/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/3/image/digitalWidth2.bmp differ
diff --git a/oldProject/3/image/digitalWidth275.bmp b/oldProject/3/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/3/image/digitalWidth275.bmp differ
diff --git a/oldProject/3/image/digitalWidth3.bmp b/oldProject/3/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/3/image/digitalWidth3.bmp differ
diff --git a/oldProject/3/image/digitalWidth375.bmp b/oldProject/3/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/3/image/digitalWidth375.bmp differ
diff --git a/oldProject/3/image/digitalWidth4.bmp b/oldProject/3/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/3/image/digitalWidth4.bmp differ
diff --git a/oldProject/3/image/digitalWidth475.bmp b/oldProject/3/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/3/image/digitalWidth475.bmp differ
diff --git a/oldProject/3/image/digitalWidth5.bmp b/oldProject/3/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/3/image/digitalWidth5.bmp differ
diff --git a/oldProject/3/image/digitalWidth575.bmp b/oldProject/3/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/3/image/digitalWidth575.bmp differ
diff --git a/oldProject/3/image/digitalWidth6.bmp b/oldProject/3/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/3/image/digitalWidth6.bmp differ
diff --git a/oldProject/3/image/digitalWidth675.bmp b/oldProject/3/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/3/image/digitalWidth675.bmp differ
diff --git a/oldProject/3/image/digitalWidth7.bmp b/oldProject/3/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/3/image/digitalWidth7.bmp differ
diff --git a/oldProject/3/image/digitalWidth775.bmp b/oldProject/3/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/3/image/digitalWidth775.bmp differ
diff --git a/oldProject/3/image/digitalWidth8.bmp b/oldProject/3/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/3/image/digitalWidth8.bmp differ
diff --git a/oldProject/3/image/digitalWidth875.bmp b/oldProject/3/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/3/image/digitalWidth875.bmp differ
diff --git a/oldProject/30/image/digitalWidth1.bmp b/oldProject/30/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/30/image/digitalWidth1.bmp differ
diff --git a/oldProject/30/image/digitalWidth175.bmp b/oldProject/30/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/30/image/digitalWidth175.bmp differ
diff --git a/oldProject/30/image/digitalWidth2.bmp b/oldProject/30/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/30/image/digitalWidth2.bmp differ
diff --git a/oldProject/30/image/digitalWidth275.bmp b/oldProject/30/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/30/image/digitalWidth275.bmp differ
diff --git a/oldProject/30/image/digitalWidth3.bmp b/oldProject/30/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/30/image/digitalWidth3.bmp differ
diff --git a/oldProject/30/image/digitalWidth375.bmp b/oldProject/30/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/30/image/digitalWidth375.bmp differ
diff --git a/oldProject/30/image/digitalWidth4.bmp b/oldProject/30/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/30/image/digitalWidth4.bmp differ
diff --git a/oldProject/30/image/digitalWidth475.bmp b/oldProject/30/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/30/image/digitalWidth475.bmp differ
diff --git a/oldProject/30/image/digitalWidth5.bmp b/oldProject/30/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/30/image/digitalWidth5.bmp differ
diff --git a/oldProject/30/image/digitalWidth575.bmp b/oldProject/30/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/30/image/digitalWidth575.bmp differ
diff --git a/oldProject/30/image/digitalWidth6.bmp b/oldProject/30/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/30/image/digitalWidth6.bmp differ
diff --git a/oldProject/30/image/digitalWidth675.bmp b/oldProject/30/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/30/image/digitalWidth675.bmp differ
diff --git a/oldProject/30/image/digitalWidth7.bmp b/oldProject/30/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/30/image/digitalWidth7.bmp differ
diff --git a/oldProject/30/image/digitalWidth775.bmp b/oldProject/30/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/30/image/digitalWidth775.bmp differ
diff --git a/oldProject/30/image/digitalWidth8.bmp b/oldProject/30/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/30/image/digitalWidth8.bmp differ
diff --git a/oldProject/30/image/digitalWidth875.bmp b/oldProject/30/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/30/image/digitalWidth875.bmp differ
diff --git a/oldProject/31/image/digitalWidth1.bmp b/oldProject/31/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/31/image/digitalWidth1.bmp differ
diff --git a/oldProject/31/image/digitalWidth175.bmp b/oldProject/31/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/31/image/digitalWidth175.bmp differ
diff --git a/oldProject/31/image/digitalWidth2.bmp b/oldProject/31/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/31/image/digitalWidth2.bmp differ
diff --git a/oldProject/31/image/digitalWidth275.bmp b/oldProject/31/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/31/image/digitalWidth275.bmp differ
diff --git a/oldProject/31/image/digitalWidth3.bmp b/oldProject/31/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/31/image/digitalWidth3.bmp differ
diff --git a/oldProject/31/image/digitalWidth375.bmp b/oldProject/31/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/31/image/digitalWidth375.bmp differ
diff --git a/oldProject/31/image/digitalWidth4.bmp b/oldProject/31/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/31/image/digitalWidth4.bmp differ
diff --git a/oldProject/31/image/digitalWidth475.bmp b/oldProject/31/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/31/image/digitalWidth475.bmp differ
diff --git a/oldProject/31/image/digitalWidth5.bmp b/oldProject/31/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/31/image/digitalWidth5.bmp differ
diff --git a/oldProject/31/image/digitalWidth575.bmp b/oldProject/31/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/31/image/digitalWidth575.bmp differ
diff --git a/oldProject/31/image/digitalWidth6.bmp b/oldProject/31/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/31/image/digitalWidth6.bmp differ
diff --git a/oldProject/31/image/digitalWidth675.bmp b/oldProject/31/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/31/image/digitalWidth675.bmp differ
diff --git a/oldProject/31/image/digitalWidth7.bmp b/oldProject/31/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/31/image/digitalWidth7.bmp differ
diff --git a/oldProject/31/image/digitalWidth775.bmp b/oldProject/31/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/31/image/digitalWidth775.bmp differ
diff --git a/oldProject/31/image/digitalWidth8.bmp b/oldProject/31/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/31/image/digitalWidth8.bmp differ
diff --git a/oldProject/31/image/digitalWidth875.bmp b/oldProject/31/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/31/image/digitalWidth875.bmp differ
diff --git a/oldProject/32/image/digitalWidth1.bmp b/oldProject/32/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/32/image/digitalWidth1.bmp differ
diff --git a/oldProject/32/image/digitalWidth175.bmp b/oldProject/32/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/32/image/digitalWidth175.bmp differ
diff --git a/oldProject/32/image/digitalWidth2.bmp b/oldProject/32/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/32/image/digitalWidth2.bmp differ
diff --git a/oldProject/32/image/digitalWidth275.bmp b/oldProject/32/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/32/image/digitalWidth275.bmp differ
diff --git a/oldProject/32/image/digitalWidth3.bmp b/oldProject/32/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/32/image/digitalWidth3.bmp differ
diff --git a/oldProject/32/image/digitalWidth375.bmp b/oldProject/32/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/32/image/digitalWidth375.bmp differ
diff --git a/oldProject/32/image/digitalWidth4.bmp b/oldProject/32/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/32/image/digitalWidth4.bmp differ
diff --git a/oldProject/32/image/digitalWidth475.bmp b/oldProject/32/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/32/image/digitalWidth475.bmp differ
diff --git a/oldProject/32/image/digitalWidth5.bmp b/oldProject/32/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/32/image/digitalWidth5.bmp differ
diff --git a/oldProject/32/image/digitalWidth575.bmp b/oldProject/32/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/32/image/digitalWidth575.bmp differ
diff --git a/oldProject/32/image/digitalWidth6.bmp b/oldProject/32/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/32/image/digitalWidth6.bmp differ
diff --git a/oldProject/32/image/digitalWidth675.bmp b/oldProject/32/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/32/image/digitalWidth675.bmp differ
diff --git a/oldProject/32/image/digitalWidth7.bmp b/oldProject/32/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/32/image/digitalWidth7.bmp differ
diff --git a/oldProject/32/image/digitalWidth775.bmp b/oldProject/32/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/32/image/digitalWidth775.bmp differ
diff --git a/oldProject/32/image/digitalWidth8.bmp b/oldProject/32/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/32/image/digitalWidth8.bmp differ
diff --git a/oldProject/32/image/digitalWidth875.bmp b/oldProject/32/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/32/image/digitalWidth875.bmp differ
diff --git a/oldProject/33/image/digitalWidth1.bmp b/oldProject/33/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/33/image/digitalWidth1.bmp differ
diff --git a/oldProject/33/image/digitalWidth175.bmp b/oldProject/33/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/33/image/digitalWidth175.bmp differ
diff --git a/oldProject/33/image/digitalWidth2.bmp b/oldProject/33/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/33/image/digitalWidth2.bmp differ
diff --git a/oldProject/33/image/digitalWidth275.bmp b/oldProject/33/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/33/image/digitalWidth275.bmp differ
diff --git a/oldProject/33/image/digitalWidth3.bmp b/oldProject/33/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/33/image/digitalWidth3.bmp differ
diff --git a/oldProject/33/image/digitalWidth375.bmp b/oldProject/33/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/33/image/digitalWidth375.bmp differ
diff --git a/oldProject/33/image/digitalWidth4.bmp b/oldProject/33/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/33/image/digitalWidth4.bmp differ
diff --git a/oldProject/33/image/digitalWidth475.bmp b/oldProject/33/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/33/image/digitalWidth475.bmp differ
diff --git a/oldProject/33/image/digitalWidth5.bmp b/oldProject/33/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/33/image/digitalWidth5.bmp differ
diff --git a/oldProject/33/image/digitalWidth575.bmp b/oldProject/33/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/33/image/digitalWidth575.bmp differ
diff --git a/oldProject/33/image/digitalWidth6.bmp b/oldProject/33/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/33/image/digitalWidth6.bmp differ
diff --git a/oldProject/33/image/digitalWidth675.bmp b/oldProject/33/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/33/image/digitalWidth675.bmp differ
diff --git a/oldProject/33/image/digitalWidth7.bmp b/oldProject/33/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/33/image/digitalWidth7.bmp differ
diff --git a/oldProject/33/image/digitalWidth775.bmp b/oldProject/33/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/33/image/digitalWidth775.bmp differ
diff --git a/oldProject/33/image/digitalWidth8.bmp b/oldProject/33/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/33/image/digitalWidth8.bmp differ
diff --git a/oldProject/33/image/digitalWidth875.bmp b/oldProject/33/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/33/image/digitalWidth875.bmp differ
diff --git a/oldProject/34/image/digitalWidth1.bmp b/oldProject/34/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/34/image/digitalWidth1.bmp differ
diff --git a/oldProject/34/image/digitalWidth175.bmp b/oldProject/34/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/34/image/digitalWidth175.bmp differ
diff --git a/oldProject/34/image/digitalWidth2.bmp b/oldProject/34/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/34/image/digitalWidth2.bmp differ
diff --git a/oldProject/34/image/digitalWidth275.bmp b/oldProject/34/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/34/image/digitalWidth275.bmp differ
diff --git a/oldProject/34/image/digitalWidth3.bmp b/oldProject/34/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/34/image/digitalWidth3.bmp differ
diff --git a/oldProject/34/image/digitalWidth375.bmp b/oldProject/34/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/34/image/digitalWidth375.bmp differ
diff --git a/oldProject/34/image/digitalWidth4.bmp b/oldProject/34/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/34/image/digitalWidth4.bmp differ
diff --git a/oldProject/34/image/digitalWidth475.bmp b/oldProject/34/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/34/image/digitalWidth475.bmp differ
diff --git a/oldProject/34/image/digitalWidth5.bmp b/oldProject/34/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/34/image/digitalWidth5.bmp differ
diff --git a/oldProject/34/image/digitalWidth575.bmp b/oldProject/34/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/34/image/digitalWidth575.bmp differ
diff --git a/oldProject/34/image/digitalWidth6.bmp b/oldProject/34/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/34/image/digitalWidth6.bmp differ
diff --git a/oldProject/34/image/digitalWidth675.bmp b/oldProject/34/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/34/image/digitalWidth675.bmp differ
diff --git a/oldProject/34/image/digitalWidth7.bmp b/oldProject/34/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/34/image/digitalWidth7.bmp differ
diff --git a/oldProject/34/image/digitalWidth775.bmp b/oldProject/34/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/34/image/digitalWidth775.bmp differ
diff --git a/oldProject/34/image/digitalWidth8.bmp b/oldProject/34/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/34/image/digitalWidth8.bmp differ
diff --git a/oldProject/34/image/digitalWidth875.bmp b/oldProject/34/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/34/image/digitalWidth875.bmp differ
diff --git a/oldProject/35/image/digitalWidth1.bmp b/oldProject/35/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/35/image/digitalWidth1.bmp differ
diff --git a/oldProject/35/image/digitalWidth175.bmp b/oldProject/35/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/35/image/digitalWidth175.bmp differ
diff --git a/oldProject/35/image/digitalWidth2.bmp b/oldProject/35/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/35/image/digitalWidth2.bmp differ
diff --git a/oldProject/35/image/digitalWidth275.bmp b/oldProject/35/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/35/image/digitalWidth275.bmp differ
diff --git a/oldProject/35/image/digitalWidth3.bmp b/oldProject/35/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/35/image/digitalWidth3.bmp differ
diff --git a/oldProject/35/image/digitalWidth375.bmp b/oldProject/35/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/35/image/digitalWidth375.bmp differ
diff --git a/oldProject/35/image/digitalWidth4.bmp b/oldProject/35/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/35/image/digitalWidth4.bmp differ
diff --git a/oldProject/35/image/digitalWidth475.bmp b/oldProject/35/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/35/image/digitalWidth475.bmp differ
diff --git a/oldProject/35/image/digitalWidth5.bmp b/oldProject/35/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/35/image/digitalWidth5.bmp differ
diff --git a/oldProject/35/image/digitalWidth575.bmp b/oldProject/35/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/35/image/digitalWidth575.bmp differ
diff --git a/oldProject/35/image/digitalWidth6.bmp b/oldProject/35/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/35/image/digitalWidth6.bmp differ
diff --git a/oldProject/35/image/digitalWidth675.bmp b/oldProject/35/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/35/image/digitalWidth675.bmp differ
diff --git a/oldProject/35/image/digitalWidth7.bmp b/oldProject/35/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/35/image/digitalWidth7.bmp differ
diff --git a/oldProject/35/image/digitalWidth775.bmp b/oldProject/35/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/35/image/digitalWidth775.bmp differ
diff --git a/oldProject/35/image/digitalWidth8.bmp b/oldProject/35/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/35/image/digitalWidth8.bmp differ
diff --git a/oldProject/35/image/digitalWidth875.bmp b/oldProject/35/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/35/image/digitalWidth875.bmp differ
diff --git a/oldProject/36/image/digitalWidth1.bmp b/oldProject/36/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/36/image/digitalWidth1.bmp differ
diff --git a/oldProject/36/image/digitalWidth175.bmp b/oldProject/36/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/36/image/digitalWidth175.bmp differ
diff --git a/oldProject/36/image/digitalWidth2.bmp b/oldProject/36/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/36/image/digitalWidth2.bmp differ
diff --git a/oldProject/36/image/digitalWidth275.bmp b/oldProject/36/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/36/image/digitalWidth275.bmp differ
diff --git a/oldProject/36/image/digitalWidth3.bmp b/oldProject/36/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/36/image/digitalWidth3.bmp differ
diff --git a/oldProject/36/image/digitalWidth375.bmp b/oldProject/36/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/36/image/digitalWidth375.bmp differ
diff --git a/oldProject/36/image/digitalWidth4.bmp b/oldProject/36/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/36/image/digitalWidth4.bmp differ
diff --git a/oldProject/36/image/digitalWidth475.bmp b/oldProject/36/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/36/image/digitalWidth475.bmp differ
diff --git a/oldProject/36/image/digitalWidth5.bmp b/oldProject/36/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/36/image/digitalWidth5.bmp differ
diff --git a/oldProject/36/image/digitalWidth575.bmp b/oldProject/36/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/36/image/digitalWidth575.bmp differ
diff --git a/oldProject/36/image/digitalWidth6.bmp b/oldProject/36/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/36/image/digitalWidth6.bmp differ
diff --git a/oldProject/36/image/digitalWidth675.bmp b/oldProject/36/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/36/image/digitalWidth675.bmp differ
diff --git a/oldProject/36/image/digitalWidth7.bmp b/oldProject/36/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/36/image/digitalWidth7.bmp differ
diff --git a/oldProject/36/image/digitalWidth775.bmp b/oldProject/36/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/36/image/digitalWidth775.bmp differ
diff --git a/oldProject/36/image/digitalWidth8.bmp b/oldProject/36/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/36/image/digitalWidth8.bmp differ
diff --git a/oldProject/36/image/digitalWidth875.bmp b/oldProject/36/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/36/image/digitalWidth875.bmp differ
diff --git a/oldProject/37/image/digitalWidth1.bmp b/oldProject/37/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/37/image/digitalWidth1.bmp differ
diff --git a/oldProject/37/image/digitalWidth175.bmp b/oldProject/37/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/37/image/digitalWidth175.bmp differ
diff --git a/oldProject/37/image/digitalWidth2.bmp b/oldProject/37/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/37/image/digitalWidth2.bmp differ
diff --git a/oldProject/37/image/digitalWidth275.bmp b/oldProject/37/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/37/image/digitalWidth275.bmp differ
diff --git a/oldProject/37/image/digitalWidth3.bmp b/oldProject/37/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/37/image/digitalWidth3.bmp differ
diff --git a/oldProject/37/image/digitalWidth375.bmp b/oldProject/37/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/37/image/digitalWidth375.bmp differ
diff --git a/oldProject/37/image/digitalWidth4.bmp b/oldProject/37/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/37/image/digitalWidth4.bmp differ
diff --git a/oldProject/37/image/digitalWidth475.bmp b/oldProject/37/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/37/image/digitalWidth475.bmp differ
diff --git a/oldProject/37/image/digitalWidth5.bmp b/oldProject/37/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/37/image/digitalWidth5.bmp differ
diff --git a/oldProject/37/image/digitalWidth575.bmp b/oldProject/37/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/37/image/digitalWidth575.bmp differ
diff --git a/oldProject/37/image/digitalWidth6.bmp b/oldProject/37/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/37/image/digitalWidth6.bmp differ
diff --git a/oldProject/37/image/digitalWidth675.bmp b/oldProject/37/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/37/image/digitalWidth675.bmp differ
diff --git a/oldProject/37/image/digitalWidth7.bmp b/oldProject/37/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/37/image/digitalWidth7.bmp differ
diff --git a/oldProject/37/image/digitalWidth775.bmp b/oldProject/37/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/37/image/digitalWidth775.bmp differ
diff --git a/oldProject/37/image/digitalWidth8.bmp b/oldProject/37/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/37/image/digitalWidth8.bmp differ
diff --git a/oldProject/37/image/digitalWidth875.bmp b/oldProject/37/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/37/image/digitalWidth875.bmp differ
diff --git a/oldProject/38/image/digitalWidth1.bmp b/oldProject/38/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/38/image/digitalWidth1.bmp differ
diff --git a/oldProject/38/image/digitalWidth175.bmp b/oldProject/38/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/38/image/digitalWidth175.bmp differ
diff --git a/oldProject/38/image/digitalWidth2.bmp b/oldProject/38/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/38/image/digitalWidth2.bmp differ
diff --git a/oldProject/38/image/digitalWidth275.bmp b/oldProject/38/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/38/image/digitalWidth275.bmp differ
diff --git a/oldProject/38/image/digitalWidth3.bmp b/oldProject/38/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/38/image/digitalWidth3.bmp differ
diff --git a/oldProject/38/image/digitalWidth375.bmp b/oldProject/38/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/38/image/digitalWidth375.bmp differ
diff --git a/oldProject/38/image/digitalWidth4.bmp b/oldProject/38/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/38/image/digitalWidth4.bmp differ
diff --git a/oldProject/38/image/digitalWidth475.bmp b/oldProject/38/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/38/image/digitalWidth475.bmp differ
diff --git a/oldProject/38/image/digitalWidth5.bmp b/oldProject/38/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/38/image/digitalWidth5.bmp differ
diff --git a/oldProject/38/image/digitalWidth575.bmp b/oldProject/38/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/38/image/digitalWidth575.bmp differ
diff --git a/oldProject/38/image/digitalWidth6.bmp b/oldProject/38/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/38/image/digitalWidth6.bmp differ
diff --git a/oldProject/38/image/digitalWidth675.bmp b/oldProject/38/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/38/image/digitalWidth675.bmp differ
diff --git a/oldProject/38/image/digitalWidth7.bmp b/oldProject/38/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/38/image/digitalWidth7.bmp differ
diff --git a/oldProject/38/image/digitalWidth775.bmp b/oldProject/38/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/38/image/digitalWidth775.bmp differ
diff --git a/oldProject/38/image/digitalWidth8.bmp b/oldProject/38/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/38/image/digitalWidth8.bmp differ
diff --git a/oldProject/38/image/digitalWidth875.bmp b/oldProject/38/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/38/image/digitalWidth875.bmp differ
diff --git a/oldProject/4/image/digitalWidth1.bmp b/oldProject/4/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/4/image/digitalWidth1.bmp differ
diff --git a/oldProject/4/image/digitalWidth175.bmp b/oldProject/4/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/4/image/digitalWidth175.bmp differ
diff --git a/oldProject/4/image/digitalWidth2.bmp b/oldProject/4/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/4/image/digitalWidth2.bmp differ
diff --git a/oldProject/4/image/digitalWidth275.bmp b/oldProject/4/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/4/image/digitalWidth275.bmp differ
diff --git a/oldProject/4/image/digitalWidth3.bmp b/oldProject/4/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/4/image/digitalWidth3.bmp differ
diff --git a/oldProject/4/image/digitalWidth375.bmp b/oldProject/4/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/4/image/digitalWidth375.bmp differ
diff --git a/oldProject/4/image/digitalWidth4.bmp b/oldProject/4/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/4/image/digitalWidth4.bmp differ
diff --git a/oldProject/4/image/digitalWidth475.bmp b/oldProject/4/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/4/image/digitalWidth475.bmp differ
diff --git a/oldProject/4/image/digitalWidth5.bmp b/oldProject/4/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/4/image/digitalWidth5.bmp differ
diff --git a/oldProject/4/image/digitalWidth575.bmp b/oldProject/4/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/4/image/digitalWidth575.bmp differ
diff --git a/oldProject/4/image/digitalWidth6.bmp b/oldProject/4/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/4/image/digitalWidth6.bmp differ
diff --git a/oldProject/4/image/digitalWidth675.bmp b/oldProject/4/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/4/image/digitalWidth675.bmp differ
diff --git a/oldProject/4/image/digitalWidth7.bmp b/oldProject/4/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/4/image/digitalWidth7.bmp differ
diff --git a/oldProject/4/image/digitalWidth775.bmp b/oldProject/4/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/4/image/digitalWidth775.bmp differ
diff --git a/oldProject/4/image/digitalWidth8.bmp b/oldProject/4/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/4/image/digitalWidth8.bmp differ
diff --git a/oldProject/4/image/digitalWidth875.bmp b/oldProject/4/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/4/image/digitalWidth875.bmp differ
diff --git a/oldProject/40/image/digitalWidth1.bmp b/oldProject/40/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/40/image/digitalWidth1.bmp differ
diff --git a/oldProject/40/image/digitalWidth175.bmp b/oldProject/40/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/40/image/digitalWidth175.bmp differ
diff --git a/oldProject/40/image/digitalWidth2.bmp b/oldProject/40/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/40/image/digitalWidth2.bmp differ
diff --git a/oldProject/40/image/digitalWidth275.bmp b/oldProject/40/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/40/image/digitalWidth275.bmp differ
diff --git a/oldProject/40/image/digitalWidth3.bmp b/oldProject/40/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/40/image/digitalWidth3.bmp differ
diff --git a/oldProject/40/image/digitalWidth375.bmp b/oldProject/40/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/40/image/digitalWidth375.bmp differ
diff --git a/oldProject/40/image/digitalWidth4.bmp b/oldProject/40/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/40/image/digitalWidth4.bmp differ
diff --git a/oldProject/40/image/digitalWidth475.bmp b/oldProject/40/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/40/image/digitalWidth475.bmp differ
diff --git a/oldProject/40/image/digitalWidth5.bmp b/oldProject/40/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/40/image/digitalWidth5.bmp differ
diff --git a/oldProject/40/image/digitalWidth575.bmp b/oldProject/40/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/40/image/digitalWidth575.bmp differ
diff --git a/oldProject/40/image/digitalWidth6.bmp b/oldProject/40/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/40/image/digitalWidth6.bmp differ
diff --git a/oldProject/40/image/digitalWidth675.bmp b/oldProject/40/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/40/image/digitalWidth675.bmp differ
diff --git a/oldProject/40/image/digitalWidth7.bmp b/oldProject/40/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/40/image/digitalWidth7.bmp differ
diff --git a/oldProject/40/image/digitalWidth775.bmp b/oldProject/40/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/40/image/digitalWidth775.bmp differ
diff --git a/oldProject/40/image/digitalWidth8.bmp b/oldProject/40/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/40/image/digitalWidth8.bmp differ
diff --git a/oldProject/40/image/digitalWidth875.bmp b/oldProject/40/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/40/image/digitalWidth875.bmp differ
diff --git a/oldProject/41/image/digitalWidth1.bmp b/oldProject/41/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/41/image/digitalWidth1.bmp differ
diff --git a/oldProject/41/image/digitalWidth175.bmp b/oldProject/41/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/41/image/digitalWidth175.bmp differ
diff --git a/oldProject/41/image/digitalWidth2.bmp b/oldProject/41/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/41/image/digitalWidth2.bmp differ
diff --git a/oldProject/41/image/digitalWidth275.bmp b/oldProject/41/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/41/image/digitalWidth275.bmp differ
diff --git a/oldProject/41/image/digitalWidth3.bmp b/oldProject/41/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/41/image/digitalWidth3.bmp differ
diff --git a/oldProject/41/image/digitalWidth375.bmp b/oldProject/41/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/41/image/digitalWidth375.bmp differ
diff --git a/oldProject/41/image/digitalWidth4.bmp b/oldProject/41/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/41/image/digitalWidth4.bmp differ
diff --git a/oldProject/41/image/digitalWidth475.bmp b/oldProject/41/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/41/image/digitalWidth475.bmp differ
diff --git a/oldProject/41/image/digitalWidth5.bmp b/oldProject/41/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/41/image/digitalWidth5.bmp differ
diff --git a/oldProject/41/image/digitalWidth575.bmp b/oldProject/41/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/41/image/digitalWidth575.bmp differ
diff --git a/oldProject/41/image/digitalWidth6.bmp b/oldProject/41/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/41/image/digitalWidth6.bmp differ
diff --git a/oldProject/41/image/digitalWidth675.bmp b/oldProject/41/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/41/image/digitalWidth675.bmp differ
diff --git a/oldProject/41/image/digitalWidth7.bmp b/oldProject/41/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/41/image/digitalWidth7.bmp differ
diff --git a/oldProject/41/image/digitalWidth775.bmp b/oldProject/41/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/41/image/digitalWidth775.bmp differ
diff --git a/oldProject/41/image/digitalWidth8.bmp b/oldProject/41/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/41/image/digitalWidth8.bmp differ
diff --git a/oldProject/41/image/digitalWidth875.bmp b/oldProject/41/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/41/image/digitalWidth875.bmp differ
diff --git a/oldProject/42/image/digitalWidth1.bmp b/oldProject/42/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/42/image/digitalWidth1.bmp differ
diff --git a/oldProject/42/image/digitalWidth175.bmp b/oldProject/42/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/42/image/digitalWidth175.bmp differ
diff --git a/oldProject/42/image/digitalWidth2.bmp b/oldProject/42/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/42/image/digitalWidth2.bmp differ
diff --git a/oldProject/42/image/digitalWidth275.bmp b/oldProject/42/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/42/image/digitalWidth275.bmp differ
diff --git a/oldProject/42/image/digitalWidth3.bmp b/oldProject/42/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/42/image/digitalWidth3.bmp differ
diff --git a/oldProject/42/image/digitalWidth375.bmp b/oldProject/42/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/42/image/digitalWidth375.bmp differ
diff --git a/oldProject/42/image/digitalWidth4.bmp b/oldProject/42/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/42/image/digitalWidth4.bmp differ
diff --git a/oldProject/42/image/digitalWidth475.bmp b/oldProject/42/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/42/image/digitalWidth475.bmp differ
diff --git a/oldProject/42/image/digitalWidth5.bmp b/oldProject/42/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/42/image/digitalWidth5.bmp differ
diff --git a/oldProject/42/image/digitalWidth575.bmp b/oldProject/42/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/42/image/digitalWidth575.bmp differ
diff --git a/oldProject/42/image/digitalWidth6.bmp b/oldProject/42/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/42/image/digitalWidth6.bmp differ
diff --git a/oldProject/42/image/digitalWidth675.bmp b/oldProject/42/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/42/image/digitalWidth675.bmp differ
diff --git a/oldProject/42/image/digitalWidth7.bmp b/oldProject/42/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/42/image/digitalWidth7.bmp differ
diff --git a/oldProject/42/image/digitalWidth775.bmp b/oldProject/42/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/42/image/digitalWidth775.bmp differ
diff --git a/oldProject/42/image/digitalWidth8.bmp b/oldProject/42/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/42/image/digitalWidth8.bmp differ
diff --git a/oldProject/42/image/digitalWidth875.bmp b/oldProject/42/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/42/image/digitalWidth875.bmp differ
diff --git a/oldProject/43/image/digitalWidth1.bmp b/oldProject/43/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/43/image/digitalWidth1.bmp differ
diff --git a/oldProject/43/image/digitalWidth175.bmp b/oldProject/43/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/43/image/digitalWidth175.bmp differ
diff --git a/oldProject/43/image/digitalWidth2.bmp b/oldProject/43/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/43/image/digitalWidth2.bmp differ
diff --git a/oldProject/43/image/digitalWidth275.bmp b/oldProject/43/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/43/image/digitalWidth275.bmp differ
diff --git a/oldProject/43/image/digitalWidth3.bmp b/oldProject/43/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/43/image/digitalWidth3.bmp differ
diff --git a/oldProject/43/image/digitalWidth375.bmp b/oldProject/43/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/43/image/digitalWidth375.bmp differ
diff --git a/oldProject/43/image/digitalWidth4.bmp b/oldProject/43/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/43/image/digitalWidth4.bmp differ
diff --git a/oldProject/43/image/digitalWidth475.bmp b/oldProject/43/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/43/image/digitalWidth475.bmp differ
diff --git a/oldProject/43/image/digitalWidth5.bmp b/oldProject/43/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/43/image/digitalWidth5.bmp differ
diff --git a/oldProject/43/image/digitalWidth575.bmp b/oldProject/43/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/43/image/digitalWidth575.bmp differ
diff --git a/oldProject/43/image/digitalWidth6.bmp b/oldProject/43/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/43/image/digitalWidth6.bmp differ
diff --git a/oldProject/43/image/digitalWidth675.bmp b/oldProject/43/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/43/image/digitalWidth675.bmp differ
diff --git a/oldProject/43/image/digitalWidth7.bmp b/oldProject/43/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/43/image/digitalWidth7.bmp differ
diff --git a/oldProject/43/image/digitalWidth775.bmp b/oldProject/43/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/43/image/digitalWidth775.bmp differ
diff --git a/oldProject/43/image/digitalWidth8.bmp b/oldProject/43/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/43/image/digitalWidth8.bmp differ
diff --git a/oldProject/43/image/digitalWidth875.bmp b/oldProject/43/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/43/image/digitalWidth875.bmp differ
diff --git a/oldProject/44/image/digitalWidth1.bmp b/oldProject/44/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/44/image/digitalWidth1.bmp differ
diff --git a/oldProject/44/image/digitalWidth175.bmp b/oldProject/44/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/44/image/digitalWidth175.bmp differ
diff --git a/oldProject/44/image/digitalWidth2.bmp b/oldProject/44/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/44/image/digitalWidth2.bmp differ
diff --git a/oldProject/44/image/digitalWidth275.bmp b/oldProject/44/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/44/image/digitalWidth275.bmp differ
diff --git a/oldProject/44/image/digitalWidth3.bmp b/oldProject/44/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/44/image/digitalWidth3.bmp differ
diff --git a/oldProject/44/image/digitalWidth375.bmp b/oldProject/44/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/44/image/digitalWidth375.bmp differ
diff --git a/oldProject/44/image/digitalWidth4.bmp b/oldProject/44/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/44/image/digitalWidth4.bmp differ
diff --git a/oldProject/44/image/digitalWidth475.bmp b/oldProject/44/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/44/image/digitalWidth475.bmp differ
diff --git a/oldProject/44/image/digitalWidth5.bmp b/oldProject/44/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/44/image/digitalWidth5.bmp differ
diff --git a/oldProject/44/image/digitalWidth575.bmp b/oldProject/44/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/44/image/digitalWidth575.bmp differ
diff --git a/oldProject/44/image/digitalWidth6.bmp b/oldProject/44/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/44/image/digitalWidth6.bmp differ
diff --git a/oldProject/44/image/digitalWidth675.bmp b/oldProject/44/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/44/image/digitalWidth675.bmp differ
diff --git a/oldProject/44/image/digitalWidth7.bmp b/oldProject/44/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/44/image/digitalWidth7.bmp differ
diff --git a/oldProject/44/image/digitalWidth775.bmp b/oldProject/44/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/44/image/digitalWidth775.bmp differ
diff --git a/oldProject/44/image/digitalWidth8.bmp b/oldProject/44/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/44/image/digitalWidth8.bmp differ
diff --git a/oldProject/44/image/digitalWidth875.bmp b/oldProject/44/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/44/image/digitalWidth875.bmp differ
diff --git a/oldProject/45/image/digitalWidth1.bmp b/oldProject/45/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/45/image/digitalWidth1.bmp differ
diff --git a/oldProject/45/image/digitalWidth175.bmp b/oldProject/45/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/45/image/digitalWidth175.bmp differ
diff --git a/oldProject/45/image/digitalWidth2.bmp b/oldProject/45/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/45/image/digitalWidth2.bmp differ
diff --git a/oldProject/45/image/digitalWidth275.bmp b/oldProject/45/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/45/image/digitalWidth275.bmp differ
diff --git a/oldProject/45/image/digitalWidth3.bmp b/oldProject/45/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/45/image/digitalWidth3.bmp differ
diff --git a/oldProject/45/image/digitalWidth375.bmp b/oldProject/45/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/45/image/digitalWidth375.bmp differ
diff --git a/oldProject/45/image/digitalWidth4.bmp b/oldProject/45/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/45/image/digitalWidth4.bmp differ
diff --git a/oldProject/45/image/digitalWidth475.bmp b/oldProject/45/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/45/image/digitalWidth475.bmp differ
diff --git a/oldProject/45/image/digitalWidth5.bmp b/oldProject/45/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/45/image/digitalWidth5.bmp differ
diff --git a/oldProject/45/image/digitalWidth575.bmp b/oldProject/45/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/45/image/digitalWidth575.bmp differ
diff --git a/oldProject/45/image/digitalWidth6.bmp b/oldProject/45/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/45/image/digitalWidth6.bmp differ
diff --git a/oldProject/45/image/digitalWidth675.bmp b/oldProject/45/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/45/image/digitalWidth675.bmp differ
diff --git a/oldProject/45/image/digitalWidth7.bmp b/oldProject/45/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/45/image/digitalWidth7.bmp differ
diff --git a/oldProject/45/image/digitalWidth775.bmp b/oldProject/45/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/45/image/digitalWidth775.bmp differ
diff --git a/oldProject/45/image/digitalWidth8.bmp b/oldProject/45/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/45/image/digitalWidth8.bmp differ
diff --git a/oldProject/45/image/digitalWidth875.bmp b/oldProject/45/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/45/image/digitalWidth875.bmp differ
diff --git a/oldProject/46/image/digitalWidth1.bmp b/oldProject/46/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/46/image/digitalWidth1.bmp differ
diff --git a/oldProject/46/image/digitalWidth175.bmp b/oldProject/46/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/46/image/digitalWidth175.bmp differ
diff --git a/oldProject/46/image/digitalWidth2.bmp b/oldProject/46/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/46/image/digitalWidth2.bmp differ
diff --git a/oldProject/46/image/digitalWidth275.bmp b/oldProject/46/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/46/image/digitalWidth275.bmp differ
diff --git a/oldProject/46/image/digitalWidth3.bmp b/oldProject/46/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/46/image/digitalWidth3.bmp differ
diff --git a/oldProject/46/image/digitalWidth375.bmp b/oldProject/46/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/46/image/digitalWidth375.bmp differ
diff --git a/oldProject/46/image/digitalWidth4.bmp b/oldProject/46/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/46/image/digitalWidth4.bmp differ
diff --git a/oldProject/46/image/digitalWidth475.bmp b/oldProject/46/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/46/image/digitalWidth475.bmp differ
diff --git a/oldProject/46/image/digitalWidth5.bmp b/oldProject/46/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/46/image/digitalWidth5.bmp differ
diff --git a/oldProject/46/image/digitalWidth575.bmp b/oldProject/46/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/46/image/digitalWidth575.bmp differ
diff --git a/oldProject/46/image/digitalWidth6.bmp b/oldProject/46/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/46/image/digitalWidth6.bmp differ
diff --git a/oldProject/46/image/digitalWidth675.bmp b/oldProject/46/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/46/image/digitalWidth675.bmp differ
diff --git a/oldProject/46/image/digitalWidth7.bmp b/oldProject/46/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/46/image/digitalWidth7.bmp differ
diff --git a/oldProject/46/image/digitalWidth775.bmp b/oldProject/46/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/46/image/digitalWidth775.bmp differ
diff --git a/oldProject/46/image/digitalWidth8.bmp b/oldProject/46/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/46/image/digitalWidth8.bmp differ
diff --git a/oldProject/46/image/digitalWidth875.bmp b/oldProject/46/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/46/image/digitalWidth875.bmp differ
diff --git a/oldProject/47/image (╕┤╝■)/digitalWidth1.bmp b/oldProject/47/image (╕┤╝■)/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/47/image (╕┤╝■)/digitalWidth1.bmp differ
diff --git a/oldProject/47/image (╕┤╝■)/digitalWidth175.bmp b/oldProject/47/image (╕┤╝■)/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/47/image (╕┤╝■)/digitalWidth175.bmp differ
diff --git a/oldProject/47/image (╕┤╝■)/digitalWidth2.bmp b/oldProject/47/image (╕┤╝■)/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/47/image (╕┤╝■)/digitalWidth2.bmp differ
diff --git a/oldProject/47/image (╕┤╝■)/digitalWidth275.bmp b/oldProject/47/image (╕┤╝■)/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/47/image (╕┤╝■)/digitalWidth275.bmp differ
diff --git a/oldProject/47/image (╕┤╝■)/digitalWidth3.bmp b/oldProject/47/image (╕┤╝■)/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/47/image (╕┤╝■)/digitalWidth3.bmp differ
diff --git a/oldProject/47/image (╕┤╝■)/digitalWidth375.bmp b/oldProject/47/image (╕┤╝■)/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/47/image (╕┤╝■)/digitalWidth375.bmp differ
diff --git a/oldProject/47/image (╕┤╝■)/digitalWidth4.bmp b/oldProject/47/image (╕┤╝■)/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/47/image (╕┤╝■)/digitalWidth4.bmp differ
diff --git a/oldProject/47/image (╕┤╝■)/digitalWidth475.bmp b/oldProject/47/image (╕┤╝■)/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/47/image (╕┤╝■)/digitalWidth475.bmp differ
diff --git a/oldProject/47/image (╕┤╝■)/digitalWidth5.bmp b/oldProject/47/image (╕┤╝■)/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/47/image (╕┤╝■)/digitalWidth5.bmp differ
diff --git a/oldProject/47/image (╕┤╝■)/digitalWidth575.bmp b/oldProject/47/image (╕┤╝■)/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/47/image (╕┤╝■)/digitalWidth575.bmp differ
diff --git a/oldProject/47/image (╕┤╝■)/digitalWidth6.bmp b/oldProject/47/image (╕┤╝■)/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/47/image (╕┤╝■)/digitalWidth6.bmp differ
diff --git a/oldProject/47/image (╕┤╝■)/digitalWidth675.bmp b/oldProject/47/image (╕┤╝■)/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/47/image (╕┤╝■)/digitalWidth675.bmp differ
diff --git a/oldProject/47/image (╕┤╝■)/digitalWidth7.bmp b/oldProject/47/image (╕┤╝■)/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/47/image (╕┤╝■)/digitalWidth7.bmp differ
diff --git a/oldProject/47/image (╕┤╝■)/digitalWidth775.bmp b/oldProject/47/image (╕┤╝■)/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/47/image (╕┤╝■)/digitalWidth775.bmp differ
diff --git a/oldProject/47/image (╕┤╝■)/digitalWidth8.bmp b/oldProject/47/image (╕┤╝■)/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/47/image (╕┤╝■)/digitalWidth8.bmp differ
diff --git a/oldProject/47/image (╕┤╝■)/digitalWidth875.bmp b/oldProject/47/image (╕┤╝■)/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/47/image (╕┤╝■)/digitalWidth875.bmp differ
diff --git a/oldProject/47/image.tar.gz b/oldProject/47/image.tar.gz
new file mode 100644
index 0000000..953eecb
Binary files /dev/null and b/oldProject/47/image.tar.gz differ
diff --git a/oldProject/47/image/digitalWidth1.bmp b/oldProject/47/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/47/image/digitalWidth1.bmp differ
diff --git a/oldProject/47/image/digitalWidth175.bmp b/oldProject/47/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/47/image/digitalWidth175.bmp differ
diff --git a/oldProject/47/image/digitalWidth2.bmp b/oldProject/47/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/47/image/digitalWidth2.bmp differ
diff --git a/oldProject/47/image/digitalWidth275.bmp b/oldProject/47/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/47/image/digitalWidth275.bmp differ
diff --git a/oldProject/47/image/digitalWidth3.bmp b/oldProject/47/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/47/image/digitalWidth3.bmp differ
diff --git a/oldProject/47/image/digitalWidth375.bmp b/oldProject/47/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/47/image/digitalWidth375.bmp differ
diff --git a/oldProject/47/image/digitalWidth4.bmp b/oldProject/47/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/47/image/digitalWidth4.bmp differ
diff --git a/oldProject/47/image/digitalWidth475.bmp b/oldProject/47/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/47/image/digitalWidth475.bmp differ
diff --git a/oldProject/47/image/digitalWidth5.bmp b/oldProject/47/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/47/image/digitalWidth5.bmp differ
diff --git a/oldProject/47/image/digitalWidth575.bmp b/oldProject/47/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/47/image/digitalWidth575.bmp differ
diff --git a/oldProject/47/image/digitalWidth6.bmp b/oldProject/47/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/47/image/digitalWidth6.bmp differ
diff --git a/oldProject/47/image/digitalWidth675.bmp b/oldProject/47/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/47/image/digitalWidth675.bmp differ
diff --git a/oldProject/47/image/digitalWidth7.bmp b/oldProject/47/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/47/image/digitalWidth7.bmp differ
diff --git a/oldProject/47/image/digitalWidth775.bmp b/oldProject/47/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/47/image/digitalWidth775.bmp differ
diff --git a/oldProject/47/image/digitalWidth8.bmp b/oldProject/47/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/47/image/digitalWidth8.bmp differ
diff --git a/oldProject/47/image/digitalWidth875.bmp b/oldProject/47/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/47/image/digitalWidth875.bmp differ
diff --git a/oldProject/48/image/digitalWidth1.bmp b/oldProject/48/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/48/image/digitalWidth1.bmp differ
diff --git a/oldProject/48/image/digitalWidth175.bmp b/oldProject/48/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/48/image/digitalWidth175.bmp differ
diff --git a/oldProject/48/image/digitalWidth2.bmp b/oldProject/48/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/48/image/digitalWidth2.bmp differ
diff --git a/oldProject/48/image/digitalWidth275.bmp b/oldProject/48/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/48/image/digitalWidth275.bmp differ
diff --git a/oldProject/48/image/digitalWidth3.bmp b/oldProject/48/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/48/image/digitalWidth3.bmp differ
diff --git a/oldProject/48/image/digitalWidth375.bmp b/oldProject/48/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/48/image/digitalWidth375.bmp differ
diff --git a/oldProject/48/image/digitalWidth4.bmp b/oldProject/48/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/48/image/digitalWidth4.bmp differ
diff --git a/oldProject/48/image/digitalWidth475.bmp b/oldProject/48/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/48/image/digitalWidth475.bmp differ
diff --git a/oldProject/48/image/digitalWidth5.bmp b/oldProject/48/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/48/image/digitalWidth5.bmp differ
diff --git a/oldProject/48/image/digitalWidth575.bmp b/oldProject/48/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/48/image/digitalWidth575.bmp differ
diff --git a/oldProject/48/image/digitalWidth6.bmp b/oldProject/48/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/48/image/digitalWidth6.bmp differ
diff --git a/oldProject/48/image/digitalWidth675.bmp b/oldProject/48/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/48/image/digitalWidth675.bmp differ
diff --git a/oldProject/48/image/digitalWidth7.bmp b/oldProject/48/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/48/image/digitalWidth7.bmp differ
diff --git a/oldProject/48/image/digitalWidth775.bmp b/oldProject/48/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/48/image/digitalWidth775.bmp differ
diff --git a/oldProject/48/image/digitalWidth8.bmp b/oldProject/48/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/48/image/digitalWidth8.bmp differ
diff --git a/oldProject/48/image/digitalWidth875.bmp b/oldProject/48/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/48/image/digitalWidth875.bmp differ
diff --git a/oldProject/4varRam.png b/oldProject/4varRam.png
new file mode 100644
index 0000000..6dc7444
Binary files /dev/null and b/oldProject/4varRam.png differ
diff --git a/oldProject/5/image/digitalWidth1.bmp b/oldProject/5/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/5/image/digitalWidth1.bmp differ
diff --git a/oldProject/5/image/digitalWidth175.bmp b/oldProject/5/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/5/image/digitalWidth175.bmp differ
diff --git a/oldProject/5/image/digitalWidth2.bmp b/oldProject/5/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/5/image/digitalWidth2.bmp differ
diff --git a/oldProject/5/image/digitalWidth275.bmp b/oldProject/5/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/5/image/digitalWidth275.bmp differ
diff --git a/oldProject/5/image/digitalWidth3.bmp b/oldProject/5/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/5/image/digitalWidth3.bmp differ
diff --git a/oldProject/5/image/digitalWidth375.bmp b/oldProject/5/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/5/image/digitalWidth375.bmp differ
diff --git a/oldProject/5/image/digitalWidth4.bmp b/oldProject/5/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/5/image/digitalWidth4.bmp differ
diff --git a/oldProject/5/image/digitalWidth475.bmp b/oldProject/5/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/5/image/digitalWidth475.bmp differ
diff --git a/oldProject/5/image/digitalWidth5.bmp b/oldProject/5/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/5/image/digitalWidth5.bmp differ
diff --git a/oldProject/5/image/digitalWidth575.bmp b/oldProject/5/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/5/image/digitalWidth575.bmp differ
diff --git a/oldProject/5/image/digitalWidth6.bmp b/oldProject/5/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/5/image/digitalWidth6.bmp differ
diff --git a/oldProject/5/image/digitalWidth675.bmp b/oldProject/5/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/5/image/digitalWidth675.bmp differ
diff --git a/oldProject/5/image/digitalWidth7.bmp b/oldProject/5/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/5/image/digitalWidth7.bmp differ
diff --git a/oldProject/5/image/digitalWidth775.bmp b/oldProject/5/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/5/image/digitalWidth775.bmp differ
diff --git a/oldProject/5/image/digitalWidth8.bmp b/oldProject/5/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/5/image/digitalWidth8.bmp differ
diff --git a/oldProject/5/image/digitalWidth875.bmp b/oldProject/5/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/5/image/digitalWidth875.bmp differ
diff --git a/oldProject/50/image/digitalWidth1.bmp b/oldProject/50/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/50/image/digitalWidth1.bmp differ
diff --git a/oldProject/50/image/digitalWidth175.bmp b/oldProject/50/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/50/image/digitalWidth175.bmp differ
diff --git a/oldProject/50/image/digitalWidth2.bmp b/oldProject/50/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/50/image/digitalWidth2.bmp differ
diff --git a/oldProject/50/image/digitalWidth275.bmp b/oldProject/50/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/50/image/digitalWidth275.bmp differ
diff --git a/oldProject/50/image/digitalWidth3.bmp b/oldProject/50/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/50/image/digitalWidth3.bmp differ
diff --git a/oldProject/50/image/digitalWidth375.bmp b/oldProject/50/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/50/image/digitalWidth375.bmp differ
diff --git a/oldProject/50/image/digitalWidth4.bmp b/oldProject/50/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/50/image/digitalWidth4.bmp differ
diff --git a/oldProject/50/image/digitalWidth475.bmp b/oldProject/50/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/50/image/digitalWidth475.bmp differ
diff --git a/oldProject/50/image/digitalWidth5.bmp b/oldProject/50/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/50/image/digitalWidth5.bmp differ
diff --git a/oldProject/50/image/digitalWidth575.bmp b/oldProject/50/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/50/image/digitalWidth575.bmp differ
diff --git a/oldProject/50/image/digitalWidth6.bmp b/oldProject/50/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/50/image/digitalWidth6.bmp differ
diff --git a/oldProject/50/image/digitalWidth675.bmp b/oldProject/50/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/50/image/digitalWidth675.bmp differ
diff --git a/oldProject/50/image/digitalWidth7.bmp b/oldProject/50/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/50/image/digitalWidth7.bmp differ
diff --git a/oldProject/50/image/digitalWidth775.bmp b/oldProject/50/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/50/image/digitalWidth775.bmp differ
diff --git a/oldProject/50/image/digitalWidth8.bmp b/oldProject/50/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/50/image/digitalWidth8.bmp differ
diff --git a/oldProject/50/image/digitalWidth875.bmp b/oldProject/50/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/50/image/digitalWidth875.bmp differ
diff --git a/oldProject/51/image/digitalWidth1.bmp b/oldProject/51/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/51/image/digitalWidth1.bmp differ
diff --git a/oldProject/51/image/digitalWidth175.bmp b/oldProject/51/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/51/image/digitalWidth175.bmp differ
diff --git a/oldProject/51/image/digitalWidth2.bmp b/oldProject/51/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/51/image/digitalWidth2.bmp differ
diff --git a/oldProject/51/image/digitalWidth275.bmp b/oldProject/51/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/51/image/digitalWidth275.bmp differ
diff --git a/oldProject/51/image/digitalWidth3.bmp b/oldProject/51/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/51/image/digitalWidth3.bmp differ
diff --git a/oldProject/51/image/digitalWidth375.bmp b/oldProject/51/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/51/image/digitalWidth375.bmp differ
diff --git a/oldProject/51/image/digitalWidth4.bmp b/oldProject/51/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/51/image/digitalWidth4.bmp differ
diff --git a/oldProject/51/image/digitalWidth475.bmp b/oldProject/51/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/51/image/digitalWidth475.bmp differ
diff --git a/oldProject/51/image/digitalWidth5.bmp b/oldProject/51/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/51/image/digitalWidth5.bmp differ
diff --git a/oldProject/51/image/digitalWidth575.bmp b/oldProject/51/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/51/image/digitalWidth575.bmp differ
diff --git a/oldProject/51/image/digitalWidth6.bmp b/oldProject/51/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/51/image/digitalWidth6.bmp differ
diff --git a/oldProject/51/image/digitalWidth675.bmp b/oldProject/51/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/51/image/digitalWidth675.bmp differ
diff --git a/oldProject/51/image/digitalWidth7.bmp b/oldProject/51/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/51/image/digitalWidth7.bmp differ
diff --git a/oldProject/51/image/digitalWidth775.bmp b/oldProject/51/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/51/image/digitalWidth775.bmp differ
diff --git a/oldProject/51/image/digitalWidth8.bmp b/oldProject/51/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/51/image/digitalWidth8.bmp differ
diff --git a/oldProject/51/image/digitalWidth875.bmp b/oldProject/51/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/51/image/digitalWidth875.bmp differ
diff --git a/oldProject/52/image/digitalWidth1.bmp b/oldProject/52/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/52/image/digitalWidth1.bmp differ
diff --git a/oldProject/52/image/digitalWidth175.bmp b/oldProject/52/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/52/image/digitalWidth175.bmp differ
diff --git a/oldProject/52/image/digitalWidth2.bmp b/oldProject/52/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/52/image/digitalWidth2.bmp differ
diff --git a/oldProject/52/image/digitalWidth275.bmp b/oldProject/52/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/52/image/digitalWidth275.bmp differ
diff --git a/oldProject/52/image/digitalWidth3.bmp b/oldProject/52/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/52/image/digitalWidth3.bmp differ
diff --git a/oldProject/52/image/digitalWidth375.bmp b/oldProject/52/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/52/image/digitalWidth375.bmp differ
diff --git a/oldProject/52/image/digitalWidth4.bmp b/oldProject/52/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/52/image/digitalWidth4.bmp differ
diff --git a/oldProject/52/image/digitalWidth475.bmp b/oldProject/52/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/52/image/digitalWidth475.bmp differ
diff --git a/oldProject/52/image/digitalWidth5.bmp b/oldProject/52/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/52/image/digitalWidth5.bmp differ
diff --git a/oldProject/52/image/digitalWidth575.bmp b/oldProject/52/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/52/image/digitalWidth575.bmp differ
diff --git a/oldProject/52/image/digitalWidth6.bmp b/oldProject/52/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/52/image/digitalWidth6.bmp differ
diff --git a/oldProject/52/image/digitalWidth675.bmp b/oldProject/52/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/52/image/digitalWidth675.bmp differ
diff --git a/oldProject/52/image/digitalWidth7.bmp b/oldProject/52/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/52/image/digitalWidth7.bmp differ
diff --git a/oldProject/52/image/digitalWidth775.bmp b/oldProject/52/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/52/image/digitalWidth775.bmp differ
diff --git a/oldProject/52/image/digitalWidth8.bmp b/oldProject/52/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/52/image/digitalWidth8.bmp differ
diff --git a/oldProject/52/image/digitalWidth875.bmp b/oldProject/52/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/52/image/digitalWidth875.bmp differ
diff --git a/oldProject/53/image/digitalWidth1.bmp b/oldProject/53/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/53/image/digitalWidth1.bmp differ
diff --git a/oldProject/53/image/digitalWidth175.bmp b/oldProject/53/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/53/image/digitalWidth175.bmp differ
diff --git a/oldProject/53/image/digitalWidth2.bmp b/oldProject/53/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/53/image/digitalWidth2.bmp differ
diff --git a/oldProject/53/image/digitalWidth275.bmp b/oldProject/53/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/53/image/digitalWidth275.bmp differ
diff --git a/oldProject/53/image/digitalWidth3.bmp b/oldProject/53/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/53/image/digitalWidth3.bmp differ
diff --git a/oldProject/53/image/digitalWidth375.bmp b/oldProject/53/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/53/image/digitalWidth375.bmp differ
diff --git a/oldProject/53/image/digitalWidth4.bmp b/oldProject/53/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/53/image/digitalWidth4.bmp differ
diff --git a/oldProject/53/image/digitalWidth475.bmp b/oldProject/53/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/53/image/digitalWidth475.bmp differ
diff --git a/oldProject/53/image/digitalWidth5.bmp b/oldProject/53/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/53/image/digitalWidth5.bmp differ
diff --git a/oldProject/53/image/digitalWidth575.bmp b/oldProject/53/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/53/image/digitalWidth575.bmp differ
diff --git a/oldProject/53/image/digitalWidth6.bmp b/oldProject/53/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/53/image/digitalWidth6.bmp differ
diff --git a/oldProject/53/image/digitalWidth675.bmp b/oldProject/53/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/53/image/digitalWidth675.bmp differ
diff --git a/oldProject/53/image/digitalWidth7.bmp b/oldProject/53/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/53/image/digitalWidth7.bmp differ
diff --git a/oldProject/53/image/digitalWidth775.bmp b/oldProject/53/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/53/image/digitalWidth775.bmp differ
diff --git a/oldProject/53/image/digitalWidth8.bmp b/oldProject/53/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/53/image/digitalWidth8.bmp differ
diff --git a/oldProject/53/image/digitalWidth875.bmp b/oldProject/53/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/53/image/digitalWidth875.bmp differ
diff --git a/oldProject/54/image/digitalWidth1.bmp b/oldProject/54/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/54/image/digitalWidth1.bmp differ
diff --git a/oldProject/54/image/digitalWidth175.bmp b/oldProject/54/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/54/image/digitalWidth175.bmp differ
diff --git a/oldProject/54/image/digitalWidth2.bmp b/oldProject/54/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/54/image/digitalWidth2.bmp differ
diff --git a/oldProject/54/image/digitalWidth275.bmp b/oldProject/54/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/54/image/digitalWidth275.bmp differ
diff --git a/oldProject/54/image/digitalWidth3.bmp b/oldProject/54/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/54/image/digitalWidth3.bmp differ
diff --git a/oldProject/54/image/digitalWidth375.bmp b/oldProject/54/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/54/image/digitalWidth375.bmp differ
diff --git a/oldProject/54/image/digitalWidth4.bmp b/oldProject/54/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/54/image/digitalWidth4.bmp differ
diff --git a/oldProject/54/image/digitalWidth475.bmp b/oldProject/54/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/54/image/digitalWidth475.bmp differ
diff --git a/oldProject/54/image/digitalWidth5.bmp b/oldProject/54/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/54/image/digitalWidth5.bmp differ
diff --git a/oldProject/54/image/digitalWidth575.bmp b/oldProject/54/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/54/image/digitalWidth575.bmp differ
diff --git a/oldProject/54/image/digitalWidth6.bmp b/oldProject/54/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/54/image/digitalWidth6.bmp differ
diff --git a/oldProject/54/image/digitalWidth675.bmp b/oldProject/54/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/54/image/digitalWidth675.bmp differ
diff --git a/oldProject/54/image/digitalWidth7.bmp b/oldProject/54/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/54/image/digitalWidth7.bmp differ
diff --git a/oldProject/54/image/digitalWidth775.bmp b/oldProject/54/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/54/image/digitalWidth775.bmp differ
diff --git a/oldProject/54/image/digitalWidth8.bmp b/oldProject/54/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/54/image/digitalWidth8.bmp differ
diff --git a/oldProject/54/image/digitalWidth875.bmp b/oldProject/54/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/54/image/digitalWidth875.bmp differ
diff --git a/oldProject/55/image/digitalWidth1.bmp b/oldProject/55/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/55/image/digitalWidth1.bmp differ
diff --git a/oldProject/55/image/digitalWidth175.bmp b/oldProject/55/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/55/image/digitalWidth175.bmp differ
diff --git a/oldProject/55/image/digitalWidth2.bmp b/oldProject/55/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/55/image/digitalWidth2.bmp differ
diff --git a/oldProject/55/image/digitalWidth275.bmp b/oldProject/55/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/55/image/digitalWidth275.bmp differ
diff --git a/oldProject/55/image/digitalWidth3.bmp b/oldProject/55/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/55/image/digitalWidth3.bmp differ
diff --git a/oldProject/55/image/digitalWidth375.bmp b/oldProject/55/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/55/image/digitalWidth375.bmp differ
diff --git a/oldProject/55/image/digitalWidth4.bmp b/oldProject/55/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/55/image/digitalWidth4.bmp differ
diff --git a/oldProject/55/image/digitalWidth475.bmp b/oldProject/55/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/55/image/digitalWidth475.bmp differ
diff --git a/oldProject/55/image/digitalWidth5.bmp b/oldProject/55/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/55/image/digitalWidth5.bmp differ
diff --git a/oldProject/55/image/digitalWidth575.bmp b/oldProject/55/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/55/image/digitalWidth575.bmp differ
diff --git a/oldProject/55/image/digitalWidth6.bmp b/oldProject/55/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/55/image/digitalWidth6.bmp differ
diff --git a/oldProject/55/image/digitalWidth675.bmp b/oldProject/55/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/55/image/digitalWidth675.bmp differ
diff --git a/oldProject/55/image/digitalWidth7.bmp b/oldProject/55/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/55/image/digitalWidth7.bmp differ
diff --git a/oldProject/55/image/digitalWidth775.bmp b/oldProject/55/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/55/image/digitalWidth775.bmp differ
diff --git a/oldProject/55/image/digitalWidth8.bmp b/oldProject/55/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/55/image/digitalWidth8.bmp differ
diff --git a/oldProject/55/image/digitalWidth875.bmp b/oldProject/55/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/55/image/digitalWidth875.bmp differ
diff --git a/oldProject/56/image/digitalWidth1.bmp b/oldProject/56/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/56/image/digitalWidth1.bmp differ
diff --git a/oldProject/56/image/digitalWidth175.bmp b/oldProject/56/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/56/image/digitalWidth175.bmp differ
diff --git a/oldProject/56/image/digitalWidth2.bmp b/oldProject/56/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/56/image/digitalWidth2.bmp differ
diff --git a/oldProject/56/image/digitalWidth275.bmp b/oldProject/56/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/56/image/digitalWidth275.bmp differ
diff --git a/oldProject/56/image/digitalWidth3.bmp b/oldProject/56/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/56/image/digitalWidth3.bmp differ
diff --git a/oldProject/56/image/digitalWidth375.bmp b/oldProject/56/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/56/image/digitalWidth375.bmp differ
diff --git a/oldProject/56/image/digitalWidth4.bmp b/oldProject/56/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/56/image/digitalWidth4.bmp differ
diff --git a/oldProject/56/image/digitalWidth475.bmp b/oldProject/56/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/56/image/digitalWidth475.bmp differ
diff --git a/oldProject/56/image/digitalWidth5.bmp b/oldProject/56/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/56/image/digitalWidth5.bmp differ
diff --git a/oldProject/56/image/digitalWidth575.bmp b/oldProject/56/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/56/image/digitalWidth575.bmp differ
diff --git a/oldProject/56/image/digitalWidth6.bmp b/oldProject/56/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/56/image/digitalWidth6.bmp differ
diff --git a/oldProject/56/image/digitalWidth675.bmp b/oldProject/56/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/56/image/digitalWidth675.bmp differ
diff --git a/oldProject/56/image/digitalWidth7.bmp b/oldProject/56/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/56/image/digitalWidth7.bmp differ
diff --git a/oldProject/56/image/digitalWidth775.bmp b/oldProject/56/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/56/image/digitalWidth775.bmp differ
diff --git a/oldProject/56/image/digitalWidth8.bmp b/oldProject/56/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/56/image/digitalWidth8.bmp differ
diff --git a/oldProject/56/image/digitalWidth875.bmp b/oldProject/56/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/56/image/digitalWidth875.bmp differ
diff --git a/oldProject/57/image (╕┤╝■)/digitalWidth1.bmp b/oldProject/57/image (╕┤╝■)/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/57/image (╕┤╝■)/digitalWidth1.bmp differ
diff --git a/oldProject/57/image (╕┤╝■)/digitalWidth175.bmp b/oldProject/57/image (╕┤╝■)/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/57/image (╕┤╝■)/digitalWidth175.bmp differ
diff --git a/oldProject/57/image (╕┤╝■)/digitalWidth2.bmp b/oldProject/57/image (╕┤╝■)/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/57/image (╕┤╝■)/digitalWidth2.bmp differ
diff --git a/oldProject/57/image (╕┤╝■)/digitalWidth275.bmp b/oldProject/57/image (╕┤╝■)/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/57/image (╕┤╝■)/digitalWidth275.bmp differ
diff --git a/oldProject/57/image (╕┤╝■)/digitalWidth3.bmp b/oldProject/57/image (╕┤╝■)/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/57/image (╕┤╝■)/digitalWidth3.bmp differ
diff --git a/oldProject/57/image (╕┤╝■)/digitalWidth375.bmp b/oldProject/57/image (╕┤╝■)/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/57/image (╕┤╝■)/digitalWidth375.bmp differ
diff --git a/oldProject/57/image (╕┤╝■)/digitalWidth4.bmp b/oldProject/57/image (╕┤╝■)/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/57/image (╕┤╝■)/digitalWidth4.bmp differ
diff --git a/oldProject/57/image (╕┤╝■)/digitalWidth475.bmp b/oldProject/57/image (╕┤╝■)/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/57/image (╕┤╝■)/digitalWidth475.bmp differ
diff --git a/oldProject/57/image (╕┤╝■)/digitalWidth5.bmp b/oldProject/57/image (╕┤╝■)/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/57/image (╕┤╝■)/digitalWidth5.bmp differ
diff --git a/oldProject/57/image (╕┤╝■)/digitalWidth575.bmp b/oldProject/57/image (╕┤╝■)/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/57/image (╕┤╝■)/digitalWidth575.bmp differ
diff --git a/oldProject/57/image (╕┤╝■)/digitalWidth6.bmp b/oldProject/57/image (╕┤╝■)/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/57/image (╕┤╝■)/digitalWidth6.bmp differ
diff --git a/oldProject/57/image (╕┤╝■)/digitalWidth675.bmp b/oldProject/57/image (╕┤╝■)/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/57/image (╕┤╝■)/digitalWidth675.bmp differ
diff --git a/oldProject/57/image (╕┤╝■)/digitalWidth7.bmp b/oldProject/57/image (╕┤╝■)/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/57/image (╕┤╝■)/digitalWidth7.bmp differ
diff --git a/oldProject/57/image (╕┤╝■)/digitalWidth775.bmp b/oldProject/57/image (╕┤╝■)/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/57/image (╕┤╝■)/digitalWidth775.bmp differ
diff --git a/oldProject/57/image (╕┤╝■)/digitalWidth8.bmp b/oldProject/57/image (╕┤╝■)/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/57/image (╕┤╝■)/digitalWidth8.bmp differ
diff --git a/oldProject/57/image (╕┤╝■)/digitalWidth875.bmp b/oldProject/57/image (╕┤╝■)/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/57/image (╕┤╝■)/digitalWidth875.bmp differ
diff --git a/oldProject/57/image.tar.gz b/oldProject/57/image.tar.gz
new file mode 100644
index 0000000..953eecb
Binary files /dev/null and b/oldProject/57/image.tar.gz differ
diff --git a/oldProject/57/image/digitalWidth1.bmp b/oldProject/57/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/57/image/digitalWidth1.bmp differ
diff --git a/oldProject/57/image/digitalWidth175.bmp b/oldProject/57/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/57/image/digitalWidth175.bmp differ
diff --git a/oldProject/57/image/digitalWidth2.bmp b/oldProject/57/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/57/image/digitalWidth2.bmp differ
diff --git a/oldProject/57/image/digitalWidth275.bmp b/oldProject/57/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/57/image/digitalWidth275.bmp differ
diff --git a/oldProject/57/image/digitalWidth3.bmp b/oldProject/57/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/57/image/digitalWidth3.bmp differ
diff --git a/oldProject/57/image/digitalWidth375.bmp b/oldProject/57/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/57/image/digitalWidth375.bmp differ
diff --git a/oldProject/57/image/digitalWidth4.bmp b/oldProject/57/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/57/image/digitalWidth4.bmp differ
diff --git a/oldProject/57/image/digitalWidth475.bmp b/oldProject/57/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/57/image/digitalWidth475.bmp differ
diff --git a/oldProject/57/image/digitalWidth5.bmp b/oldProject/57/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/57/image/digitalWidth5.bmp differ
diff --git a/oldProject/57/image/digitalWidth575.bmp b/oldProject/57/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/57/image/digitalWidth575.bmp differ
diff --git a/oldProject/57/image/digitalWidth6.bmp b/oldProject/57/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/57/image/digitalWidth6.bmp differ
diff --git a/oldProject/57/image/digitalWidth675.bmp b/oldProject/57/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/57/image/digitalWidth675.bmp differ
diff --git a/oldProject/57/image/digitalWidth7.bmp b/oldProject/57/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/57/image/digitalWidth7.bmp differ
diff --git a/oldProject/57/image/digitalWidth775.bmp b/oldProject/57/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/57/image/digitalWidth775.bmp differ
diff --git a/oldProject/57/image/digitalWidth8.bmp b/oldProject/57/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/57/image/digitalWidth8.bmp differ
diff --git a/oldProject/57/image/digitalWidth875.bmp b/oldProject/57/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/57/image/digitalWidth875.bmp differ
diff --git a/oldProject/58/image/digitalWidth1.bmp b/oldProject/58/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/58/image/digitalWidth1.bmp differ
diff --git a/oldProject/58/image/digitalWidth175.bmp b/oldProject/58/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/58/image/digitalWidth175.bmp differ
diff --git a/oldProject/58/image/digitalWidth2.bmp b/oldProject/58/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/58/image/digitalWidth2.bmp differ
diff --git a/oldProject/58/image/digitalWidth275.bmp b/oldProject/58/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/58/image/digitalWidth275.bmp differ
diff --git a/oldProject/58/image/digitalWidth3.bmp b/oldProject/58/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/58/image/digitalWidth3.bmp differ
diff --git a/oldProject/58/image/digitalWidth375.bmp b/oldProject/58/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/58/image/digitalWidth375.bmp differ
diff --git a/oldProject/58/image/digitalWidth4.bmp b/oldProject/58/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/58/image/digitalWidth4.bmp differ
diff --git a/oldProject/58/image/digitalWidth475.bmp b/oldProject/58/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/58/image/digitalWidth475.bmp differ
diff --git a/oldProject/58/image/digitalWidth5.bmp b/oldProject/58/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/58/image/digitalWidth5.bmp differ
diff --git a/oldProject/58/image/digitalWidth575.bmp b/oldProject/58/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/58/image/digitalWidth575.bmp differ
diff --git a/oldProject/58/image/digitalWidth6.bmp b/oldProject/58/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/58/image/digitalWidth6.bmp differ
diff --git a/oldProject/58/image/digitalWidth675.bmp b/oldProject/58/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/58/image/digitalWidth675.bmp differ
diff --git a/oldProject/58/image/digitalWidth7.bmp b/oldProject/58/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/58/image/digitalWidth7.bmp differ
diff --git a/oldProject/58/image/digitalWidth775.bmp b/oldProject/58/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/58/image/digitalWidth775.bmp differ
diff --git a/oldProject/58/image/digitalWidth8.bmp b/oldProject/58/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/58/image/digitalWidth8.bmp differ
diff --git a/oldProject/58/image/digitalWidth875.bmp b/oldProject/58/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/58/image/digitalWidth875.bmp differ
diff --git a/oldProject/5varRam.png b/oldProject/5varRam.png
new file mode 100644
index 0000000..6dc7444
Binary files /dev/null and b/oldProject/5varRam.png differ
diff --git a/oldProject/6/image/digitalWidth1.bmp b/oldProject/6/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/6/image/digitalWidth1.bmp differ
diff --git a/oldProject/6/image/digitalWidth175.bmp b/oldProject/6/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/6/image/digitalWidth175.bmp differ
diff --git a/oldProject/6/image/digitalWidth2.bmp b/oldProject/6/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/6/image/digitalWidth2.bmp differ
diff --git a/oldProject/6/image/digitalWidth275.bmp b/oldProject/6/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/6/image/digitalWidth275.bmp differ
diff --git a/oldProject/6/image/digitalWidth3.bmp b/oldProject/6/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/6/image/digitalWidth3.bmp differ
diff --git a/oldProject/6/image/digitalWidth375.bmp b/oldProject/6/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/6/image/digitalWidth375.bmp differ
diff --git a/oldProject/6/image/digitalWidth4.bmp b/oldProject/6/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/6/image/digitalWidth4.bmp differ
diff --git a/oldProject/6/image/digitalWidth475.bmp b/oldProject/6/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/6/image/digitalWidth475.bmp differ
diff --git a/oldProject/6/image/digitalWidth5.bmp b/oldProject/6/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/6/image/digitalWidth5.bmp differ
diff --git a/oldProject/6/image/digitalWidth575.bmp b/oldProject/6/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/6/image/digitalWidth575.bmp differ
diff --git a/oldProject/6/image/digitalWidth6.bmp b/oldProject/6/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/6/image/digitalWidth6.bmp differ
diff --git a/oldProject/6/image/digitalWidth675.bmp b/oldProject/6/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/6/image/digitalWidth675.bmp differ
diff --git a/oldProject/6/image/digitalWidth7.bmp b/oldProject/6/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/6/image/digitalWidth7.bmp differ
diff --git a/oldProject/6/image/digitalWidth775.bmp b/oldProject/6/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/6/image/digitalWidth775.bmp differ
diff --git a/oldProject/6/image/digitalWidth8.bmp b/oldProject/6/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/6/image/digitalWidth8.bmp differ
diff --git a/oldProject/6/image/digitalWidth875.bmp b/oldProject/6/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/6/image/digitalWidth875.bmp differ
diff --git a/oldProject/66/image/digitalWidth1.bmp b/oldProject/66/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/66/image/digitalWidth1.bmp differ
diff --git a/oldProject/66/image/digitalWidth175.bmp b/oldProject/66/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/66/image/digitalWidth175.bmp differ
diff --git a/oldProject/66/image/digitalWidth2.bmp b/oldProject/66/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/66/image/digitalWidth2.bmp differ
diff --git a/oldProject/66/image/digitalWidth275.bmp b/oldProject/66/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/66/image/digitalWidth275.bmp differ
diff --git a/oldProject/66/image/digitalWidth3.bmp b/oldProject/66/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/66/image/digitalWidth3.bmp differ
diff --git a/oldProject/66/image/digitalWidth375.bmp b/oldProject/66/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/66/image/digitalWidth375.bmp differ
diff --git a/oldProject/66/image/digitalWidth4.bmp b/oldProject/66/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/66/image/digitalWidth4.bmp differ
diff --git a/oldProject/66/image/digitalWidth475.bmp b/oldProject/66/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/66/image/digitalWidth475.bmp differ
diff --git a/oldProject/66/image/digitalWidth5.bmp b/oldProject/66/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/66/image/digitalWidth5.bmp differ
diff --git a/oldProject/66/image/digitalWidth575.bmp b/oldProject/66/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/66/image/digitalWidth575.bmp differ
diff --git a/oldProject/66/image/digitalWidth6.bmp b/oldProject/66/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/66/image/digitalWidth6.bmp differ
diff --git a/oldProject/66/image/digitalWidth675.bmp b/oldProject/66/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/66/image/digitalWidth675.bmp differ
diff --git a/oldProject/66/image/digitalWidth7.bmp b/oldProject/66/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/66/image/digitalWidth7.bmp differ
diff --git a/oldProject/66/image/digitalWidth775.bmp b/oldProject/66/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/66/image/digitalWidth775.bmp differ
diff --git a/oldProject/66/image/digitalWidth8.bmp b/oldProject/66/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/66/image/digitalWidth8.bmp differ
diff --git a/oldProject/66/image/digitalWidth875.bmp b/oldProject/66/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/66/image/digitalWidth875.bmp differ
diff --git a/oldProject/7/image (╕┤╝■)/digitalWidth1.bmp b/oldProject/7/image (╕┤╝■)/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/7/image (╕┤╝■)/digitalWidth1.bmp differ
diff --git a/oldProject/7/image (╕┤╝■)/digitalWidth175.bmp b/oldProject/7/image (╕┤╝■)/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/7/image (╕┤╝■)/digitalWidth175.bmp differ
diff --git a/oldProject/7/image (╕┤╝■)/digitalWidth2.bmp b/oldProject/7/image (╕┤╝■)/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/7/image (╕┤╝■)/digitalWidth2.bmp differ
diff --git a/oldProject/7/image (╕┤╝■)/digitalWidth275.bmp b/oldProject/7/image (╕┤╝■)/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/7/image (╕┤╝■)/digitalWidth275.bmp differ
diff --git a/oldProject/7/image (╕┤╝■)/digitalWidth3.bmp b/oldProject/7/image (╕┤╝■)/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/7/image (╕┤╝■)/digitalWidth3.bmp differ
diff --git a/oldProject/7/image (╕┤╝■)/digitalWidth375.bmp b/oldProject/7/image (╕┤╝■)/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/7/image (╕┤╝■)/digitalWidth375.bmp differ
diff --git a/oldProject/7/image (╕┤╝■)/digitalWidth4.bmp b/oldProject/7/image (╕┤╝■)/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/7/image (╕┤╝■)/digitalWidth4.bmp differ
diff --git a/oldProject/7/image (╕┤╝■)/digitalWidth475.bmp b/oldProject/7/image (╕┤╝■)/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/7/image (╕┤╝■)/digitalWidth475.bmp differ
diff --git a/oldProject/7/image (╕┤╝■)/digitalWidth5.bmp b/oldProject/7/image (╕┤╝■)/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/7/image (╕┤╝■)/digitalWidth5.bmp differ
diff --git a/oldProject/7/image (╕┤╝■)/digitalWidth575.bmp b/oldProject/7/image (╕┤╝■)/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/7/image (╕┤╝■)/digitalWidth575.bmp differ
diff --git a/oldProject/7/image (╕┤╝■)/digitalWidth6.bmp b/oldProject/7/image (╕┤╝■)/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/7/image (╕┤╝■)/digitalWidth6.bmp differ
diff --git a/oldProject/7/image (╕┤╝■)/digitalWidth675.bmp b/oldProject/7/image (╕┤╝■)/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/7/image (╕┤╝■)/digitalWidth675.bmp differ
diff --git a/oldProject/7/image (╕┤╝■)/digitalWidth7.bmp b/oldProject/7/image (╕┤╝■)/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/7/image (╕┤╝■)/digitalWidth7.bmp differ
diff --git a/oldProject/7/image (╕┤╝■)/digitalWidth775.bmp b/oldProject/7/image (╕┤╝■)/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/7/image (╕┤╝■)/digitalWidth775.bmp differ
diff --git a/oldProject/7/image (╕┤╝■)/digitalWidth8.bmp b/oldProject/7/image (╕┤╝■)/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/7/image (╕┤╝■)/digitalWidth8.bmp differ
diff --git a/oldProject/7/image (╕┤╝■)/digitalWidth875.bmp b/oldProject/7/image (╕┤╝■)/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/7/image (╕┤╝■)/digitalWidth875.bmp differ
diff --git a/oldProject/7/image.tar.gz b/oldProject/7/image.tar.gz
new file mode 100644
index 0000000..953eecb
Binary files /dev/null and b/oldProject/7/image.tar.gz differ
diff --git a/oldProject/7/image/digitalWidth1.bmp b/oldProject/7/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/7/image/digitalWidth1.bmp differ
diff --git a/oldProject/7/image/digitalWidth175.bmp b/oldProject/7/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/7/image/digitalWidth175.bmp differ
diff --git a/oldProject/7/image/digitalWidth2.bmp b/oldProject/7/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/7/image/digitalWidth2.bmp differ
diff --git a/oldProject/7/image/digitalWidth275.bmp b/oldProject/7/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/7/image/digitalWidth275.bmp differ
diff --git a/oldProject/7/image/digitalWidth3.bmp b/oldProject/7/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/7/image/digitalWidth3.bmp differ
diff --git a/oldProject/7/image/digitalWidth375.bmp b/oldProject/7/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/7/image/digitalWidth375.bmp differ
diff --git a/oldProject/7/image/digitalWidth4.bmp b/oldProject/7/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/7/image/digitalWidth4.bmp differ
diff --git a/oldProject/7/image/digitalWidth475.bmp b/oldProject/7/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/7/image/digitalWidth475.bmp differ
diff --git a/oldProject/7/image/digitalWidth5.bmp b/oldProject/7/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/7/image/digitalWidth5.bmp differ
diff --git a/oldProject/7/image/digitalWidth575.bmp b/oldProject/7/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/7/image/digitalWidth575.bmp differ
diff --git a/oldProject/7/image/digitalWidth6.bmp b/oldProject/7/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/7/image/digitalWidth6.bmp differ
diff --git a/oldProject/7/image/digitalWidth675.bmp b/oldProject/7/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/7/image/digitalWidth675.bmp differ
diff --git a/oldProject/7/image/digitalWidth7.bmp b/oldProject/7/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/7/image/digitalWidth7.bmp differ
diff --git a/oldProject/7/image/digitalWidth775.bmp b/oldProject/7/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/7/image/digitalWidth775.bmp differ
diff --git a/oldProject/7/image/digitalWidth8.bmp b/oldProject/7/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/7/image/digitalWidth8.bmp differ
diff --git a/oldProject/7/image/digitalWidth875.bmp b/oldProject/7/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/7/image/digitalWidth875.bmp differ
diff --git a/oldProject/8/image/digitalWidth1.bmp b/oldProject/8/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/8/image/digitalWidth1.bmp differ
diff --git a/oldProject/8/image/digitalWidth175.bmp b/oldProject/8/image/digitalWidth175.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/8/image/digitalWidth175.bmp differ
diff --git a/oldProject/8/image/digitalWidth2.bmp b/oldProject/8/image/digitalWidth2.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/8/image/digitalWidth2.bmp differ
diff --git a/oldProject/8/image/digitalWidth275.bmp b/oldProject/8/image/digitalWidth275.bmp
new file mode 100644
index 0000000..2989e5c
Binary files /dev/null and b/oldProject/8/image/digitalWidth275.bmp differ
diff --git a/oldProject/8/image/digitalWidth3.bmp b/oldProject/8/image/digitalWidth3.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/8/image/digitalWidth3.bmp differ
diff --git a/oldProject/8/image/digitalWidth375.bmp b/oldProject/8/image/digitalWidth375.bmp
new file mode 100644
index 0000000..b50df2f
Binary files /dev/null and b/oldProject/8/image/digitalWidth375.bmp differ
diff --git a/oldProject/8/image/digitalWidth4.bmp b/oldProject/8/image/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/8/image/digitalWidth4.bmp differ
diff --git a/oldProject/8/image/digitalWidth475.bmp b/oldProject/8/image/digitalWidth475.bmp
new file mode 100644
index 0000000..43be7b9
Binary files /dev/null and b/oldProject/8/image/digitalWidth475.bmp differ
diff --git a/oldProject/8/image/digitalWidth5.bmp b/oldProject/8/image/digitalWidth5.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/8/image/digitalWidth5.bmp differ
diff --git a/oldProject/8/image/digitalWidth575.bmp b/oldProject/8/image/digitalWidth575.bmp
new file mode 100644
index 0000000..f2560c9
Binary files /dev/null and b/oldProject/8/image/digitalWidth575.bmp differ
diff --git a/oldProject/8/image/digitalWidth6.bmp b/oldProject/8/image/digitalWidth6.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/8/image/digitalWidth6.bmp differ
diff --git a/oldProject/8/image/digitalWidth675.bmp b/oldProject/8/image/digitalWidth675.bmp
new file mode 100644
index 0000000..65f3a03
Binary files /dev/null and b/oldProject/8/image/digitalWidth675.bmp differ
diff --git a/oldProject/8/image/digitalWidth7.bmp b/oldProject/8/image/digitalWidth7.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/8/image/digitalWidth7.bmp differ
diff --git a/oldProject/8/image/digitalWidth775.bmp b/oldProject/8/image/digitalWidth775.bmp
new file mode 100644
index 0000000..5f16e78
Binary files /dev/null and b/oldProject/8/image/digitalWidth775.bmp differ
diff --git a/oldProject/8/image/digitalWidth8.bmp b/oldProject/8/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/8/image/digitalWidth8.bmp differ
diff --git a/oldProject/8/image/digitalWidth875.bmp b/oldProject/8/image/digitalWidth875.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/8/image/digitalWidth875.bmp differ
diff --git a/oldProject/80/EXPIRYXX.xcf b/oldProject/80/EXPIRYXX.xcf
new file mode 100644
index 0000000..a1674a6
Binary files /dev/null and b/oldProject/80/EXPIRYXX.xcf differ
diff --git a/oldProject/80/digitalWidth4.bmp b/oldProject/80/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/80/digitalWidth4.bmp differ
diff --git a/oldProject/80/expiryDate8.bmp b/oldProject/80/expiryDate8.bmp
new file mode 100644
index 0000000..6072a3f
Binary files /dev/null and b/oldProject/80/expiryDate8.bmp differ
diff --git a/oldProject/80/image/digitalWidth1.bmp b/oldProject/80/image/digitalWidth1.bmp
new file mode 100644
index 0000000..9b0bef1
Binary files /dev/null and b/oldProject/80/image/digitalWidth1.bmp differ
diff --git a/oldProject/80/image/digitalWidth175.bmp b/oldProject/80/image/digitalWidth175.bmp
new file mode 100644
index 0000000..9b0bef1
Binary files /dev/null and b/oldProject/80/image/digitalWidth175.bmp differ
diff --git a/oldProject/80/image/digitalWidth8 (____).bmp b/oldProject/80/image/digitalWidth8 (____).bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/80/image/digitalWidth8 (____).bmp differ
diff --git a/oldProject/80/image/digitalWidth8.bmp b/oldProject/80/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/80/image/digitalWidth8.bmp differ
diff --git a/oldProject/80/image/digitalWidth8.xcf b/oldProject/80/image/digitalWidth8.xcf
new file mode 100644
index 0000000..4165c8c
Binary files /dev/null and b/oldProject/80/image/digitalWidth8.xcf differ
diff --git a/oldProject/80/image/digitalWidth88.bmp b/oldProject/80/image/digitalWidth88.bmp
new file mode 100644
index 0000000..e806c6c
Binary files /dev/null and b/oldProject/80/image/digitalWidth88.bmp differ
diff --git a/oldProject/80/image/expiryDate8.bmp b/oldProject/80/image/expiryDate8.bmp
new file mode 100644
index 0000000..58e7d4e
Binary files /dev/null and b/oldProject/80/image/expiryDate8.bmp differ
diff --git a/oldProject/80/image/expiryDate875.bmp b/oldProject/80/image/expiryDate875.bmp
new file mode 100644
index 0000000..58e7d4e
Binary files /dev/null and b/oldProject/80/image/expiryDate875.bmp differ
diff --git a/oldProject/80/image/expiryDate875_backup.bmp b/oldProject/80/image/expiryDate875_backup.bmp
new file mode 100644
index 0000000..e806c6c
Binary files /dev/null and b/oldProject/80/image/expiryDate875_backup.bmp differ
diff --git a/oldProject/80/image/expiryDate8_backup.bmp b/oldProject/80/image/expiryDate8_backup.bmp
new file mode 100644
index 0000000..e806c6c
Binary files /dev/null and b/oldProject/80/image/expiryDate8_backup.bmp differ
diff --git a/oldProject/81/EXPIRYXX.xcf b/oldProject/81/EXPIRYXX.xcf
new file mode 100644
index 0000000..a1674a6
Binary files /dev/null and b/oldProject/81/EXPIRYXX.xcf differ
diff --git a/oldProject/81/digitalWidth1.bmp b/oldProject/81/digitalWidth1.bmp
new file mode 100644
index 0000000..9b0bef1
Binary files /dev/null and b/oldProject/81/digitalWidth1.bmp differ
diff --git a/oldProject/81/digitalWidth4.bmp b/oldProject/81/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/81/digitalWidth4.bmp differ
diff --git a/oldProject/81/expiryDate8.bmp b/oldProject/81/expiryDate8.bmp
new file mode 100644
index 0000000..6072a3f
Binary files /dev/null and b/oldProject/81/expiryDate8.bmp differ
diff --git a/oldProject/81/image/curDate1.bmp b/oldProject/81/image/curDate1.bmp
new file mode 100644
index 0000000..bc9c77f
Binary files /dev/null and b/oldProject/81/image/curDate1.bmp differ
diff --git a/oldProject/81/image/curDate8.bmp b/oldProject/81/image/curDate8.bmp
new file mode 100644
index 0000000..8094d0e
Binary files /dev/null and b/oldProject/81/image/curDate8.bmp differ
diff --git a/oldProject/81/image/curDate875.bmp b/oldProject/81/image/curDate875.bmp
new file mode 100644
index 0000000..21e5a5a
Binary files /dev/null and b/oldProject/81/image/curDate875.bmp differ
diff --git a/oldProject/81/image/curDate8_backup.bmp b/oldProject/81/image/curDate8_backup.bmp
new file mode 100644
index 0000000..21e5a5a
Binary files /dev/null and b/oldProject/81/image/curDate8_backup.bmp differ
diff --git a/oldProject/81/image/digitalWidth1.bmp b/oldProject/81/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/81/image/digitalWidth1.bmp differ
diff --git a/oldProject/81/image/digitalWidth8 (____).bmp b/oldProject/81/image/digitalWidth8 (____).bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/81/image/digitalWidth8 (____).bmp differ
diff --git a/oldProject/81/image/digitalWidth8.bmp b/oldProject/81/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/81/image/digitalWidth8.bmp differ
diff --git a/oldProject/81/image/digitalWidth8.xcf b/oldProject/81/image/digitalWidth8.xcf
new file mode 100644
index 0000000..4165c8c
Binary files /dev/null and b/oldProject/81/image/digitalWidth8.xcf differ
diff --git a/oldProject/81/image/digitalWidth88.bmp b/oldProject/81/image/digitalWidth88.bmp
new file mode 100644
index 0000000..e806c6c
Binary files /dev/null and b/oldProject/81/image/digitalWidth88.bmp differ
diff --git a/oldProject/81/image/expiryDate8.bmp b/oldProject/81/image/expiryDate8.bmp
new file mode 100644
index 0000000..e806c6c
Binary files /dev/null and b/oldProject/81/image/expiryDate8.bmp differ
diff --git a/oldProject/81/image/expiryDate875.bmp b/oldProject/81/image/expiryDate875.bmp
new file mode 100644
index 0000000..e806c6c
Binary files /dev/null and b/oldProject/81/image/expiryDate875.bmp differ
diff --git a/oldProject/82/digitalWidth1.bmp b/oldProject/82/digitalWidth1.bmp
new file mode 100644
index 0000000..9b0bef1
Binary files /dev/null and b/oldProject/82/digitalWidth1.bmp differ
diff --git a/oldProject/82/digitalWidth4.bmp b/oldProject/82/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/82/digitalWidth4.bmp differ
diff --git a/oldProject/82/expiryDate8.bmp b/oldProject/82/expiryDate8.bmp
new file mode 100644
index 0000000..6072a3f
Binary files /dev/null and b/oldProject/82/expiryDate8.bmp differ
diff --git a/oldProject/82/image/class1.bmp b/oldProject/82/image/class1.bmp
new file mode 100644
index 0000000..39926a5
Binary files /dev/null and b/oldProject/82/image/class1.bmp differ
diff --git a/oldProject/82/image/class91.bmp b/oldProject/82/image/class91.bmp
new file mode 100644
index 0000000..007cc6e
Binary files /dev/null and b/oldProject/82/image/class91.bmp differ
diff --git a/oldProject/82/image/curDate8.bmp b/oldProject/82/image/curDate8.bmp
new file mode 100644
index 0000000..8094d0e
Binary files /dev/null and b/oldProject/82/image/curDate8.bmp differ
diff --git a/oldProject/82/image/curDate875.bmp b/oldProject/82/image/curDate875.bmp
new file mode 100644
index 0000000..21e5a5a
Binary files /dev/null and b/oldProject/82/image/curDate875.bmp differ
diff --git a/oldProject/82/image/curDate8_backup.bmp b/oldProject/82/image/curDate8_backup.bmp
new file mode 100644
index 0000000..21e5a5a
Binary files /dev/null and b/oldProject/82/image/curDate8_backup.bmp differ
diff --git a/oldProject/82/image/digitalWidth1.bmp b/oldProject/82/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/82/image/digitalWidth1.bmp differ
diff --git a/oldProject/82/image/digitalWidth8 (____).bmp b/oldProject/82/image/digitalWidth8 (____).bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/82/image/digitalWidth8 (____).bmp differ
diff --git a/oldProject/82/image/digitalWidth8.bmp b/oldProject/82/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/82/image/digitalWidth8.bmp differ
diff --git a/oldProject/82/image/digitalWidth8.xcf b/oldProject/82/image/digitalWidth8.xcf
new file mode 100644
index 0000000..4165c8c
Binary files /dev/null and b/oldProject/82/image/digitalWidth8.xcf differ
diff --git a/oldProject/82/image/digitalWidth88.bmp b/oldProject/82/image/digitalWidth88.bmp
new file mode 100644
index 0000000..e806c6c
Binary files /dev/null and b/oldProject/82/image/digitalWidth88.bmp differ
diff --git a/oldProject/82/image/expiryDate8.bmp b/oldProject/82/image/expiryDate8.bmp
new file mode 100644
index 0000000..e806c6c
Binary files /dev/null and b/oldProject/82/image/expiryDate8.bmp differ
diff --git a/oldProject/82/image/expiryDate875.bmp b/oldProject/82/image/expiryDate875.bmp
new file mode 100644
index 0000000..e806c6c
Binary files /dev/null and b/oldProject/82/image/expiryDate875.bmp differ
diff --git a/oldProject/9/image/DMTV10.bmp b/oldProject/9/image/DMTV10.bmp
new file mode 100644
index 0000000..d3fd232
Binary files /dev/null and b/oldProject/9/image/DMTV10.bmp differ
diff --git a/oldProject/9/image/DMTV12.bmp b/oldProject/9/image/DMTV12.bmp
new file mode 100644
index 0000000..0a32fc7
Binary files /dev/null and b/oldProject/9/image/DMTV12.bmp differ
diff --git a/oldProject/9/image/DMTV14.bmp b/oldProject/9/image/DMTV14.bmp
new file mode 100644
index 0000000..f7975bb
Binary files /dev/null and b/oldProject/9/image/DMTV14.bmp differ
diff --git a/oldProject/9/image/DMTV16.bmp b/oldProject/9/image/DMTV16.bmp
new file mode 100644
index 0000000..1fdcd7a
Binary files /dev/null and b/oldProject/9/image/DMTV16.bmp differ
diff --git a/oldProject/9/image/DMTV18.bmp b/oldProject/9/image/DMTV18.bmp
new file mode 100644
index 0000000..04025e9
Binary files /dev/null and b/oldProject/9/image/DMTV18.bmp differ
diff --git a/oldProject/9/image/DMTV20.bmp b/oldProject/9/image/DMTV20.bmp
new file mode 100644
index 0000000..bb9be12
Binary files /dev/null and b/oldProject/9/image/DMTV20.bmp differ
diff --git a/oldProject/9/image/DMTV22.bmp b/oldProject/9/image/DMTV22.bmp
new file mode 100644
index 0000000..781f48b
Binary files /dev/null and b/oldProject/9/image/DMTV22.bmp differ
diff --git a/oldProject/9/image/DMTV24.bmp b/oldProject/9/image/DMTV24.bmp
new file mode 100644
index 0000000..096f7e7
Binary files /dev/null and b/oldProject/9/image/DMTV24.bmp differ
diff --git a/oldProject/9/image/DMTV26.bmp b/oldProject/9/image/DMTV26.bmp
new file mode 100644
index 0000000..6b0a428
Binary files /dev/null and b/oldProject/9/image/DMTV26.bmp differ
diff --git a/oldProject/9/image/DMTV32.bmp b/oldProject/9/image/DMTV32.bmp
new file mode 100644
index 0000000..e4a7b66
Binary files /dev/null and b/oldProject/9/image/DMTV32.bmp differ
diff --git a/oldProject/90/EXPIRYXX.xcf b/oldProject/90/EXPIRYXX.xcf
new file mode 100644
index 0000000..a1674a6
Binary files /dev/null and b/oldProject/90/EXPIRYXX.xcf differ
diff --git a/oldProject/90/digitalWidth4.bmp b/oldProject/90/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/90/digitalWidth4.bmp differ
diff --git a/oldProject/90/expiryDate8.bmp b/oldProject/90/expiryDate8.bmp
new file mode 100644
index 0000000..6072a3f
Binary files /dev/null and b/oldProject/90/expiryDate8.bmp differ
diff --git a/oldProject/90/image/digitalWidth1.bmp b/oldProject/90/image/digitalWidth1.bmp
new file mode 100644
index 0000000..9b0bef1
Binary files /dev/null and b/oldProject/90/image/digitalWidth1.bmp differ
diff --git a/oldProject/90/image/digitalWidth175.bmp b/oldProject/90/image/digitalWidth175.bmp
new file mode 100644
index 0000000..9b0bef1
Binary files /dev/null and b/oldProject/90/image/digitalWidth175.bmp differ
diff --git a/oldProject/90/image/digitalWidth8 (____).bmp b/oldProject/90/image/digitalWidth8 (____).bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/90/image/digitalWidth8 (____).bmp differ
diff --git a/oldProject/90/image/digitalWidth8.bmp b/oldProject/90/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/90/image/digitalWidth8.bmp differ
diff --git a/oldProject/90/image/digitalWidth8.xcf b/oldProject/90/image/digitalWidth8.xcf
new file mode 100644
index 0000000..4165c8c
Binary files /dev/null and b/oldProject/90/image/digitalWidth8.xcf differ
diff --git a/oldProject/90/image/digitalWidth88.bmp b/oldProject/90/image/digitalWidth88.bmp
new file mode 100644
index 0000000..e806c6c
Binary files /dev/null and b/oldProject/90/image/digitalWidth88.bmp differ
diff --git a/oldProject/90/image/expiryDate8.bmp b/oldProject/90/image/expiryDate8.bmp
new file mode 100644
index 0000000..58e7d4e
Binary files /dev/null and b/oldProject/90/image/expiryDate8.bmp differ
diff --git a/oldProject/90/image/expiryDate875.bmp b/oldProject/90/image/expiryDate875.bmp
new file mode 100644
index 0000000..58e7d4e
Binary files /dev/null and b/oldProject/90/image/expiryDate875.bmp differ
diff --git a/oldProject/90/image/expiryDate875_backup.bmp b/oldProject/90/image/expiryDate875_backup.bmp
new file mode 100644
index 0000000..e806c6c
Binary files /dev/null and b/oldProject/90/image/expiryDate875_backup.bmp differ
diff --git a/oldProject/90/image/expiryDate8_backup.bmp b/oldProject/90/image/expiryDate8_backup.bmp
new file mode 100644
index 0000000..e806c6c
Binary files /dev/null and b/oldProject/90/image/expiryDate8_backup.bmp differ
diff --git a/oldProject/91/EXPIRYXX.xcf b/oldProject/91/EXPIRYXX.xcf
new file mode 100644
index 0000000..a1674a6
Binary files /dev/null and b/oldProject/91/EXPIRYXX.xcf differ
diff --git a/oldProject/91/digitalWidth1.bmp b/oldProject/91/digitalWidth1.bmp
new file mode 100644
index 0000000..9b0bef1
Binary files /dev/null and b/oldProject/91/digitalWidth1.bmp differ
diff --git a/oldProject/91/digitalWidth4.bmp b/oldProject/91/digitalWidth4.bmp
new file mode 100644
index 0000000..b87ee02
Binary files /dev/null and b/oldProject/91/digitalWidth4.bmp differ
diff --git a/oldProject/91/expiryDate8.bmp b/oldProject/91/expiryDate8.bmp
new file mode 100644
index 0000000..6072a3f
Binary files /dev/null and b/oldProject/91/expiryDate8.bmp differ
diff --git a/oldProject/91/image/curDate1.bmp b/oldProject/91/image/curDate1.bmp
new file mode 100644
index 0000000..bc9c77f
Binary files /dev/null and b/oldProject/91/image/curDate1.bmp differ
diff --git a/oldProject/91/image/curDate8.bmp b/oldProject/91/image/curDate8.bmp
new file mode 100644
index 0000000..8094d0e
Binary files /dev/null and b/oldProject/91/image/curDate8.bmp differ
diff --git a/oldProject/91/image/curDate875.bmp b/oldProject/91/image/curDate875.bmp
new file mode 100644
index 0000000..21e5a5a
Binary files /dev/null and b/oldProject/91/image/curDate875.bmp differ
diff --git a/oldProject/91/image/curDate8_backup.bmp b/oldProject/91/image/curDate8_backup.bmp
new file mode 100644
index 0000000..21e5a5a
Binary files /dev/null and b/oldProject/91/image/curDate8_backup.bmp differ
diff --git a/oldProject/91/image/digitalWidth1.bmp b/oldProject/91/image/digitalWidth1.bmp
new file mode 100644
index 0000000..4a8b364
Binary files /dev/null and b/oldProject/91/image/digitalWidth1.bmp differ
diff --git a/oldProject/91/image/digitalWidth8 (____).bmp b/oldProject/91/image/digitalWidth8 (____).bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/91/image/digitalWidth8 (____).bmp differ
diff --git a/oldProject/91/image/digitalWidth8.bmp b/oldProject/91/image/digitalWidth8.bmp
new file mode 100644
index 0000000..121914b
Binary files /dev/null and b/oldProject/91/image/digitalWidth8.bmp differ
diff --git a/oldProject/91/image/digitalWidth8.xcf b/oldProject/91/image/digitalWidth8.xcf
new file mode 100644
index 0000000..4165c8c
Binary files /dev/null and b/oldProject/91/image/digitalWidth8.xcf differ
diff --git a/oldProject/91/image/digitalWidth88.bmp b/oldProject/91/image/digitalWidth88.bmp
new file mode 100644
index 0000000..e806c6c
Binary files /dev/null and b/oldProject/91/image/digitalWidth88.bmp differ
diff --git a/oldProject/91/image/expiryDate8.bmp b/oldProject/91/image/expiryDate8.bmp
new file mode 100644
index 0000000..e806c6c
Binary files /dev/null and b/oldProject/91/image/expiryDate8.bmp differ
diff --git a/oldProject/91/image/expiryDate875.bmp b/oldProject/91/image/expiryDate875.bmp
new file mode 100644
index 0000000..e806c6c
Binary files /dev/null and b/oldProject/91/image/expiryDate875.bmp differ
diff --git a/oldProject/Aes/TAesClass.cpp b/oldProject/Aes/TAesClass.cpp
new file mode 100644
index 0000000..7788e35
--- /dev/null
+++ b/oldProject/Aes/TAesClass.cpp
@@ -0,0 +1,529 @@
+#include "TAesClass.h"
+#if 1
+unsigned char AesSbox[16*16]=
+{// populate the Sbox matrix
+ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
+ /*0*/ 0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76,
+ /*1*/ 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0,
+ /*2*/ 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15,
+ /*3*/ 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75,
+ /*4*/ 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84,
+ /*5*/ 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf,
+ /*6*/ 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8,
+ /*7*/ 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2,
+ /*8*/ 0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73,
+ /*9*/ 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb,
+ /*a*/ 0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79,
+ /*b*/ 0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08,
+ /*c*/ 0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a,
+ /*d*/ 0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e,
+ /*e*/ 0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf,
+ /*f*/ 0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16
+};
+
+unsigned char AesiSbox[16*16]=
+{
+ // populate the iSbox matrix
+ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
+ /*0*/ 0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38, 0xbf, 0x40, 0xa3, 0x9e, 0x81, 0xf3, 0xd7, 0xfb,
+ /*1*/ 0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87, 0x34, 0x8e, 0x43, 0x44, 0xc4, 0xde, 0xe9, 0xcb,
+ /*2*/ 0x54, 0x7b, 0x94, 0x32, 0xa6, 0xc2, 0x23, 0x3d, 0xee, 0x4c, 0x95, 0x0b, 0x42, 0xfa, 0xc3, 0x4e,
+ /*3*/ 0x08, 0x2e, 0xa1, 0x66, 0x28, 0xd9, 0x24, 0xb2, 0x76, 0x5b, 0xa2, 0x49, 0x6d, 0x8b, 0xd1, 0x25,
+ /*4*/ 0x72, 0xf8, 0xf6, 0x64, 0x86, 0x68, 0x98, 0x16, 0xd4, 0xa4, 0x5c, 0xcc, 0x5d, 0x65, 0xb6, 0x92,
+ /*5*/ 0x6c, 0x70, 0x48, 0x50, 0xfd, 0xed, 0xb9, 0xda, 0x5e, 0x15, 0x46, 0x57, 0xa7, 0x8d, 0x9d, 0x84,
+ /*6*/ 0x90, 0xd8, 0xab, 0x00, 0x8c, 0xbc, 0xd3, 0x0a, 0xf7, 0xe4, 0x58, 0x05, 0xb8, 0xb3, 0x45, 0x06,
+ /*7*/ 0xd0, 0x2c, 0x1e, 0x8f, 0xca, 0x3f, 0x0f, 0x02, 0xc1, 0xaf, 0xbd, 0x03, 0x01, 0x13, 0x8a, 0x6b,
+ /*8*/ 0x3a, 0x91, 0x11, 0x41, 0x4f, 0x67, 0xdc, 0xea, 0x97, 0xf2, 0xcf, 0xce, 0xf0, 0xb4, 0xe6, 0x73,
+ /*9*/ 0x96, 0xac, 0x74, 0x22, 0xe7, 0xad, 0x35, 0x85, 0xe2, 0xf9, 0x37, 0xe8, 0x1c, 0x75, 0xdf, 0x6e,
+ /*a*/ 0x47, 0xf1, 0x1a, 0x71, 0x1d, 0x29, 0xc5, 0x89, 0x6f, 0xb7, 0x62, 0x0e, 0xaa, 0x18, 0xbe, 0x1b,
+ /*b*/ 0xfc, 0x56, 0x3e, 0x4b, 0xc6, 0xd2, 0x79, 0x20, 0x9a, 0xdb, 0xc0, 0xfe, 0x78, 0xcd, 0x5a, 0xf4,
+ /*c*/ 0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31, 0xb1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xec, 0x5f,
+ /*d*/ 0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d, 0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef,
+ /*e*/ 0xa0, 0xe0, 0x3b, 0x4d, 0xae, 0x2a, 0xf5, 0xb0, 0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61,
+ /*f*/ 0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d
+};
+unsigned char AesRcon[11*4]=
+{
+ 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x00, 0x00,
+ 0x20, 0x00, 0x00, 0x00,
+ 0x40, 0x00, 0x00, 0x00,
+ 0x80, 0x00, 0x00, 0x00,
+ 0x1b, 0x00, 0x00, 0x00,
+ 0x36, 0x00, 0x00, 0x00
+};
+#endif
+Aes::~Aes()
+{
+
+}
+Aes::Aes()
+{
+
+}
+////////////////////////////////////////////////////////////////////////////////////////////////
+//构造函数
+Aes::Aes(int keysize,unsigned char* keyBytes)
+{
+ SetNbNkNr(keysize); //设置密钥块数,轮数
+ memcpy(key,keyBytes,keysize); //字符串拷贝函数,把keyBytes的keysize个字符复制到key中
+ KeyExpansion(); //密钥扩展,必须提前做的初始化
+}
+////////////////////////////////////////////////////////////////////////////////////////////////
+void Aes::SetNbNkNr(int keySize)
+{
+ Nb=4;
+ if(keySize==Bits128)
+ {
+ Nk=4; //4*4字节,128位密钥,10轮加密
+ Nr=10;
+ }
+ else if(keySize==Bits192)
+ {
+ Nk=6; //6*4字节,192位密钥,12轮加密
+ Nr=12;
+ }
+ else if(keySize==Bits256)
+ {
+ Nk=8; //8*4字节,256位密钥,14轮加密
+ Nr=14;
+ }
+}
+////////////////////////////////////////////////////////////////////////////////////////////////
+void Aes::KeyExpansion()
+{
+
+ memset(w,0,16*15);
+ for(int row=0;row 6 && (row % Nk == 4) ) //这个还没有搞清楚
+ {
+ temp = SubWord(temp);
+ }
+
+ // w[row] = w[row-Nk] xor temp
+ w[4*row+0] = (byte) ( (int) w[4*(row-Nk)+0] ^ (int)temp[0] );
+ w[4*row+1] = (byte) ( (int) w[4*(row-Nk)+1] ^ (int)temp[1] );
+ w[4*row+2] = (byte) ( (int) w[4*(row-Nk)+2] ^ (int)temp[2] );
+ w[4*row+3] = (byte) ( (int) w[4*(row-Nk)+3] ^ (int)temp[3] );
+ } // for loop
+
+}
+////////////////////////////////////////////////////////////////////////////////////////////////
+//密钥移位函数
+unsigned char* Aes::RotWord(unsigned char* word)
+{
+ byte* temp = new byte[4];
+ temp[0] = word[1];
+ temp[1] = word[2];
+ temp[2] = word[3];
+ temp[3] = word[0];
+ return temp;
+}
+////////////////////////////////////////////////////////////////////////////////////////////////
+//密钥字代换函数
+unsigned char* Aes::SubWord(unsigned char* word)
+{
+ byte* temp = new byte[4];
+ for(int j=0;j<4;j++)
+ {
+ temp[j] = AesSbox[16*(word[j] >> 4)+(word[j] & 0x0f)]; //实际上也可以写成AesSbox[[j]];因为两者相等
+ }
+ return temp;
+
+}
+////////////////////////////////////////////////////////////////////////////////////////////////
+//Aes加密函数
+void Aes::Cipher(unsigned char* input, unsigned char* output)
+{
+ memset(&State[0][0],0,16);
+ for(int i=0;i<4*Nb;i++) //这里是先写列后写行的,即输入是一列一列的进来的
+ {
+ State[i%4][i/4]=input[i]; //换成先写行后写列也是可以的,只要在输出时也是这样就可以了
+ }
+ AddRoundKey(0); //轮密钥加
+
+ for (int round = 1; round <= (Nr - 1); round++) // main round loop
+ {
+ SubBytes(); //字节代换
+ ShiftRows(); //行移位
+ MixColumns(); //列混淆
+ AddRoundKey(round); //轮密钥加
+ } // main round loop
+
+ SubBytes(); //字节代换
+ ShiftRows(); //行移位
+ AddRoundKey(Nr); //轮密钥加
+
+ // output = state
+ for (int i = 0; i < (4 * Nb); i++)
+ {
+ output[i] = State[i % 4][ i / 4];
+ }
+
+}
+////////////////////////////////////////////////////////////////////////////////////////////////
+//Aes解密函数
+void Aes::InvCipher(unsigned char* input,unsigned char* output)
+{
+ memset(&State[0][0],0,16);
+ for (int i = 0; i < (4 * Nb); i++)
+ {
+ State[i % 4][ i / 4] = input[i];
+ }
+
+ AddRoundKey(Nr);
+
+ for (int round = Nr-1; round >= 1; round--) // main round loop
+ {
+ InvShiftRows();
+ InvSubBytes();
+ AddRoundKey(round);
+ InvMixColumns();
+ } // end main round loop for InvCipher
+
+ InvShiftRows();
+ InvSubBytes();
+ AddRoundKey(0);
+
+ // output = state
+ for (int i = 0; i < (4 * Nb); i++)
+ {
+ output[i] = State[i % 4][ i / 4];
+ }
+}
+////////////////////////////////////////////////////////////////////////////////////////////////
+//轮密钥加
+void Aes::AddRoundKey(int round)
+{
+ int i,j; //i行 j列 //因为密钥w是一列一列排列的,即 k0 k4 k8 k12
+ for(j=0;j<4;j++) // k1 k5 k9 k13
+ { // k2 k6 k10k14
+ for(i=0;i<4;i++) // k3 k7 k11k15
+ { // 所以i行j列的下标是4*((round*4)+j)+i即16*round+4*j+i
+ State[i][j]=(unsigned char)((int)State[i][j]^(int)w[4*((round*4)+j)+i]);
+ }
+ }
+}
+////////////////////////////////////////////////////////////////////////////////////////////////
+//字节代换函数
+void Aes::SubBytes() //Page 103
+{
+ int i,j;
+ for(j=0;j<4;j++)
+ {
+ for(i=0;i<4;i++)
+ {
+ State[i][j]=AesSbox[State[i][j]];
+ //因为 16*(State[i][j]>>4)+State[i][j]&0x0f=State[i][j]
+
+
+ }
+ }
+}
+
+void Aes::InvSubBytes()
+{
+ int i,j;
+ for(j=0;j<4;j++)
+ {
+ for(i=0;i<4;i++)
+ {
+ State[i][j]=AesiSbox[State[i][j]]; //因为 16*(State[i][j]>>4)+State[i][j]&0x0f=State[i][j]
+ }
+ }
+
+}
+////////////////////////////////////////////////////////////////////////////////////////////////
+void Aes::ShiftRows()
+{
+ unsigned char temp[4*4]; //Page105
+ int i,j;
+ for(j=0;j<4;j++)
+ {
+ for(i=0;i<4;i++)
+ {
+ temp[4*i+j]=State[i][j];
+ }
+ }
+ for(i=1;i<4;i++)
+ {
+ for(j=0;j<4;j++)
+ {
+ if(i==1)State[i][j]=temp[4*i+(j+1)%4]; //第一行左移1位
+ else if(i==2)State[i][j]=temp[4*i+(j+2)%4]; //第二行左移2位
+ else if(i==3)State[i][j]=temp[4*i+(j+3)%4]; //第三行左移3位
+ }
+ }
+
+}
+void Aes::InvShiftRows()
+{
+ unsigned char temp[4*4];
+ int i,j;
+ for(j=0;j<4;j++)
+ {
+ for(i=0;i<4;i++)
+ {
+ temp[4*i+j]=State[i][j];
+ }
+ }
+ for(i=1;i<4;i++)
+ {
+ for(j=0;j<4;j++)
+ {
+ //if(i==1)State[i][j]=temp[4*i+(j-1)%4]; 在此犯了一个错误 -1%4=-1 而不是3,所以采用了下面再加一个4的做法
+ if(i==1)State[i][j]=temp[4*i+(j+3)%4]; //第一行右移1位 j-1+4=j+3
+ else if(i==2)State[i][j]=temp[4*i+(j+2)%4]; //第二行右移2位 j-2+4=j+2
+ else if(i==3)State[i][j]=temp[4*i+(j+1)%4]; //第三行右移3位 j-3+4=j+2
+ }
+ }
+
+}
+////////////////////////////////////////////////////////////////////////////////////////////////
+void Aes::MixColumns()
+{
+ unsigned char temp[4*4];
+ int i,j;
+ for(j=0;j<4;j++) //2 3 1 1 列混淆矩阵 Page107
+ { //1 2 3 1
+ for(i=0;i<4;i++) //1 1 2 3
+ { //3 1 1 2
+ temp[4*i+j]=State[i][j];
+ }
+ }
+ for(j=0;j<4;j++)
+ {
+ State[0][j] = (unsigned char) ( (int)gfmultby02(temp[0+j]) ^ (int)gfmultby03(temp[4*1+j]) ^
+ (int)gfmultby01(temp[4*2+j]) ^ (int)gfmultby01(temp[4*3+j]) );
+ State[1][j] = (unsigned char) ( (int)gfmultby01(temp[0+j]) ^ (int)gfmultby02(temp[4*1+j]) ^
+ (int)gfmultby03(temp[4*2+j]) ^ (int)gfmultby01(temp[4*3+j]) );
+ State[2][j] = (unsigned char) ( (int)gfmultby01(temp[0+j]) ^ (int)gfmultby01(temp[4*1+j]) ^
+ (int)gfmultby02(temp[4*2+j]) ^ (int)gfmultby03(temp[4*3+j]) );
+ State[3][j] = (unsigned char) ( (int)gfmultby03(temp[0+j]) ^ (int)gfmultby01(temp[4*1+j]) ^
+ (int)gfmultby01(temp[4*2+j]) ^ (int)gfmultby02(temp[4*3+j]) );
+ }
+
+}
+void Aes::InvMixColumns()
+{
+ unsigned char temp[4*4];
+ int i,j;
+ for (i = 0; i < 4; i++) // copy State into temp[]
+ {
+ for (j = 0; j < 4; j++) //0e 0b 0d 09 逆变换矩阵 Page108
+ { //09 0e 0b 0d
+ temp[4*i+j] = State[i][j]; //0d 09 0e 0b
+ } //0b 0d 09 0e
+ }
+
+ for (j = 0; j < 4; j++)
+ {
+ State[0][j] = (unsigned char) ( (int)gfmultby0e(temp[j]) ^ (int)gfmultby0b(temp[4+j]) ^
+ (int)gfmultby0d(temp[4*2+j]) ^ (int)gfmultby09(temp[4*3+j]) );
+ State[1][j] = (unsigned char) ( (int)gfmultby09(temp[j]) ^ (int)gfmultby0e(temp[4+j]) ^
+ (int)gfmultby0b(temp[4*2+j]) ^ (int)gfmultby0d(temp[4*3+j]) );
+ State[2][j] = (unsigned char) ( (int)gfmultby0d(temp[j]) ^ (int)gfmultby09(temp[4+j]) ^
+ (int)gfmultby0e(temp[4*2+j]) ^ (int)gfmultby0b(temp[4*3+j]) );
+ State[3][j] = (unsigned char) ( (int)gfmultby0b(temp[j]) ^ (int)gfmultby0d(temp[4+j]) ^
+ (int)gfmultby09(temp[4*2+j]) ^ (int)gfmultby0e(temp[4*3+j]) );
+ }
+}
+////////////////////////////////////////////////////////////////////////////////////////////////
+unsigned char Aes::gfmultby01(unsigned char b)
+{
+ return b;
+}
+unsigned char Aes::gfmultby02(unsigned char b)
+{
+ if (b < 0x80)
+ return (unsigned char)(int)(b <<1);
+ else
+ return (unsigned char)( (int)(b << 1) ^ (int)(0x1b) );
+}
+
+unsigned char Aes::gfmultby03(unsigned char b)
+{
+ return (unsigned char) ( (int)gfmultby02(b) ^ (int)b );
+}
+
+unsigned char Aes::gfmultby09(unsigned char b)
+{
+ return (unsigned char)( (int)gfmultby02(gfmultby02(gfmultby02(b))) ^ (int)b );
+}
+
+unsigned char Aes::gfmultby0b(unsigned char b)
+{
+ return (unsigned char)( (int)gfmultby02(gfmultby02(gfmultby02(b))) ^
+ (int)gfmultby02(b) ^ (int)b );
+}
+
+unsigned char Aes::gfmultby0d(unsigned char b)
+{
+ return (unsigned char)( (int)gfmultby02(gfmultby02(gfmultby02(b))) ^
+ (int)gfmultby02(gfmultby02(b)) ^ (int)(b) );
+}
+
+unsigned char Aes::gfmultby0e(unsigned char b)
+{
+ return (unsigned char)( (int)gfmultby02(gfmultby02(gfmultby02(b))) ^
+ (int)gfmultby02(gfmultby02(b)) ^(int)gfmultby02(b) );
+}
+
+TAesClass::TAesClass()
+{
+ m_lpAes=NULL;
+ InitializePrivateKey(16,(unsigned char*)"\x49\x76\x48\x6B\x27\x66\x7E\x65\x72\x35\x73\x15\x8C\x3B\x80\x40");
+}
+
+TAesClass::~TAesClass()
+{
+ if (m_lpAes!=NULL)
+ {
+ delete m_lpAes;
+ }
+}
+//------------------------------------------------------------------------------------------------------------
+// 编写人员:wfnhddd
+//
+// 函数名称:InitializeAes
+//
+// 函数描述:初始化AES 密钥,密钥用于加密解密
+//
+// 调用参数:详细说明参考 MSDN 中的相关描述或相关的开发文档
+//
+// 返回数值:无
+//
+// 最近修改:2009 年 08 月 07 日
+//------------------------------------------------------------------------------------------------------------
+
+
+VOID TAesClass::InitializePrivateKey(DWORD KeySize,UCHAR *KeyBytes)
+{
+ if (m_lpAes)
+ {
+ delete m_lpAes;
+ m_lpAes=NULL;
+ }
+ m_lpAes=new Aes(KeySize,KeyBytes);
+
+}
+
+//------------------------------------------------------------------------------------------------------------
+// 编写人员:wfnhddd
+//
+// 函数名称:OnAesEncrypt
+//
+// 函数描述:用AES加密算法加密数据
+//
+// 调用参数:详细说明参考 MSDN 中的相关描述或相关的开发文档
+//
+// 返回数值:加密后的数据大小 ,错误返回值 0
+//
+// 最近修改:2009 年 08 月 07 日
+//------------------------------------------------------------------------------------------------------------
+
+DWORD TAesClass::OnAesEncrypt(LPVOID InBuffer,DWORD InLength,LPVOID OutBuffer)
+{
+ DWORD OutLength=0;
+ if (m_lpAes==NULL||OutBuffer==NULL)
+ {
+ return 0;
+ }
+
+ UCHAR *lpCurInBuff=(UCHAR *)InBuffer;
+ UCHAR *lpCurOutBuff=(UCHAR *)OutBuffer;
+ long blocknum=InLength/16;
+ long leftnum=InLength%16;
+ for(long i=0;iCipher(lpCurInBuff,lpCurOutBuff);
+ lpCurInBuff+=16;
+ lpCurOutBuff+=16;
+ OutLength+=16;
+ }
+ if(leftnum) //多余出leftnum 字节 则加密时 多出16-leftnum 个字节
+ {
+ UCHAR inbuff[16];
+ memset(inbuff,0,16);
+ memcpy(inbuff,lpCurInBuff,leftnum);
+ m_lpAes->Cipher(inbuff,lpCurOutBuff);
+ lpCurOutBuff+=16;
+ OutLength+=16;
+ }
+ //新增16个字节,用以确定增加的字节数
+ UCHAR extrabuff[16];
+ memset(extrabuff,0,16);
+ *((LPDWORD)extrabuff)=16+(16-leftnum)%16; //多出16+(16-leftnum)%16个字节
+ m_lpAes->Cipher(extrabuff,lpCurOutBuff);
+ OutLength+=16;
+ return OutLength;
+
+}
+
+
+//------------------------------------------------------------------------------------------------------------
+// 编写人员:wfnhddd
+//
+// 函数名称:OnAesUncrypt
+//
+// 函数描述:用AES加密算法解密数据
+//
+// 调用参数:详细说明参考 MSDN 中的相关描述或相关的开发文档
+//
+// 返回数值:解密后的数据大小 ,错误返回值 0
+//
+// 最近修改:2009 年 08 月 07 日
+//------------------------------------------------------------------------------------------------------------
+DWORD TAesClass::OnAesUncrypt(LPVOID InBuffer,DWORD InLength,LPVOID OutBuffer)
+{
+ DWORD OutLength=0;
+ if (m_lpAes==NULL||OutBuffer==NULL)
+ {
+ return 0;
+ }
+ UCHAR *lpCurInBuff=(UCHAR *)InBuffer;
+ UCHAR *lpCurOutBuff=(UCHAR *)OutBuffer;
+ long blocknum=InLength/16;
+ long leftnum=InLength%16;
+ if(leftnum)
+ {
+ return 0;
+ }
+ for(long i=0;iInvCipher(lpCurInBuff,lpCurOutBuff);
+ lpCurInBuff+=16;
+ lpCurOutBuff+=16;
+ OutLength+=16;
+ }
+
+ UCHAR *lpExtraInBuff=lpCurOutBuff-16;
+ DWORD dwExtraBytes=*((LPDWORD)lpExtraInBuff);
+ return (OutLength-dwExtraBytes);
+
+}
diff --git a/oldProject/Aes/TAesClass.h b/oldProject/Aes/TAesClass.h
new file mode 100644
index 0000000..f846f8f
--- /dev/null
+++ b/oldProject/Aes/TAesClass.h
@@ -0,0 +1,134 @@
+#ifndef __TAESCLASS_H__
+#define __TAESCLASS_H__
+#include
+#include
+#include
+#include
+
+typedef unsigned long DWORD;
+typedef unsigned char UCHAR,*PUCHAR;
+typedef void *PVOID,*LPVOID;
+typedef unsigned char byte;
+typedef DWORD *PDWORD,*LPDWORD;
+
+#ifndef VOID
+#define VOID void
+#endif
+
+//#pragma once
+
+//enum KeySize { Bits128, Bits192, Bits256 }; // key size, in bits, for construtor
+#define Bits128 16
+#define Bits192 24
+#define Bits256 32
+#if 0
+static unsigned char AesSbox[16*16]=
+{// populate the Sbox matrix
+ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
+ /*0*/ 0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76,
+ /*1*/ 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0,
+ /*2*/ 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15,
+ /*3*/ 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75,
+ /*4*/ 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84,
+ /*5*/ 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf,
+ /*6*/ 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8,
+ /*7*/ 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2,
+ /*8*/ 0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73,
+ /*9*/ 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb,
+ /*a*/ 0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79,
+ /*b*/ 0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08,
+ /*c*/ 0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a,
+ /*d*/ 0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e,
+ /*e*/ 0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf,
+ /*f*/ 0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16
+};
+
+static unsigned char AesiSbox[16*16]=
+{
+ // populate the iSbox matrix
+ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
+ /*0*/ 0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38, 0xbf, 0x40, 0xa3, 0x9e, 0x81, 0xf3, 0xd7, 0xfb,
+ /*1*/ 0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87, 0x34, 0x8e, 0x43, 0x44, 0xc4, 0xde, 0xe9, 0xcb,
+ /*2*/ 0x54, 0x7b, 0x94, 0x32, 0xa6, 0xc2, 0x23, 0x3d, 0xee, 0x4c, 0x95, 0x0b, 0x42, 0xfa, 0xc3, 0x4e,
+ /*3*/ 0x08, 0x2e, 0xa1, 0x66, 0x28, 0xd9, 0x24, 0xb2, 0x76, 0x5b, 0xa2, 0x49, 0x6d, 0x8b, 0xd1, 0x25,
+ /*4*/ 0x72, 0xf8, 0xf6, 0x64, 0x86, 0x68, 0x98, 0x16, 0xd4, 0xa4, 0x5c, 0xcc, 0x5d, 0x65, 0xb6, 0x92,
+ /*5*/ 0x6c, 0x70, 0x48, 0x50, 0xfd, 0xed, 0xb9, 0xda, 0x5e, 0x15, 0x46, 0x57, 0xa7, 0x8d, 0x9d, 0x84,
+ /*6*/ 0x90, 0xd8, 0xab, 0x00, 0x8c, 0xbc, 0xd3, 0x0a, 0xf7, 0xe4, 0x58, 0x05, 0xb8, 0xb3, 0x45, 0x06,
+ /*7*/ 0xd0, 0x2c, 0x1e, 0x8f, 0xca, 0x3f, 0x0f, 0x02, 0xc1, 0xaf, 0xbd, 0x03, 0x01, 0x13, 0x8a, 0x6b,
+ /*8*/ 0x3a, 0x91, 0x11, 0x41, 0x4f, 0x67, 0xdc, 0xea, 0x97, 0xf2, 0xcf, 0xce, 0xf0, 0xb4, 0xe6, 0x73,
+ /*9*/ 0x96, 0xac, 0x74, 0x22, 0xe7, 0xad, 0x35, 0x85, 0xe2, 0xf9, 0x37, 0xe8, 0x1c, 0x75, 0xdf, 0x6e,
+ /*a*/ 0x47, 0xf1, 0x1a, 0x71, 0x1d, 0x29, 0xc5, 0x89, 0x6f, 0xb7, 0x62, 0x0e, 0xaa, 0x18, 0xbe, 0x1b,
+ /*b*/ 0xfc, 0x56, 0x3e, 0x4b, 0xc6, 0xd2, 0x79, 0x20, 0x9a, 0xdb, 0xc0, 0xfe, 0x78, 0xcd, 0x5a, 0xf4,
+ /*c*/ 0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31, 0xb1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xec, 0x5f,
+ /*d*/ 0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d, 0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef,
+ /*e*/ 0xa0, 0xe0, 0x3b, 0x4d, 0xae, 0x2a, 0xf5, 0xb0, 0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61,
+ /*f*/ 0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d
+};
+static unsigned char AesRcon[11*4]=
+{
+ 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x00, 0x00,
+ 0x20, 0x00, 0x00, 0x00,
+ 0x40, 0x00, 0x00, 0x00,
+ 0x80, 0x00, 0x00, 0x00,
+ 0x1b, 0x00, 0x00, 0x00,
+ 0x36, 0x00, 0x00, 0x00
+};
+#endif
+extern unsigned char AesSbox[16*16];
+extern unsigned char AesiSbox[16*16];
+extern unsigned char AesRcon[11*4];
+class Aes // Advanced Encryption Standard
+{
+public:
+ ~Aes();
+ Aes();
+ Aes(int keySize, unsigned char* keyBytes);
+ unsigned char State[4][4];
+ void Cipher(unsigned char* input, unsigned char* output); // encipher 16-bit input
+ void InvCipher(unsigned char* input, unsigned char* output); // decipher 16-bit input
+private:
+ int Nb; // block size in 32-bit words. Always 4 for AES. (128 bits).
+ int Nk; // key size in 32-bit words. 4, 6, 8. (128, 192, 256 bits).
+ int Nr; // number of rounds. 10, 12, 14.
+
+ unsigned char key[32];
+ unsigned char w[16*15];
+
+ void SetNbNkNr(int keySize);
+ void AddRoundKey(int round); //轮密钥加
+ void SubBytes(); //S盒字节代换
+ void InvSubBytes(); //逆S盒字节代换
+ void ShiftRows(); //行移位
+ void InvShiftRows();
+ void MixColumns(); //列混淆
+ void InvMixColumns();
+ unsigned char gfmultby01(unsigned char b);
+ unsigned char gfmultby02(unsigned char b);
+ unsigned char gfmultby03(unsigned char b);
+ unsigned char gfmultby09(unsigned char b);
+ unsigned char gfmultby0b(unsigned char b);
+ unsigned char gfmultby0d(unsigned char b);
+ unsigned char gfmultby0e(unsigned char b);
+ void KeyExpansion(); //密钥扩展
+ unsigned char* SubWord(unsigned char* word); //密钥S盒字代换
+ unsigned char* RotWord(unsigned char* word); //密钥移位
+
+};
+
+class TAesClass
+{
+public:
+ TAesClass();
+ ~TAesClass();
+ void InitializePrivateKey(DWORD KeySize,UCHAR *KeyBytes); //AES 密钥初始化
+ DWORD OnAesEncrypt(LPVOID InBuffer,DWORD InLength,LPVOID OutBuffer); //AES 加密数据
+ DWORD OnAesUncrypt(LPVOID InBuffer,DWORD InLength,LPVOID OutBuffer); //AES 解密数据
+private:
+ Aes * m_lpAes;
+};
+#endif
diff --git a/oldProject/BarCode/barcode.h b/oldProject/BarCode/barcode.h
new file mode 100644
index 0000000..6b9bdf4
--- /dev/null
+++ b/oldProject/BarCode/barcode.h
@@ -0,0 +1,119 @@
+/*
+ * barcode.h -- definitions for libbarcode
+ *
+ * Copyright (c) 1999 Alessandro Rubini (rubini@gnu.org)
+ * Copyright (c) 1999 Prosa Srl. (prosa@prosa.it)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef _BARCODE_H_
+#define _BARCODE_H_
+
+#include
+
+#define BARCODE_VERSION "0.98"
+#define BARCODE_VERSION_INT 9800
+
+/*
+ * The object
+ */
+struct Barcode_Item {
+ int flags; /* type of encoding and decoding */
+ char *ascii; /* malloced */
+ char *partial; /* malloced too */
+ char *textinfo; /* information about text positioning */
+ char *encoding; /* code name, filled by encoding engine */
+ int width, height; /* output units */
+ int xoff, yoff; /* output units */
+ int margin; /* output units */
+ double scalef; /* requested scaling for barcode */
+ int error; /* an errno-like value, in case of failure */
+};
+
+/*
+ * The flags field
+ */
+#define BARCODE_DEFAULT_FLAGS 0x00000000
+
+#define BARCODE_ENCODING_MASK 0x000000ff /* 256 possibilites... */
+#define BARCODE_NO_ASCII 0x00000100 /* avoid text in output */
+#define BARCODE_NO_CHECKSUM 0x00000200 /* avoid checksum in output */
+
+#define BARCODE_OUTPUT_MASK 0x000ff000 /* 256 output types */
+#define BARCODE_OUT_EPS 0x00001000
+#define BARCODE_OUT_PS 0x00002000
+#define BARCODE_OUT_PCL 0x00004000 /* by Andrea Scopece */
+/* PCL_III 0x00008000 */
+#define BARCODE_OUT_PCL_III 0x0000C000
+#define BARCODE_OUT_NOHEADERS 0x00100000 /* no header nor footer */
+
+enum {
+ BARCODE_ANY = 0, /* choose best-fit */
+ BARCODE_EAN,
+ BARCODE_UPC, /* upc == 12-digit ean */
+ BARCODE_ISBN, /* isbn numbers (still EAN13) */
+ BARCODE_39, /* code 39 */
+ BARCODE_128, /* code 128 (a,b,c: autoselection) */
+ BARCODE_128C, /* code 128 (compact form for digits) */
+ BARCODE_128B, /* code 128, full printable ascii */
+ BARCODE_I25, /* interleaved 2 of 5 (only digits) */
+ BARCODE_128RAW, /* Raw code 128 (by Leonid A. Broukhis) */
+ BARCODE_CBR, /* Codabar (by Leonid A. Broukhis) */
+ BARCODE_MSI, /* MSI (by Leonid A. Broukhis) */
+ BARCODE_PLS, /* Plessey (by Leonid A. Broukhis) */
+ BARCODE_93 /* code 93 (by Nathan D. Holmes) */
+};
+
+#define BARCODE_DEFAULT_MARGIN 10
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Create and destroy barcode structures
+ */
+extern struct Barcode_Item *Barcode_Create(char *text);
+extern int Barcode_Delete(struct Barcode_Item *bc);
+
+/*
+ * Encode and print
+ */
+extern int Barcode_Encode(struct Barcode_Item *bc, int flags);
+extern int Barcode_Print(struct Barcode_Item *bc, FILE *f, int flags);
+
+/*
+ * Choose the position
+ */
+extern int Barcode_Position(struct Barcode_Item *bc, int wid, int hei,
+ int xoff, int yoff, double scalef);
+
+/*
+ * Do it all in one step
+ */
+extern int Barcode_Encode_and_Print(char *text, FILE *f, int wid, int hei,
+ int xoff, int yoff, int flags);
+
+
+/*
+ * Return current version (integer and string)
+ */
+extern int Barcode_Version(char *versionname);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _BARCODE_H_ */
diff --git a/oldProject/BarCode/cmdline.c b/oldProject/BarCode/cmdline.c
new file mode 100644
index 0000000..a69a825
--- /dev/null
+++ b/oldProject/BarCode/cmdline.c
@@ -0,0 +1,177 @@
+/*
+ * cmdline.c -- parse a command line using getopt, environment and defaults
+ *
+ * Copyright (c) 1999 Alessandro Rubini (rubini@gnu.org)
+ * Copyright (c) 1999 Prosa Srl. (prosa@prosa.it)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Changes:
+ * Michele Comitini (mcm@glisco.it): better handling of numeric type args.
+ */
+
+#include
+#include
+#include
+
+#ifdef NO_GETOPT
+ /* use replacement */
+ #include "compat/getopt.h"
+#else
+ #include
+#endif
+
+#include "cmdline.h"
+
+/* In case of error, print help string and return error (-1) */
+int commandline_errormsg(FILE *f, struct commandline *args,
+ char *prgname, char *messagehead)
+{
+ char *buffer;
+ char *buffer2;
+ int len;
+ struct commandline *ptr;
+
+ if (!messagehead) {
+ fprintf(f,"%s: Error in cmdline\nPossible options:\n",prgname);
+ } else {
+ fprintf(f,"%s: %s",prgname,messagehead);
+ }
+
+ for (ptr = args; ptr->option; ptr++) {
+ if (ptr->descrip) {
+ len = strlen(ptr->descrip);
+ len += ptr->default_v ? strlen(ptr->default_v) : 6;
+ len += ptr->env ? strlen(ptr->env) : 6;
+ buffer2 = malloc(len+3); /* 3 to be safe :) */
+ len += 32;
+ if (buffer2) {
+ buffer = malloc(len);
+ if (buffer) {
+ sprintf(buffer2, ptr->descrip,
+ ptr->default_v ? ptr->default_v : "(none)",
+ ptr->env ? ptr->env : "(none)");
+ sprintf(buffer, " -%c %s %s", ptr->option,
+ ptr->type ? "" : " ", buffer2);
+ fprintf(f, "%s\n",buffer);
+ free(buffer);
+ }
+ free(buffer2);
+ }
+ }
+ }
+ return -1;
+}
+
+/*
+ * Associate formats to type.
+ */
+struct type_fmt {
+ enum option_type type;
+ char *fmt;
+};
+static struct type_fmt formats[] = {
+ {CMDLINE_I, "%i%s"}, /* the trailing "%s" is used for error check */
+ {CMDLINE_D, "%d%s"},
+ {CMDLINE_X, "%x%s"},
+ {CMDLINE_O, "%o%s"},
+ {CMDLINE_F, "%lf%s"},
+ {CMDLINE_P, "%p%s"},
+ {0, NULL} /* If we get here, it's CMDLINE_S: no sscanf buf strcpy() */
+};
+
+
+/* Parse one argument (default or provided) */
+static int commandline_oneopt(struct commandline *ptr, char *value)
+{
+ struct type_fmt *tptr;
+ char *trash = value ? strdup(value) : NULL;
+
+ /* convert it, if needed */
+ if ((ptr->type != CMDLINE_NONE) && ptr->result) {
+ for (tptr = formats; tptr->type; tptr++)
+ if (tptr->type == ptr->type)
+ break;
+ if (!tptr->type) /* not found: it is a string */
+ *(char **)(ptr->result) = value;
+ else
+ if (sscanf(value, tptr->fmt, ptr->result, trash)!=1) {
+ free(trash);
+ return -1;
+ }
+ }
+ if (trash)
+ free(trash);
+
+ if ((ptr->type == CMDLINE_NONE) && ptr->result) /* no type, just count */
+ (*(int *)(ptr->result))++;
+
+ /* call the function, if needed */
+ if (ptr->fun) {
+ if (ptr->type) {
+ if (ptr->result) return ptr->fun(ptr->result); /* converted */
+ return ptr->fun(value); /* type, but not converted */
+ }
+ return ptr->fun(NULL); /* no type: just call it */
+ }
+ return 0;
+}
+
+/* The main function */
+int commandline(struct commandline *args, int argc, char **argv,
+ char *errorhead)
+{
+ struct commandline *ptr;
+ char *getopt_desc = (char *)calloc(512, 1);
+ int desc_offset = 0;
+ int opt, retval;
+ char *value;
+
+ /* Build getopt string and process defaults values */
+ for (ptr = args; ptr->option; ptr++) {
+ getopt_desc[desc_offset++] = ptr->option;
+ if (ptr->type) getopt_desc[desc_offset++] = ':';
+
+ value = NULL;
+ if (ptr->env)
+ value = getenv(ptr->env);
+ if (!value)
+ value = ptr->default_v;
+ if (value && (retval = commandline_oneopt(ptr, value))) {
+ /*
+ * if the function returns a specific (not -1) value, it already
+ * printed its message, so avoid the generic help
+ */
+ if (retval == -1)
+ commandline_errormsg(stderr, args, argv[0], errorhead);
+ return retval;
+ }
+ }
+
+ /* Run getopt and process material */
+ while ((opt = getopt(argc, argv, getopt_desc)) != -1) {
+ for (ptr = args; ptr->option; ptr++)
+ if (opt == ptr->option)
+ break;
+ if (!ptr->option) /* unknown option */
+ return commandline_errormsg(stderr, args, argv[0], errorhead);
+ if ( (retval = commandline_oneopt(ptr, optarg)) ) { /* wrong arg */
+ if (retval == -1)
+ commandline_errormsg(stderr, args, argv[0], errorhead);
+ return retval;
+ }
+ }
+ return 0;
+}
diff --git a/oldProject/BarCode/cmdline.h b/oldProject/BarCode/cmdline.h
new file mode 100644
index 0000000..6931991
--- /dev/null
+++ b/oldProject/BarCode/cmdline.h
@@ -0,0 +1,58 @@
+/*
+ * cmdline.h -- generic commandline editing (uses getopt, only short)
+ *
+ * Copyright (c) 1999 Alessandro Rubini (rubini@gnu.org)
+ * Copyright (c) 1999 Prosa Srl. (prosa@prosa.it)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+/*
+ * The options may have different arguments of different type
+ */
+enum option_type {
+ CMDLINE_NONE=0, /* no argument after option */
+ CMDLINE_I, /* integer (any base) */
+ CMDLINE_D, /* decimal integer */
+ CMDLINE_X, /* hex integer */
+ CMDLINE_O, /* octal integer */
+ CMDLINE_S, /* string */
+ CMDLINE_F, /* double float */
+ CMDLINE_P, /* pointer */
+};
+
+
+struct commandline {
+ int option; /* Single byte: option id */
+ int type; /* Type of argument, used in sscanf */
+ void *result; /* Store data here, if non null */
+ int (*fun)(void *); /* Call if defined: arg is "result" or input string */
+ char *env; /* Where to get runtime defaults, may be NULL */
+ char *default_v; /* The compile-time default, may be NULL */
+ char *descrip; /* For err msg. May have %s's for default and env */
+};
+
+/* returns: 0 or -1. "optarg" is global (see getopt) */
+extern int commandline(struct commandline *args,
+ int argc, char **argv, char *errorhead);
+
+/* prints an error message based on "args" */
+extern int commandline_errormsg(FILE *f, struct commandline *args,
+ char *prgname, char *messagehead);
+
+
+
+
diff --git a/oldProject/BarCode/codabar.c b/oldProject/BarCode/codabar.c
new file mode 100644
index 0000000..7065b9e
--- /dev/null
+++ b/oldProject/BarCode/codabar.c
@@ -0,0 +1,182 @@
+/*
+ * codabar.c -- encoding for Codabar
+ *
+ * Copyright (c) 2000 Leonid A. Broukhis (leob@mailcom.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include
+#include
+#include
+#include
+#include
+
+#include "barcode.h"
+
+
+/* this is ordered in decades to simplify encoding */
+static char alphabet[] =
+ "0123456789" "-$:/.+ABCD";
+
+#define CODE_A 16
+#define CODE_B 17
+
+#define NARROW 12
+#define WIDE 14
+
+/* Patterns */
+static char *patterns[] = {
+"1111133","1111331","1113113","3311111","1131131",
+"3111131","1311113","1311311","1331111","3113111",
+"1113311","1133111","3111313","3131113","3131311",
+"1131313","1133131","1313113","1113133","1113331" };
+
+/*
+ * Check that the text can be encoded. Returns 0 or -1.
+ * If it's all lowecase convert to uppercase and accept it.
+ * If the first character is a letter (A to D), the last one must be too;
+ * no other character should be a letter.
+ */
+int Barcode_cbr_verify(unsigned char *text)
+{
+ int i, lower=0, upper=0;
+ int startpresent = 0;
+
+ if (!strlen(text))
+ return -1;
+ for (i=0; text[i]; i++) {
+ char * pos;
+ if (isupper(text[i])) upper++;
+ if (islower(text[i])) lower++;
+ pos = strchr(alphabet,toupper(text[i]));
+ if (!pos)
+ return -1;
+ if (i == 0 && pos - alphabet >= CODE_A)
+ startpresent = 1;
+ else if (pos - alphabet >= CODE_A &&
+ (!startpresent || i != strlen(text) - 1))
+ return -1;
+ }
+ if (lower && upper)
+ return -1;
+ return 0;
+}
+
+static int add_one(char *ptr, int code)
+{
+ sprintf(ptr,"1%s", /* separator */ patterns[code]);
+ return 0;
+}
+
+/*
+ * The encoding functions fills the "partial" and "textinfo" fields.
+ * Lowercase chars are converted to uppercase
+ */
+int Barcode_cbr_encode(struct Barcode_Item *bc)
+{
+ static char *text;
+ static char *partial; /* dynamic */
+ static char *textinfo; /* dynamic */
+ char *c, *ptr, *textptr;
+ int i, code, textpos, usesum, checksum = 0, startpresent;
+
+ if (bc->partial)
+ free(bc->partial);
+ if (bc->textinfo)
+ free(bc->textinfo);
+ bc->partial = bc->textinfo = NULL; /* safe */
+
+ if (!bc->encoding)
+ bc->encoding = strdup("codabar");
+
+ text = bc->ascii;
+ if (!text) {
+ bc->error = EINVAL;
+ return -1;
+ }
+ /* the partial code is 8 * (head + text + check + tail) + margin + term. */
+ partial = malloc( (strlen(text) + 3) * 8 + 2);
+ if (!partial) {
+ bc->error = errno;
+ return -1;
+ }
+
+ /* the text information is at most "nnn:fff:c " * (strlen + check) +term */
+ textinfo = malloc(10*(strlen(text) + 1) + 2);
+ if (!textinfo) {
+ bc->error = errno;
+ free(partial);
+ return -1;
+ }
+
+ ptr = partial;
+ textptr = textinfo;
+ textpos = 0;
+ usesum = bc->flags & BARCODE_NO_CHECKSUM ? 0 : 1;
+ /* if no start character specified, A is used as a start character */
+ if (!isalpha(text[0])) {
+ add_one(ptr, CODE_A);
+ ptr += strlen(ptr);
+ textpos = WIDE;
+ checksum = CODE_A;
+ startpresent = 0;
+ } else {
+ startpresent = 1;
+ }
+ for (i=0; ierror = EINVAL; /* impossible if text is verified */
+ free(partial);
+ free(textinfo);
+ return -1;
+ }
+ code = c - alphabet;
+ add_one(ptr, code);
+ sprintf(textptr, "%i:12:%c ", textpos, toupper(text[i]));
+ textpos += code < 12 ? NARROW : WIDE;
+ textptr += strlen(textptr);
+ ptr += strlen(ptr);
+ checksum += code;
+ if (startpresent && usesum && i == strlen(text) - 2) {
+ /* stuff a check symbol before the stop */
+ c = strchr(alphabet, toupper(text[i+1]));
+ if (!c) /* impossible */
+ continue;
+ code = c - alphabet;
+ checksum += code;
+
+ /* Complement to a multiple of 16 */
+ checksum = (checksum + 15) / 16 * 16 - checksum;
+ add_one(ptr, checksum);
+ ptr += strlen(ptr);
+ }
+ }
+ if (!startpresent) {
+ if (usesum) {
+ /* if no start character specified, B is used as a stop char */
+ checksum += CODE_B;
+ checksum = (checksum + 15) / 16 * 16 - checksum;
+ add_one(ptr, checksum);
+ ptr += strlen(ptr);
+ }
+ add_one(ptr, CODE_B);
+ }
+ bc->partial = partial;
+ bc->textinfo = textinfo;
+
+ return 0;
+}
diff --git a/oldProject/BarCode/code128.c b/oldProject/BarCode/code128.c
new file mode 100644
index 0000000..3eed959
--- /dev/null
+++ b/oldProject/BarCode/code128.c
@@ -0,0 +1,618 @@
+/*
+ * code128.c -- encoding for code128 (A, B, C)
+ *
+ * Copyright (c) 1999,2000 Alessandro Rubini (rubini@gnu.org)
+ * Copyright (c) 1999 Prosa Srl. (prosa@prosa.it)
+ * Copyright (c) 2000 Leonid A. Broukhis (leob@mailcom.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include
+#include
+#include
+#include
+#include
+
+#include "barcode.h"
+//0 b1a2a4 123221 223211 221132 221231 213212 223112 312131 311222 314111 b3c1a1b
+static char *codeset[] = {
+ "212222", "222122", "222221", "121223", "121322", /* 0 - 4 */
+ "131222", "122213", "122312", "132212", "221213",
+ "221312", "231212", "112232", "122132", "122231", /* 10 - 14 */
+ "113222", "123122", "123221", "223211", "221132",
+ "221231", "213212", "223112", "312131", "311222", /* 20 - 24 */
+ "321122", "321221", "312212", "322112", "322211",
+ "212123", "212321", "232121", "111323", "131123", /* 30 - 34 */
+ "131321", "112313", "132113", "132311", "211313",
+ "231113", "231311", "112133", "112331", "132131", /* 40 - 44 */
+ "113123", "113321", "133121", "313121", "211331",
+ "231131", "213113", "213311", "213131", "311123", /* 50 - 54 */
+ "311321", "331121", "312113", "312311", "332111",
+ "314111", "221411", "431111", "111224", "111422", /* 60 - 64 */
+ "121124", "121421", "141122", "141221", "112214",
+ "112412", "122114", "122411", "142112", "142211", /* 70 - 74 */
+ "241211", "221114", "413111", "241112", "134111",
+ "111242", "121142", "121241", "114212", "124112", /* 80 - 84 */
+ "124211", "411212", "421112", "421211", "212141",
+ "214121", "412121", "111143", "111341", "131141", /* 90 - 94 */
+ "114113", "114311", "411113", "411311", "113141",
+ "114131", "311141", "411131", "b1a4a2", "b1a2a4", /* 100 - 104 */
+ "b1a2c2", "b3c1a1b"
+};
+// "114131", "311141", "411131", "211412", "211214", /* 100 - 104 */
+// "211232", "2331112"
+//0 b1a2a4 123221 223211 221132 221231 213212 223112 312131 311222 314111 b3c1a1b
+// 211214 2331112
+/*
+1,1,4,1,3,1,// CodeB FNC4 CodeB
+3,1,1,1,4,1,// FNC4 CodeA CodeA
+4,1,1,1,3,1,// FNC1 FNC1 FNC1
+2,1,1,4,1,2,// StartA
+2,1,1,2,1,4,// StartB
+2,1,1,2,3,2,// StartC
+2,3,3,1,1,1,2,// Stop
+*/
+#define START_A 103
+#define START_B 104
+#define START_C 105
+#define STOP 106
+#define SHIFT 98 /* only A and B */
+#define CODE_A 101 /* only B and C */
+#define CODE_B 100 /* only A and C */
+#define CODE_C 99 /* only A and B */
+#define FUNC_1 102 /* all of them */
+#define FUNC_2 97 /* only A and B */
+#define FUNC_3 96 /* only A and B */
+/* FUNC_4 is CODE_A when in A and CODE_B when in B */
+
+#define SYMBOL_WID 11 /* all of them are 11-bar wide */
+
+/*
+ * code 128-b includes all printable ascii chars
+ */
+
+int Barcode_128b_verify(unsigned char *text)
+{
+ if (text[0] == '\0')
+ return -1;
+ while (*text && *text>=32 && !(*text&0x80))
+ text++;
+ if (*text)
+ return -1; /* a non-ascii char */
+ return 0; /* ok */
+}
+
+int Barcode_128b_encode(struct Barcode_Item *bc)
+{
+ static char *text;
+ static char *partial; /* dynamic */
+ static char *textinfo; /* dynamic */
+ char *textptr;
+ int i, code, textpos, checksum = 0;
+
+ if (bc->partial)
+ free(bc->partial);
+ if (bc->textinfo)
+ free(bc->textinfo);
+ bc->partial = bc->textinfo = NULL; /* safe */
+
+ if (!bc->encoding)
+ bc->encoding = strdup("code 128-B");
+
+ text = bc->ascii;
+ if (!text) {
+ bc->error = EINVAL;
+ return -1;
+ }
+ /* the partial code is 6* (head + text + check + tail) + final + term. */
+ partial = malloc( (strlen(text) + 4) * 6 +2);
+ if (!partial) {
+ bc->error = errno;
+ return -1;
+ }
+
+ /* the text information is at most "nnn:fff:c " * strlen +term */
+ textinfo = malloc(10*strlen(text) + 2);
+ if (!textinfo) {
+ bc->error = errno;
+ free(partial);
+ return -1;
+ }
+
+ /* up to now, it was the same code as other encodings */
+
+ strcpy(partial, "0"); /* the first space */
+ strcat(partial, codeset[START_B]);
+ checksum += START_B; /* the start char is counted in the checksum */
+ textptr = textinfo;
+ textpos = SYMBOL_WID;
+
+ for (i=0; ierror = EINVAL; /* impossible if text is verified */
+ free(partial);
+ free(textinfo);
+ return -1;
+ }
+ code = text[i]-32;
+ strcat(partial, codeset[code]);
+ checksum += code * (i+1); /* first * 1 + second * 2 + third * 3... */
+ sprintf(textptr, "%i:12:%c ", textpos, text[i]);
+ textptr += strlen(textptr);
+ textpos += SYMBOL_WID; /* width of each code */
+ }
+ /* Add the checksum, independent of BARCODE_NO_CHECKSUM */
+ checksum %= 103;
+ strcat(partial, codeset[checksum]);
+ /* and the end marker */
+ strcat(partial, codeset[STOP]);
+
+ bc->partial = partial;
+ bc->textinfo = textinfo;
+ return 0;
+}
+
+/*
+ * code 128-c is only digits, but two per symbol
+ */
+
+int Barcode_128c_verify(unsigned char *text)
+{
+ if (text[0] == '\0')
+ return -1;
+ /* must be an even number of digits */
+ if (strlen(text)%2)
+ return -1;
+ /* and must be all digits */
+ for (; *text; text++)
+ if (!isdigit(*text))
+ return -1;
+ return 0;
+}
+
+int Barcode_128c_encode(struct Barcode_Item *bc)
+{
+ static char *text;
+ static char *partial; /* dynamic */
+ static char *textinfo; /* dynamic */
+ char *textptr;
+ int i, code, textpos, checksum = 0;
+
+ if (bc->partial)
+ free(bc->partial);
+ if (bc->textinfo)
+ free(bc->textinfo);
+ bc->partial = bc->textinfo = NULL; /* safe */
+
+ if (!bc->encoding)
+ bc->encoding = strdup("code 128-C");
+
+ text = bc->ascii;
+ if (!text) {
+ bc->error = EINVAL;
+ return -1;
+ }
+ /* the partial code is 6* (head + text + check + tail) + final + term. */
+ partial = malloc( (strlen(text) + 3) * 6 +2);
+ if (!partial) {
+ bc->error = errno;
+ return -1;
+ }
+
+ /* the text information is at most "nnn.5:fff:c " * strlen +term */
+ textinfo = malloc(12*strlen(text) + 2);
+ if (!textinfo) {
+ bc->error = errno;
+ free(partial);
+ return -1;
+ }
+
+ strcpy(partial, "0"); /* the first space */
+ strcat(partial, codeset[START_C]);
+ checksum += START_C; /* the start char is counted in the checksum */
+ textptr = textinfo;
+ textpos = SYMBOL_WID;
+
+ for (i=0; text[i]; i+=2) {
+ if (!isdigit(text[i]) || !isdigit(text[i+1])) {
+ bc->error = EINVAL; /* impossible if text is verified */
+ free(partial);
+ free(textinfo);
+ return -1;
+ }
+ code = (text[i]-'0') * 10 + text[i+1]-'0';
+ strcat(partial, codeset[code]);
+ checksum += code * (i/2+1); /* first * 1 + second * 2 + third * 3... */
+
+ /* print as "%s", because we have ".5" positions */
+ sprintf(textptr, "%g:9:%c %g:9:%c ", (double)textpos, text[i],
+ textpos + (double)SYMBOL_WID/2, text[i+1]);
+ textptr += strlen(textptr);
+ textpos += SYMBOL_WID; /* width of each code */
+ }
+ /* Add the checksum, independent of BARCODE_NO_CHECKSUM */
+ checksum %= 103;
+ strcat(partial, codeset[checksum]);
+ /* and the end marker */
+ strcat(partial, codeset[STOP]);
+
+ bc->partial = partial;
+ bc->textinfo = textinfo;
+
+ return 0;
+}
+
+/*
+ * generic (full-featured) code128 implementation: it selects between
+ * A, B, C according to the data being encoded. F1, F2, F3, F4 are expressed
+ * using ascii chars 0xc1, 0xc2, 0xc3, 0xc4 (0301, 0302, 0303, 0304).
+ * Char '\0' is expressed by 0x80 (0200).
+ */
+
+int Barcode_128_verify(unsigned char *text)
+{
+ if (text[0] == '\0')
+ return -1;
+ while (*text && (*text<=0x80 || (*text >= 0xc1 && *text <= 0xc4)))
+ text++;
+ if (*text)
+ return -1; /* unencodable character */
+ return 0; /* ok */
+}
+
+
+/*
+ * These functions are extracted from Barcode_128_encode for clarity.
+ * It deals with choosing the symbols used to represent the text
+ * and returns a dynamic array of integers, terminated by -1.
+ *
+ * The algorithm used in choosing the codes comes from App 2 of
+ * "El Codigo Estandar EAN/UCC 128", courtesy of AECOC, Spain.
+ * Thanks to Dani Pardo for getting permission and giving me a copy
+ * of the document
+ */
+
+#define NEED_CODE_A(c) ((c)<32 || (c)==0x80)
+#define NEED_CODE_B(c) ((c)>=96 && (c)<128)
+
+static int Barcode_a_or_b(unsigned char *text)
+{
+ for ( ; *text; text++) {
+ if (NEED_CODE_A(*text))
+ return 'A';
+ if (NEED_CODE_B(*text))
+ return 'B';
+ }
+ return 0; /* any */
+}
+
+/* code is either 'A' or 'B', and value must be valid */
+static int Barcode_encode_as(int code, int value)
+{
+
+ /* first check the special chars */
+ if (value == 0xC1) return FUNC_1;
+ if (value == 0xC2) return FUNC_2;
+ if (value == 0xC3) return FUNC_3;
+ if (value == 0xC4) { /* F4 */
+ if (code == 'A') return CODE_A;
+ return CODE_B;
+ }
+
+ /* then check ascii values */
+ if (value >= 0x20 && value <= 0x5F)
+ return value - 0x20; /* both codes */
+ if (value == 0x80) return 64; /* code A */
+ if (value < 0x20) return value+64; /* code A */
+ if (value >= 0x60) return value - 0x20; /* code B */
+ /* can't happen */
+ return -1;
+}
+
+static int *Barcode_128_make_array(struct Barcode_Item *bc, int *lptr)
+{
+ int len, *codes;
+ unsigned char *s;
+ int i=0, j, code, checksum;
+
+ /* allocate twice the text length + 5, as this is the worst case */
+ len = 2 * strlen(bc->ascii) + 5;
+ codes = malloc(len * sizeof(int));
+ s = bc->ascii;
+
+ /* choose the starting code */
+ if (s[2]=='\0' && isdigit(s[0]) && isdigit(s[1])) {
+ code = 'C';
+ } else if (isdigit(s[0])&&isdigit(s[1]) && isdigit(s[2])&&isdigit(s[3])) {
+ code = 'C';
+ } else {
+ code = Barcode_a_or_b(s);
+ if (!code) code = 'B'; /* default */
+ }
+ codes[i++] = START_A + code - 'A';
+
+ for (s = bc->ascii; *s; /* increments are in the loop */) {
+ switch(code) {
+
+ case 'C':
+ if (s[0] == 0xC1) { /* F1 is valid */
+ codes[i++] = FUNC_1;
+ s++;
+ } else if (isdigit(s[0]) && isdigit(s[1])) {
+ /* encode two digits */
+ codes[i++] = (s[0]-'0') * 10 + s[1]-'0';
+ s += 2;
+ } else {
+ /* change code */
+ code = Barcode_a_or_b(s);
+ if (!code) code = 'B';
+ codes[i++] = (code == 'A') ? CODE_A : CODE_B;
+ }
+ break;
+
+ case 'B':
+ case 'A':
+ for (j=0; isdigit(s[j]); j++)
+ ;
+ if (j>=4) { /* if there are 4 or more digits, turn to C */
+ if (j&1) {
+ /* odd number: encode one first */
+ codes[i++] = *(s++) - ' ';
+ }
+ codes[i++] = CODE_C;
+ code = 'C';
+ } else if (code == 'A' && NEED_CODE_B(*s)) {
+ /* check whether we should use SHIFT or change code */
+ j = Barcode_a_or_b(s+1);
+ if (j == 'B') {
+ codes[i++] = CODE_B;
+ code = 'B';
+ } else {
+ codes[i++] = SHIFT;
+ codes[i++] = Barcode_encode_as('B', *s);
+ s++;
+ }
+ } else if (code == 'B' && NEED_CODE_A(*s)) {
+ /* check whether we should use SHIFT or change code */
+ j = Barcode_a_or_b(s+1);
+ if (j == 'A') {
+ codes[i++] = CODE_A;
+ code = 'A';
+ } else {
+ codes[i++] = SHIFT;
+ codes[i++] = Barcode_encode_as('A', *s);
+ s++;
+ }
+ } else {
+ codes[i++] = Barcode_encode_as(code, *s);
+ s++;
+ }
+ break;
+ }
+ }
+ /* add the checksum */
+ checksum = codes[0];
+ for (j=1; j len) {
+ fprintf(stderr, "impossible: length is > allocated len\n");
+ }
+ *lptr = i;
+ return codes;
+}
+
+/*
+ * Encoding is tricky, in that we cannot print the ascii
+ * representation in an easy way. Therefore, just skip non-printable
+ * chars and try to fit the rest somehow.
+ */
+int Barcode_128_encode(struct Barcode_Item *bc)
+{
+ static char *text;
+ static char *partial; /* dynamic */
+ static char *textinfo; /* dynamic */
+ char *textptr;
+ int *codes; /* dynamic */
+ int i, c, len;
+ double textpos, size, step;
+
+ if (bc->partial)
+ free(bc->partial);
+ if (bc->textinfo)
+ free(bc->textinfo);
+ bc->partial = bc->textinfo = NULL; /* safe */
+
+ if (!bc->encoding)
+ bc->encoding = strdup("code 128");
+
+ text = bc->ascii;
+ if (!text) {
+ bc->error = EINVAL;
+ return -1;
+ }
+
+ codes = Barcode_128_make_array(bc, &len);
+ if (!codes) return -1;
+
+ /* the partial code is 6*codelen + ini + term (+margin) */
+ partial = malloc( 6 * len + 4);
+ if (!partial) {
+ bc->error = errno;
+ free(codes);
+ return -1;
+ }
+
+ /* the text information is at most "nnn.n:ff.f:c " * strlen +term */
+ textptr = textinfo = malloc(13*strlen(text) + 2);
+ if (!textinfo) {
+ bc->error = errno;
+ free(partial);
+ free(codes);
+ return -1;
+ }
+
+ /* up to now, it was almost the same code as other encodings */
+
+ strcpy(partial, "0"); /* the first space */
+ for (i=0; i 12.0) size = 12.0;
+
+ /* align the text to the left, using its natural size */
+ step = (int)(10 * (size/18.0 * SYMBOL_WID) + .5) / 10.0;
+ textpos = SYMBOL_WID;
+
+ for (i=0; i 0xc0) c = ' '; /* F code */
+ sprintf(textptr, "%g:%g:%c ", textpos, size, c);
+ textptr += strlen(textptr);
+ textpos += step;
+ }
+
+ bc->partial = partial;
+ bc->textinfo = textinfo;
+ free(codes);
+ return 0;
+}
+
+/*
+ * A raw 128 code is given as a sequence of space separated numbers
+ * from 0 to 105, starting from the start code to be (Leonid)
+ */
+
+int Barcode_128raw_verify(unsigned char *text)
+{
+ int n;
+ unsigned val;
+
+ if (!strlen(text))
+ return -1;
+ while (*text) {
+ if (sscanf(text, "%u%n", &val, &n) < 1)
+ return -1;
+ if (val > 105)
+ return -1;
+ text += n;
+ }
+ return 0;
+}
+
+int Barcode_128raw_encode(struct Barcode_Item *bc)
+{
+ static char *text;
+ static char *partial; /* dynamic */
+ static char *textinfo; /* dynamic */
+ char *textptr;
+ int i, n, count, code, textpos, checksum = 0;
+
+ if (bc->partial)
+ free(bc->partial);
+ if (bc->textinfo)
+ free(bc->textinfo);
+ bc->partial = bc->textinfo = NULL; /* safe */
+
+ if (!bc->encoding)
+ bc->encoding = strdup("128raw");
+
+ text = bc->ascii;
+ if (!text) {
+ bc->error = EINVAL;
+ return -1;
+ }
+ /*
+ * length of partial code is unknown in advance, but it is
+ * at most 6* (1+text/2 + check + tail) + final + terminator
+ */
+ partial = malloc( (3+ strlen(text)/2) * 6 + 2);
+ if (!partial) {
+ bc->error = errno;
+ return -1;
+ }
+
+ /* the text information is at most "nnn.5:fff:c " * 1+strlen/2 +term */
+ textinfo = malloc(12 * (1+strlen(text)/2) + 2);
+ if (!textinfo) {
+ bc->error = errno;
+ free(partial);
+ return -1;
+ }
+
+ strcpy(partial, "0"); /* the first space */
+ textptr = textinfo;
+ textpos = 0;
+
+ for (i=0, count = 0; i < strlen(text); count++) {
+ if (sscanf(text + i, "%u%n", &code, &n) < 1) {
+ bc->error = EINVAL; /* impossible if text is verified */
+ free(partial);
+ free(textinfo);
+ return -1;
+ }
+ strcat(partial, codeset[code]);
+
+ /*
+ * since the start code is part of the "raw" input, it is
+ * counted in the checksum by itself
+ */
+ if (!count) checksum += code; /* the start code */
+ else checksum += code * count; /* first * 1 + second * 2 ... */
+
+ /*
+ * print as "%s", because we have ".5" positions
+ * also, use a size of 9 like codeC above, as each symbol is
+ * represented by two chars
+ */
+ sprintf(textptr, "%g:9:%c %g:9:%c ", (double)textpos,
+ code >= 100 ? 'A' : code/10 + '0',
+ textpos + (double)SYMBOL_WID/2, code%10 + '0');
+ textptr += strlen(textptr);
+ textpos += SYMBOL_WID; /* width of each code */
+ i += n;
+ }
+ /* Add the checksum, independent of BARCODE_NO_CHECKSUM */
+ checksum %= 103;
+ strcat(partial, codeset[checksum]);
+ /* and the end marker */
+ strcat(partial, codeset[STOP]);
+
+ bc->partial = partial;
+ bc->textinfo = textinfo;
+
+ return 0;
+}
+
diff --git a/oldProject/BarCode/code39.c b/oldProject/BarCode/code39.c
new file mode 100644
index 0000000..3308c95
--- /dev/null
+++ b/oldProject/BarCode/code39.c
@@ -0,0 +1,173 @@
+/*
+ * code39.c -- encoding for code39
+ *
+ * Copyright (c) 1999 Alessandro Rubini (rubini@gnu.org)
+ * Copyright (c) 1999 Prosa Srl. (prosa@prosa.it)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include
+#include
+#include
+#include
+#include
+
+#include "barcode.h"
+
+
+/* this is ordered in decades to simplify encoding */
+static char alphabet[] =
+ "1234567890" "ABCDEFGHIJ" "KLMNOPQRST" "UVWXYZ-. *" "$/+%";
+
+/* the checksum alphabet has a different order */
+static char checkbet[] =
+ "0123456789" "ABCDEFGHIJ" "KLMNOPQRST" "UVWXYZ-. $" "/+%";
+
+/* The first 40 symbols repeat this bar pattern */
+static char *bars[] = {
+ "31113","13113","33111","11313","31311",
+ "13311","11133","31131","13131","11331"};
+
+/* The first 4 decades use these space patterns */
+static char *spaces[] = {"1311","1131","1113","3111"};
+
+/* the last four symbols are special */
+static char *specialbars[] = {
+ "11111","11111","11111","11111"};
+
+static char *specialspaces[] = {
+ "3331","3313","3133","1333"};
+
+static char *fillers[]= {
+ "0a3a1c1c1a",
+ "1a3a1c1c1a"
+};
+
+
+/*
+ * Check that the text can be encoded. Returns 0 or -1.
+ * If it's all lowecase convert to uppercase and accept it
+ */
+int Barcode_39_verify(unsigned char *text)
+{
+ int i, lower=0, upper=0;
+
+ if (text[0] == '\0')
+ return -1;
+ for (i=0; text[i]; i++) {
+ if (isupper(text[i])) upper++;
+ if (islower(text[i])) lower++;
+ if (!strchr(alphabet,toupper(text[i])))
+ return -1;
+ }
+ if (lower && upper)
+ return -1;
+ return 0;
+}
+
+static int add_one(char *ptr, int code)
+{
+ char *b, *s;
+
+ if (code < 40) {
+ b = bars[code%10];
+ s = spaces[code/10];
+ } else {
+ b = specialbars[code-40];
+ s = specialspaces[code-40];
+ }
+ sprintf(ptr,"1%c%c%c%c%c%c%c%c%c", /* separator */
+ b[0], s[0], b[1], s[1], b[2], s[2],
+ b[3], s[3], b[4]);
+ return 0;
+}
+
+/*
+ * The encoding functions fills the "partial" and "textinfo" fields.
+ * Lowercase chars are converted to uppercase
+ */
+int Barcode_39_encode(struct Barcode_Item *bc)
+{
+ static char *text;
+ static char *partial; /* dynamic */
+ static char *textinfo; /* dynamic */
+ char *c, *ptr, *textptr;
+ int i, code, textpos, checksum = 0;
+
+ if (bc->partial)
+ free(bc->partial);
+ if (bc->textinfo)
+ free(bc->textinfo);
+ bc->partial = bc->textinfo = NULL; /* safe */
+
+ if (!bc->encoding)
+ bc->encoding = strdup("code 39");
+
+ text = bc->ascii;
+ if (!text) {
+ bc->error = EINVAL;
+ return -1;
+ }
+ /* the partial code is 10* (head + text + check + tail) + margin + term. */
+ partial = malloc( (strlen(text) + 3) * 10 +2);
+ if (!partial) {
+ bc->error = errno;
+ return -1;
+ }
+
+ /* the text information is at most "nnn:fff:c " * strlen +term */
+ textinfo = malloc(10*strlen(text) + 2);
+ if (!textinfo) {
+ bc->error = errno;
+ free(partial);
+ return -1;
+ }
+
+ strcpy(partial, fillers[0]);
+ ptr = partial + strlen(partial);
+ textptr = textinfo;
+ textpos = 22;
+
+ for (i=0; text[i]; i++) {
+ c = strchr(alphabet, toupper(text[i]));
+ if (!c) {
+ bc->error = EINVAL; /* impossible if text is verified */
+ free(partial);
+ free(textinfo);
+ return -1;
+ }
+ code = c - alphabet;
+ add_one(ptr, code);
+ c = strchr(checkbet,*c);
+ if (c) /* the '*' is not there */
+ checksum += (c-checkbet);
+ sprintf(textptr, "%i:12:%c ", textpos, toupper(text[i]));
+
+ textpos += 16; /* width of each code */
+ textptr += strlen(textptr);
+ ptr += strlen(ptr);
+ }
+ /* Add the checksum */
+ if ( (bc->flags & BARCODE_NO_CHECKSUM)==0 ) {
+ code = (strchr(alphabet, checkbet[checksum % 43]) - alphabet);
+ add_one(ptr, code);
+ }
+ strcat(ptr, fillers[1]); /* end */
+ bc->partial = partial;
+ bc->textinfo = textinfo;
+
+ return 0;
+}
diff --git a/oldProject/BarCode/code93.c b/oldProject/BarCode/code93.c
new file mode 100644
index 0000000..73f8cee
--- /dev/null
+++ b/oldProject/BarCode/code93.c
@@ -0,0 +1,213 @@
+/*
+ * code39.c -- encoding for code39
+ *
+ * Copyright (c) 1999 Alessandro Rubini (rubini@gnu.org)
+ * Copyright (c) 1999 Prosa Srl. (prosa@prosa.it)
+ * Copyright (c) 2001 Nathan D. Holmes / FedEx Services (ndholmes@fedex.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include
+#include
+#include
+#include
+#include
+
+#include "barcode.h"
+
+
+/* this is ordered in decades to simplify encoding */
+static char alphabet[] =
+ "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%";
+
+static char *codeset[] = {
+ "131112", "111213", "111312", "111411", "121113", /* 0 - 4 */
+ "121212", "121311", "111114", "131211", "141111", /* 5 - 9 */
+ "211113", "211212", "211311", "221112", "221211", /* A - E */
+ "231111", "112113", "112212", "112311", "122112", /* F - J */
+ "132111", "111123", "111222", "111321", "121122", /* K - O */
+ "131121", "212112", "212211", "211122", "211221", /* P - T */
+ "221121", "222111", "112122", "112221", "122121", /* U - Y */
+ "123111", "121131", "311112", "311211", "321111", /* Z - $ */
+ "112131", "113121", "211131", "121221", "312111", /* / - (%) */
+ "311121", "122211", "111141" /* (/) - (terminator) */
+};
+
+
+/* 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111111111111111111111111111 */
+/* 00000000001111111111222222222233333333334444444444555555555566666666667777777777888888888899999999990000000000111111111122222222 */
+/* 01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567 */
+static char shiftset[] =
+ "%$$$$$$$$$$$$$$$$$$$$$$$$$$%%%%% /// ///// / /%%%%%% %%%%%%++++++++++++++++++++++++++%%%%%";
+static char shiftset2[] =
+ "UABCDEFGHIJKLMNOPQRSTUVWXYZABCDE ABC FGHIJ L ZFGHIJV KLMNOWABCDEFGHIJLKMNOPQRSTUVWXYZPQRST";
+
+#define START_STOP 47
+#define EXTEND_DOLLAR 43
+#define EXTEND_PERCENT 44
+#define EXTEND_SLASH 45
+#define EXTEND_PLUS 46
+
+/*
+ * Check that the text can be encoded. Returns 0 or -1.
+ * All of ASCII-7 is accepted.
+ */
+int Barcode_93_verify(unsigned char *text)
+{
+ int i;
+
+ if (!strlen(text))
+ return -1;
+ for (i=0; text[i]; i++) {
+
+ /* Test if beyond the range of 7-bit ASCII */
+ if ((int)text[i] > 127)
+ return -1;
+ }
+ return 0;
+}
+
+/*
+ * The encoding functions fills the "partial" and "textinfo" fields.
+ * Lowercase chars are converted to uppercase
+ */
+int Barcode_93_encode(struct Barcode_Item *bc)
+{
+ static unsigned char *text;
+ static char *partial; /* dynamic */
+ static char *textinfo; /* dynamic */
+ char *c, *textptr;
+ int *checksum_str;
+ int i, code, textpos, checksum_len=0;
+ int c_checksum = 0;
+ int k_checksum = 0;
+
+ if (bc->partial)
+ free(bc->partial);
+ if (bc->textinfo)
+ free(bc->textinfo);
+ bc->partial = bc->textinfo = NULL; /* safe */
+
+ if (!bc->encoding)
+ bc->encoding = strdup("code 93");
+
+ text = bc->ascii;
+ if (!text) {
+ bc->error = EINVAL;
+ return -1;
+ }
+
+ /* the partial code is 6 * (head + 2* text + 2* check + tail) + margin + term. */
+ partial = malloc( (strlen(text) *2 + 4) * 6 +2);
+ if (!partial) {
+ bc->error = errno;
+ return -1;
+ }
+
+ checksum_str = (int *)malloc( (strlen(text) + 3) * 2 * sizeof(int));
+ if (!checksum_str) {
+ free(partial);
+ bc->error = errno;
+ return -1;
+ }
+
+ /* the text information is at most "nnn:fff:c " * strlen +term */
+ textinfo = malloc(10*strlen(text) + 2);
+ if (!textinfo) {
+ bc->error = errno;
+ free(partial);
+ free(checksum_str);
+ return -1;
+ }
+
+ textptr = textinfo;
+ textpos = 22;
+ strcpy(partial, "0");
+ strcat(partial, codeset[START_STOP]);
+
+ for (i=0; iflags & BARCODE_NO_CHECKSUM)==0 )
+ {
+ for(i=1; i<=checksum_len; i++)
+ {
+ c_checksum += i * (int)checksum_str[checksum_len - i];
+ k_checksum += (i+1) * (int)checksum_str[checksum_len - i];
+ }
+
+ c_checksum = c_checksum % 47;
+ k_checksum += c_checksum;
+ k_checksum = k_checksum % 47;
+
+ strcat(partial, codeset[c_checksum]);
+ strcat(partial, codeset[k_checksum]);
+
+ }
+ strcat(partial, codeset[START_STOP]); /* end */
+
+ /* Encodes final 1-unit width bar to turn the start character into a stop char */
+ strcat(partial, "1");
+ bc->partial = partial;
+ bc->textinfo = textinfo;
+
+ return 0;
+}
diff --git a/oldProject/BarCode/ean.c b/oldProject/BarCode/ean.c
new file mode 100644
index 0000000..0801a0e
--- /dev/null
+++ b/oldProject/BarCode/ean.c
@@ -0,0 +1,774 @@
+/*
+ * ean.c -- encoding for ean, upc and isbn
+ *
+ * Copyright (c) 1999 Alessandro Rubini
+ * Copyright (c) 1999 Prosa Srl.
+ * Copyright (c) 2001 Boszormenyi Zoltan
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include
+#include
+#include
+#include
+#include
+
+#include "barcode.h"
+
+/*
+ * IMPORTANT NOTE: if you are reading this file to learn how to add a
+ * new encoding type, this is the wrong place as there are too many
+ * special cases. Please refer to code39.c instead. If you want to
+ * learn how UPC, EAN, ISBN work, on the other hand, I did my best to
+ * commend things and hope you enjoy it.
+ */
+
+/*
+ * These following static arrays are used to describe the barcode.
+ *
+ * The various forms of UPC and EAN are documented as using three
+ * different alphabets to encode the ten digits. However, each digit
+ * has exactly one encoding; only, it is sometimes mirrored. Moreover,
+ * if you represent the width of each symbol (bar/space) instead of
+ * the sequence of 1's and 0's, you find that even-parity and odd-parity
+ * encoding are exactly the same. So, here are the digits: */
+static char *digits[] = {
+ "3211","2221","2122","1411","1132",
+ "1231","1114","1312","1213","3112"};
+
+/*
+ * What EAN encoding does is adding a leading digit (the 13th digit).
+ * Such an extra digit is encoded by mirroring three of the six digits that
+ * appear in the left half of the UPC code. Here how mirroring works:
+ */
+static char *ean_mirrortab[] = {
+ "------","--1-11","--11-1","--111-","-1--11",
+ "-11--1","-111--","-1-1-1","-1-11-","-11-1-"
+};
+
+/*
+ * UPC-E (the 6-digit one), instead, encodes the check character as
+ * a mirroring of the symbols. This is similar, but the encoding for "0" is
+ * different (EAN uses no mirroring for "0" to be compatible with UPC).
+ * The same rule is used for UPC-5 (the supplemental digits for ISBN)
+ */
+static char *upc_mirrortab[] = {
+ "---111","--1-11","--11-1","--111-","-1--11",
+ "-11--1","-111--","-1-1-1","-1-11-","-11-1-"
+};
+
+/*
+ * UPC-E mirroring for encoding "1"
+ */
+static char *upc_mirrortab1[] = {
+ "111---","11-1--","11--1-","11---1","1-11--",
+ "1--11-","1---11","1-1-1-","1-1--1","1--1-1"
+};
+
+/* UPC-2 has just two digits to mirror */
+static char *upc_mirrortab2[] = {
+ "11","1-","-1","--"
+};
+
+/*
+ * initial, middle, final guard bars (first symbol is a a space).
+ * EAN-13 overwrites the first "0" with "9" to make space for the extra digit.
+ */
+static char *guard[] = {"0a1a","1a1a1","a1a"};
+
+/* initial, final guard bars for UPC-E*/
+static char *guardE[] = {"0a1a","1a1a1a"};
+
+/* initial and inter-char guard bars for supplementals (first is space) */
+static char *guardS[] = {"9112","11"};
+
+/*
+ * These functions are shortcuts I use in the encoding engine
+ */
+static int ean_make_checksum(char *text, int mode)
+{
+ int esum = 0, osum = 0, i;
+ int even=1; /* last char is even */
+
+ if (strchr(text, ' '))
+ i = strchr(text, ' ') - text; /* end of first part */
+ else
+ i = strlen(text); /* end of all */
+
+ while (i-- > 0) {
+ if (even) esum += text[i]-'0';
+ else osum += text[i]-'0';
+ even = !even;
+ }
+ if (!mode) { /* standard upc/ean checksum */
+ i = (3*esum + osum) % 10;
+ return (10-i) % 10; /* complement to 10 */
+ } else { /* add-5 checksum */
+ i = (3*esum + 9*osum);
+ return i%10;
+ }
+}
+
+/*
+ * Check that the text can be encoded. Returns 0 or -1.
+ * Accept:
+ * 13 or 12 digits: EAN-13 w/ or w/o checksum
+ * or
+ * 8 or 7 digits: EAN-8 w/ or w/o checksum.
+ * For both EAN-13 and EAN-8, accept an addon of 2 or 5 digits,
+ * separated by ' '
+ */
+int Barcode_ean_verify(unsigned char *text)
+{
+ int i, len0, len, addon;
+ unsigned char tmp[24], *spc;
+
+ len = strlen(text);
+ spc = strchr(text, ' ');
+ if (spc) {
+ len0 = spc - text;
+ addon = len - len0 - 1;
+ if (addon != 2 && addon != 5)
+ return -1;
+ for (i=len0+1; i= '5' && text[10] <= '9') {
+ memcpy(&result[1], text+1, 5);
+ result[6] = text[10];
+ } else {
+ return NULL;
+ }
+ result[7] = chksum + '0';
+
+ return result;
+}
+
+/*
+ * UPC-A is the same as EAN, but accept
+ * 12 or 11 digits (UPC-A w/ or w/o checksum)
+ * or accept UPC-E as:
+ * 6 digits (w/o number system and checksum): number system '0' assumed,
+ * 7 digits (either w/o number system or checksum),
+ * 8 digits (w/ number system and checksum)
+ * plus the 2 or 5-digit add-on
+ */
+int Barcode_upc_verify(unsigned char *text)
+{
+ int i, len0, len, addon;
+ unsigned char tmp[24], *spc;
+
+ len = strlen(text);
+ spc = strchr(text, ' ');
+ if (spc) {
+ len0 = spc - text;
+ addon = len - len0 - 1;
+ if (addon != 2 && addon != 5)
+ return -1;
+ for (i=len0+1; iascii) {
+ bc->error = EINVAL;
+ return -1;
+ }
+
+ /* Find out whether the barcode has addon and
+ * the length of the barcode w/o the addon.
+ */
+ len = strlen(bc->ascii);
+ spc = strchr(bc->ascii, ' ');
+ if (spc) {
+ len0 = spc - bc->ascii;
+ addon = strlen(spc + 1);
+ if (addon != 2 && addon != 5) {
+ bc->error = EINVAL; /* impossible, actually */
+ return -1;
+ }
+ } else {
+ len0 = len;
+ addon = 0;
+ }
+
+ if (!bc->encoding) {
+ /* ISBN already wrote what it is; if unknown, find it out */
+
+ /*
+ * Do not decide only by barcode length, it may be ambiguous.
+ * Anyway, either the user specified the barcode type or
+ * we already found a fitting one.
+ */
+ switch(bc->flags & BARCODE_ENCODING_MASK) {
+ case BARCODE_EAN:
+ switch (len0) {
+ case 7: case 8:
+ bc->encoding = strdup("EAN-8");
+ encoding = EAN8;
+ break;
+ case 12: case 13:
+ bc->encoding = strdup("EAN-13");
+ encoding = EAN13;
+ break;
+ default:
+ bc->error = -EINVAL;
+ return -1;
+ }
+ break;
+
+ case BARCODE_UPC:
+ switch (len0) {
+ case 6: case 7: case 8:
+ bc->encoding = strdup("UPC-E");
+ encoding = UPCE;
+ break;
+ case 11: case 12:
+ bc->encoding = strdup("UPC-A");
+ encoding = UPCA;
+ break;
+ default:
+ bc->error = -EINVAL;
+ return -1;
+ }
+ break;
+ default:
+ /* else, it's wrong (impossible, as the text is checked) */
+ bc->error = -EINVAL;
+ return -1;
+ }
+ }
+
+ /* better safe than sorry */
+ if (bc->partial) free(bc->partial); bc->partial = NULL;
+ if (bc->textinfo) free(bc->textinfo); bc->textinfo = NULL;
+
+ if (encoding == UPCA) { /* add the leading 0 (not printed) */
+ text[0] = '0';
+ strcpy(text+1, bc->ascii);
+ } else if (encoding == UPCE) {
+ strcpy(text, upc_a_to_e(upc_e_to_a(bc->ascii)));
+ } else {
+ strcpy(text, bc->ascii);
+ }
+
+ /*
+ * build the checksum and the bars: any encoding is slightly different
+ */
+ if (encoding == UPCA || encoding == EAN13 || encoding == ISBN) {
+ if (!(encoding == UPCA && len0 == 12) &&
+ !(encoding == EAN13 && len0 == 13)) {
+ checksum = ean_make_checksum(text, 0);
+ text[12] = '0' + checksum; /* add it to the text */
+ text[13] = '\0';
+ }
+
+ strcpy(partial, guard[0]);
+ if (encoding == EAN13 || encoding == ISBN) { /* The first digit */
+ sprintf(tptr,"0:12:%c ",text[0]);
+ tptr += strlen(tptr);
+ partial[0] = '9'; /* extra space for the digit */
+ } else if (encoding == UPCA)
+ partial[0] = '9'; /* UPC has one digit before the symbol, too */
+ xpos = width_of_partial(partial);
+ mirror = ean_mirrortab[text[0]-'0'];
+
+ /* left part */
+ for (i=1;i<7;i++) {
+ ptr1 = partial + strlen(partial); /* target */
+ ptr2 = digits[text[i]-'0']; /* source */
+ strcpy(ptr1, ptr2);
+ if (mirror[i-1] == '1') {
+ /* mirror this */
+ ptr1[0] = ptr2[3];
+ ptr1[1] = ptr2[2];
+ ptr1[2] = ptr2[1];
+ ptr1[3] = ptr2[0];
+ }
+ /*
+ * Write the ascii digit. UPC has a special case
+ * for the first digit, which is out of the bars
+ */
+ if (encoding == UPCA && i==1) {
+ sprintf(tptr, "0:10:%c ", text[i]);
+ tptr += strlen(tptr);
+ ptr1[1] += 'a'-'1'; /* bars are long */
+ ptr1[3] += 'a'-'1';
+ } else {
+ sprintf(tptr, "%i:12:%c ", xpos, text[i]);
+ tptr += strlen(tptr);
+ }
+ /* count the width of the symbol */
+ xpos += 7; /* width_of_partial(ptr2) */
+ }
+
+ strcat(partial, guard[1]); /* middle */
+ xpos += width_of_partial(guard[1]);
+
+ /* right part */
+ for (i=7;i<13;i++) {
+ ptr1 = partial + strlen(partial); /* target */
+ ptr2 = digits[text[i]-'0']; /* source */
+ strcpy(ptr1, ptr2);
+ /*
+ * Ascii digit. Once again, UPC has a special
+ * case for the last digit
+ */
+ if (encoding == UPCA && i==12) {
+ sprintf(tptr, "%i:10:%c ", xpos+13, text[i]);
+ tptr += strlen(tptr);
+ ptr1[0] += 'a'-'1'; /* bars are long */
+ ptr1[2] += 'a'-'1';
+ } else {
+ sprintf(tptr, "%i:12:%c ", xpos, text[i]);
+ tptr += strlen(tptr);
+ }
+ xpos += 7; /* width_of_partial(ptr2) */
+ }
+ tptr[-1] = '\0'; /* overwrite last space */
+ strcat(partial, guard[2]); /* end */
+ xpos += width_of_partial(guard[2]);
+
+ } else if (encoding == UPCE) {
+ checksum = text[7] - '0';
+
+ strcpy(partial, guardE[0]);
+ partial[0] = '9'; /* UPC-A has one digit before the symbol, too */
+ xpos = width_of_partial(partial);
+
+ /* UPC-E has the number system written before the bars. */
+ sprintf(tptr, "0:10:%c ", text[0]);
+ tptr += strlen(tptr);
+
+ if (text[0] == '0')
+ mirror = upc_mirrortab[checksum];
+ else
+ mirror = upc_mirrortab1[checksum];
+
+ for (i=0;i<6;i++) {
+ ptr1 = partial + strlen(partial); /* target */
+ ptr2 = digits[text[i+1]-'0']; /* source */
+ strcpy(ptr1, ptr2);
+ if (mirror[i] != '1') { /* negated wrt EAN13 */
+ /* mirror this */
+ ptr1[0] = ptr2[3];
+ ptr1[1] = ptr2[2];
+ ptr1[2] = ptr2[1];
+ ptr1[3] = ptr2[0];
+ }
+ sprintf(tptr, "%i:12:%c ", xpos, text[i+1]);
+ tptr += strlen(tptr);
+ xpos += 7; /* width_of_partial(ptr2) */
+ }
+
+ sprintf(tptr, "%i:10:%c ", xpos+10, text[7]);
+ tptr += strlen(tptr);
+ ptr1[0] += 'a'-'1'; /* bars are long */
+ ptr1[2] += 'a'-'1';
+
+ tptr[-1] = '\0'; /* overwrite last space */
+ strcat(partial, guardE[1]); /* end */
+
+ } else { /* EAN-8 almost identical to EAN-13 but no mirroring */
+
+ if (len0 != 8) {
+ checksum = ean_make_checksum(text, 0);
+ text[7] = '0' + checksum; /* add it to the text */
+ text[8] = '\0';
+ }
+
+ strcpy(partial, guard[0]);
+ xpos = width_of_partial(partial);
+
+ /* left part */
+ for (i=0;i<4;i++) {
+ strcpy(partial + strlen(partial), digits[text[i]-'0']);
+ sprintf(tptr, "%i:12:%c ", xpos, text[i]);
+ tptr += strlen(tptr);
+ xpos += 7; /* width_of_partial(digits[text[i]-'0' */
+ }
+ strcat(partial, guard[1]); /* middle */
+ xpos += width_of_partial(guard[1]);
+
+ /* right part */
+ for (i=4;i<8;i++) {
+ strcpy(partial + strlen(partial), digits[text[i]-'0']);
+ sprintf(tptr, "%i:12:%c ", xpos, text[i]);
+ tptr += strlen(tptr);
+ xpos += 7; /* width_of_partial(digits[text[i]-'0' */
+ }
+ tptr[-1] = '\0'; /* overwrite last space */
+ strcat(partial, guard[2]); /* end */
+ }
+
+ /*
+ * And that's it. Now, in case some add-on is specified it
+ * must be encoded too. Look for it.
+ */
+ if ( (ptr1 = spc) ) {
+ ptr1++;
+ strcpy(text, ptr1);
+ if (strlen(ptr1)==5) {
+ checksum = ean_make_checksum(text, 1 /* special way */);
+ mirror = upc_mirrortab[checksum]+1; /* only last 5 digits */
+ } else {
+ checksum = atoi(text)%4;
+ mirror = upc_mirrortab2[checksum];
+ }
+ strcat(textinfo, " +"); strcat(partial, "+");
+ tptr = textinfo + strlen(textinfo);
+ for (i=0; ipartial = strdup(partial);
+ if (!bc->partial) {
+ bc->error = errno;
+ return -1;
+ }
+ bc->textinfo = strdup(textinfo);
+ if (!bc->textinfo) {
+ bc->error = errno;
+ free(bc->partial);
+ bc->partial = NULL;
+ return -1;
+ }
+ if (!bc->width)
+ bc->width = width_of_partial(partial);
+
+ return 0; /* success */
+}
+
+int Barcode_upc_encode(struct Barcode_Item *bc)
+{
+ return Barcode_ean_encode(bc); /* UPC is folded into EAN */
+}
+
+int Barcode_isbn_encode(struct Barcode_Item *bc)
+{
+ /* For ISBN we must normalize the string and prefix "978" */
+ unsigned char *text = malloc(24); /* 13 + ' ' + 5 plus some slack */
+ unsigned char *otext;
+ int i, j, retval;
+
+ if (!text) {
+ bc->error = ENOMEM;
+ return -1;
+ }
+ strcpy(text, "978"); j=3;
+
+ otext = bc->ascii;
+ for (i=0; otext[i]; i++) {
+ if (isdigit(otext[i]))
+ text[j++] = otext[i];
+ if (j == 12) /* checksum added later */
+ break;
+ }
+ text[j]='\0';
+ if (strchr(otext, ' '))
+ strcat(text, strchr(otext, ' '));
+ bc->ascii = text;
+ bc->encoding = strdup("ISBN");
+ retval = Barcode_ean_encode(bc);
+ bc->ascii = otext; /* restore ascii for the ps comments */
+ free(text);
+ return retval;
+}
+
diff --git a/oldProject/BarCode/i25.c b/oldProject/BarCode/i25.c
new file mode 100644
index 0000000..72bd035
--- /dev/null
+++ b/oldProject/BarCode/i25.c
@@ -0,0 +1,164 @@
+/*
+ * i25.c -- "interleaved 2 of 5"
+ *
+ * Copyright (c) 1999,2000 Alessandro Rubini (rubini@gnu.org)
+ * Copyright (c) 1999 Prosa Srl. (prosa@prosa.it)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include
+#include
+#include
+#include
+#include
+
+#include "barcode.h"
+
+static char *codes[] = {
+ "11331", "31113", "13113", "33111", "11313",
+ "31311", "13311", "11133", "31131", "13131"
+};
+
+static char *guard[] = {"a1a1", "c1a"}; /* begin end */
+
+int Barcode_i25_verify(unsigned char *text)
+{
+ if (!text[0])
+ return -1;
+ while (*text && isdigit(*text))
+ text++;
+ if (*text)
+ return -1; /* a non-digit char */
+ return 0; /* ok */
+}
+
+int Barcode_i25_encode(struct Barcode_Item *bc)
+{
+ unsigned char *text;
+ unsigned char *partial; /* dynamic */
+ unsigned char *textinfo; /* dynamic */
+ unsigned char *textptr, *p1, *p2, *pd;
+ int i, len, sum[2], textpos, usesum = 0;
+
+ if (bc->partial)
+ free(bc->partial);
+ if (bc->textinfo)
+ free(bc->textinfo);
+ bc->partial = bc->textinfo = NULL; /* safe */
+
+ if (!bc->encoding)
+ bc->encoding = strdup("interleaved 2 of 5");
+
+ text = bc->ascii;
+ if (!bc->ascii) {
+ bc->error = EINVAL;
+ return -1;
+ }
+
+ if ((bc->flags & BARCODE_NO_CHECKSUM)) usesum = 0; else usesum = 1;
+
+ /* create the real text string, padded to an even number of digits */
+ text = malloc(strlen(bc->ascii) + 3); /* leading 0, checksum, term. */
+ if (!text) {
+ bc->error = errno;
+ return -1;
+ }
+ /* add the leading 0 if needed */
+ i = strlen(bc->ascii) + usesum;
+ if (i % 2) {
+ /* add a leading 0 */
+ text[0] = '0';
+ strcpy(text+1, bc->ascii);
+ } else {
+ strcpy(text, bc->ascii);
+ }
+ /* add the trailing checksum if needed, the leading 0 is ignored */
+ if (usesum) {
+ sum[0] = sum[1] = 0;
+ for (i=0; text[i]; i++)
+ sum[i%2] += text[i]-'0';
+ /*
+ * The "even" sum must be multiplied by three, and the *
+ * rightmost digit is defined as "even". The digits' position
+ * is already correct, whether or not we added a leading zero.
+ * (e.g., they are in pos. 0..4 or 1..4 of the string)
+ */
+ i = sum[0] * 3 + sum[1];
+ strcat(text, "0");
+ text[strlen(text)-1] += (10 - (i%10)) % 10;
+ }
+
+ /* the partial code is 5 * (text + check) + 4(head) + 3(tail) + term. */
+ partial = malloc( (strlen(text) + 3) * 5 +2); /* be large... */
+ if (!partial) {
+ bc->error = errno;
+ free(text);
+ return -1;
+ }
+
+ /* the text information is at most "nnn:fff:c " * (strlen+1) +term */
+ textinfo = malloc(10*(strlen(text)+1) + 2);
+ if (!textinfo) {
+ bc->error = errno;
+ free(partial);
+ free(text);
+ return -1;
+ }
+
+
+ strcpy(partial, "0"); /* the first space */
+ strcat(partial, guard[0]); /* start */
+ textpos = 4; /* width of initial guard */
+ textptr = textinfo;
+
+ len = strlen(text);
+ for (i=0; ierror = EINVAL; /* impossible if text is verified */
+ free(partial);
+ free(textinfo);
+ free(text);
+ return -1;
+ }
+ /* interleave two digits */
+ p1 = codes[text[i]-'0'];
+ p2 = codes[text[i+1]-'0'];
+ pd = partial + strlen(partial); /* destination */
+ while (*p1) {
+ *(pd++) = *(p1++);
+ *(pd++) = *(p2++);
+ }
+ *pd = '\0';
+ /* and print the ascii text (but don't print the checksum, if any */
+ if (usesum && strlen(text+i)==2) {
+ /* print only one digit, discard the checksum */
+ sprintf(textptr, "%i:12:%c ", textpos, text[i]);
+ } else {
+ sprintf(textptr, "%i:12:%c %i:12:%c ", textpos, text[i],
+ textpos+9, text[i+1]);
+ }
+ textpos += 18; /* width of two codes */
+ textptr += strlen(textptr);
+ }
+ strcat(partial, guard[1]);
+
+ bc->partial = partial;
+ bc->textinfo = textinfo;
+ free(text);
+
+ return 0;
+}
+
diff --git a/oldProject/BarCode/library.c b/oldProject/BarCode/library.c
new file mode 100644
index 0000000..08df802
--- /dev/null
+++ b/oldProject/BarCode/library.c
@@ -0,0 +1,247 @@
+/*
+ * library.c -- external functions of libbarcode
+ *
+ * Copyright (c) 1999 Alessandro Rubini (rubini@gnu.org)
+ * Copyright (c) 1999 Prosa Srl. (prosa@prosa.it)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include
+#include
+#include
+#include
+#ifdef HAVE_UNISTD_H /* sometimes (windows, for instance) it's missing */
+# include
+#endif
+#include
+
+#include "barcode.h"
+//#include "QFile.h"
+//#include "QString.h"
+
+/*
+ * This function allocates a barcode structure and strdup()s the
+ * text string. It returns NULL in case of error
+ */
+struct Barcode_Item *Barcode_Create(char *text)
+{
+ struct Barcode_Item *bc;
+
+ bc = malloc(sizeof(*bc));
+ if (!bc) return NULL;
+
+ memset(bc, 0, sizeof(*bc));
+ bc->ascii = strdup(text);
+ bc->margin = BARCODE_DEFAULT_MARGIN; /* default margin */
+ return bc;
+}
+
+
+/*
+ * Free a barcode structure
+ */
+int Barcode_Delete(struct Barcode_Item *bc)
+{
+ if (bc->ascii)
+ free(bc->ascii);
+ if (bc->partial)
+ free(bc->partial);
+ if (bc->textinfo)
+ free(bc->textinfo);
+ if (bc->encoding)
+ free(bc->encoding);
+ free(bc);
+ return 0; /* always success */
+}
+
+
+/*
+ * The various supported encodings. This might be extended to support
+ * dynamic addition of extra encodings
+ */
+extern int Barcode_ean_verify(unsigned char *text);
+extern int Barcode_ean_encode(struct Barcode_Item *bc);
+extern int Barcode_upc_verify(unsigned char *text);
+extern int Barcode_upc_encode(struct Barcode_Item *bc);
+extern int Barcode_isbn_verify(unsigned char *text);
+extern int Barcode_isbn_encode(struct Barcode_Item *bc);
+extern int Barcode_39_verify(unsigned char *text);
+extern int Barcode_39_encode(struct Barcode_Item *bc);
+extern int Barcode_128b_verify(unsigned char *text);
+extern int Barcode_128b_encode(struct Barcode_Item *bc);
+extern int Barcode_128c_verify(unsigned char *text);
+extern int Barcode_128c_encode(struct Barcode_Item *bc);
+extern int Barcode_128_verify(unsigned char *text);
+extern int Barcode_128_encode(struct Barcode_Item *bc);
+extern int Barcode_128raw_verify(unsigned char *text);
+extern int Barcode_128raw_encode(struct Barcode_Item *bc);
+extern int Barcode_i25_verify(unsigned char *text);
+extern int Barcode_i25_encode(struct Barcode_Item *bc);
+extern int Barcode_cbr_verify(unsigned char *text);
+extern int Barcode_cbr_encode(struct Barcode_Item *bc);
+extern int Barcode_msi_verify(unsigned char *text);
+extern int Barcode_msi_encode(struct Barcode_Item *bc);
+extern int Barcode_pls_verify(unsigned char *text);
+extern int Barcode_pls_encode(struct Barcode_Item *bc);
+extern int Barcode_93_verify(unsigned char *text);
+extern int Barcode_93_encode(struct Barcode_Item *bc);
+
+
+struct encoding {
+ int type;
+ int (*verify)(unsigned char *text);
+ int (*encode)(struct Barcode_Item *bc);
+};
+
+struct encoding encodings[] = {
+ {BARCODE_EAN, Barcode_ean_verify, Barcode_ean_encode},
+ {BARCODE_UPC, Barcode_upc_verify, Barcode_upc_encode},
+ {BARCODE_ISBN, Barcode_isbn_verify, Barcode_isbn_encode},
+ {BARCODE_128B, Barcode_128b_verify, Barcode_128b_encode},
+ {BARCODE_128C, Barcode_128c_verify, Barcode_128c_encode},
+ {BARCODE_128RAW, Barcode_128raw_verify, Barcode_128raw_encode},
+ {BARCODE_39, Barcode_39_verify, Barcode_39_encode},
+ {BARCODE_I25, Barcode_i25_verify, Barcode_i25_encode},
+ {BARCODE_128, Barcode_128_verify, Barcode_128_encode},
+ {BARCODE_CBR, Barcode_cbr_verify, Barcode_cbr_encode},
+ {BARCODE_PLS, Barcode_pls_verify, Barcode_pls_encode},
+ {BARCODE_MSI, Barcode_msi_verify, Barcode_msi_encode},
+ {BARCODE_93, Barcode_93_verify, Barcode_93_encode},
+ {0, NULL, NULL}
+};
+
+/*
+ * A function to encode a string into bc->partial, ready for
+ * postprocessing to the output file. Meaningful bits for "flags" are
+ * the encoding mask and the no-checksum flag. These bits
+ * get saved in the data structure.
+ */
+int Barcode_Encode(struct Barcode_Item *bc, int flags)
+{
+ int validbits = BARCODE_ENCODING_MASK | BARCODE_NO_CHECKSUM;
+ struct encoding *cptr;
+
+ /* If any flag is cleared in "flags", inherit it from "bc->flags" */
+ if (!(flags & BARCODE_ENCODING_MASK))
+ flags |= bc->flags & BARCODE_ENCODING_MASK;
+ if (!(flags & BARCODE_NO_CHECKSUM))
+ flags |= bc->flags & BARCODE_NO_CHECKSUM;
+ flags = bc->flags = (flags & validbits) | (bc->flags & ~validbits);
+
+ if (!(flags & BARCODE_ENCODING_MASK)) {
+ /* get the first code able to handle the text */
+ for (cptr = encodings; cptr->verify; cptr++)
+ if (cptr->verify((unsigned char *)bc->ascii)==0)
+ break;
+ if (!cptr->verify) {
+ bc->error = EINVAL; /* no code can handle this text */
+ return -1;
+ }
+ flags |= cptr->type; /* this works */
+ bc->flags |= cptr->type;
+ }
+ for (cptr = encodings; cptr->verify; cptr++)
+ if (cptr->type == (flags & BARCODE_ENCODING_MASK))
+ break;
+ if (!cptr->verify) {
+ bc->error = EINVAL; /* invalid barcode type */
+ return -1;
+ }
+ if (cptr->verify(bc->ascii) != 0) {
+ bc->error = EINVAL;
+ return -1;
+ }
+ return cptr->encode(bc);
+}
+
+
+/*
+ * When multiple output formats are supported, there will
+ * be a jumpt table like the one for the types. Now we don't need it
+ */
+extern int Barcode_ps_print(struct Barcode_Item *bc, FILE *f);
+extern int Barcode_pcl_print(struct Barcode_Item *bc, FILE *f);
+
+/*
+ * A function to print a partially decoded string. Meaningful bits for
+ * "flags" are the output mask etc. These bits get saved in the data
+ * structure.
+ */
+int Barcode_Print(struct Barcode_Item *bc, FILE *f, int flags)
+{
+ int validbits = BARCODE_OUTPUT_MASK | BARCODE_NO_ASCII
+ | BARCODE_OUT_NOHEADERS;
+
+ /* If any flag is clear in "flags", inherit it from "bc->flags" */
+ if (!(flags & BARCODE_OUTPUT_MASK))
+ flags |= bc->flags & BARCODE_OUTPUT_MASK;
+ if (!(flags & BARCODE_NO_ASCII))
+ flags |= bc->flags & BARCODE_NO_ASCII;
+ if (!(flags & BARCODE_OUT_NOHEADERS))
+ flags |= bc->flags & BARCODE_OUT_NOHEADERS;
+ flags = bc->flags = (flags & validbits) | (bc->flags & ~validbits);
+
+ if (bc->flags & BARCODE_OUT_PCL)
+ return Barcode_pcl_print(bc, f);
+ return Barcode_ps_print(bc, f);
+}
+
+/*
+ * Choose the position
+ */
+int Barcode_Position(struct Barcode_Item *bc, int wid, int hei,
+ int xoff, int yoff, double scalef)
+{
+ bc->width = wid; bc->height = hei;
+ bc->xoff = xoff; bc->yoff = yoff;
+ bc->scalef = scalef;
+ return 0;
+}
+
+/*
+ * Do it all in one step
+ */
+int Barcode_Encode_and_Print(char *text, FILE *f, int wid, int hei,
+ int xoff, int yoff, int flags)
+{
+ struct Barcode_Item * bc;
+
+ if (!(bc=Barcode_Create(text))) {
+ errno = -ENOMEM;
+ return -1;
+ }
+
+ if ( Barcode_Position(bc, wid, hei, xoff, yoff, 0.0) < 0
+ || Barcode_Encode(bc, flags) < 0
+ || Barcode_Print(bc, f, flags) < 0) {
+ errno = bc->error;
+ Barcode_Delete(bc);
+ return -1;
+ }
+ Barcode_Delete(bc);
+ return 0;
+}
+
+/*
+ * Return the version
+ */
+
+int Barcode_Version(char *vptr)
+{
+ if (vptr)
+ strcpy(vptr, BARCODE_VERSION);
+ return BARCODE_VERSION_INT;
+}
diff --git a/oldProject/BarCode/msi.c b/oldProject/BarCode/msi.c
new file mode 100644
index 0000000..77a373b
--- /dev/null
+++ b/oldProject/BarCode/msi.c
@@ -0,0 +1,155 @@
+/*
+ * msi.c -- encoding for MSI-Plessey
+ *
+ * Copyright (c) 2000 Leonid A. Broukhis (leob@mailcom.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include
+#include
+#include
+#include
+#include
+
+#include "barcode.h"
+
+
+/* Patterns */
+static char *patterns[] = { "13", "31" };
+
+static char *fillers[] = { "031", "131" };
+
+static int width = 16 /* each character uses 4 patterns */,
+ startpos = 6 /* length of the first filler */;
+
+/*
+ * Check that the text can be encoded. Returns 0 or -1.
+ */
+int Barcode_msi_verify(unsigned char *text)
+{
+ int i;
+
+ if (!strlen(text))
+ return -1;
+ for (i=0; text[i]; i++) {
+ if (!isdigit(text[i]))
+ return -1;
+ }
+ return 0;
+}
+
+static int add_one(char *ptr, int code)
+{
+ sprintf(ptr, "%s%s%s%s",
+ patterns[(code >> 3) & 1],
+ patterns[(code >> 2) & 1],
+ patterns[(code >> 1) & 1],
+ patterns[code & 1]);
+ return 0;
+}
+
+/*
+ * The encoding functions fills the "partial" and "textinfo" fields.
+ * Lowercase chars are converted to uppercase
+ */
+int Barcode_msi_encode(struct Barcode_Item *bc)
+{
+ static char *text;
+ static char *partial; /* dynamic */
+ static char *textinfo; /* dynamic */
+ char *ptr, *textptr;
+ int i, code, textpos, usesum, checksum = 0;
+
+ if (bc->partial)
+ free(bc->partial);
+ if (bc->textinfo)
+ free(bc->textinfo);
+ bc->partial = bc->textinfo = NULL; /* safe */
+
+ if (!bc->encoding)
+ bc->encoding = strdup("msi");
+
+ if ((bc->flags & BARCODE_NO_CHECKSUM))
+ usesum = 0;
+ else
+ usesum = 1;
+
+ text = bc->ascii;
+
+ /* the partial code is head + 8 * (text + check) + tail + margin + term. */
+ partial = malloc( 3 + 8 * (strlen(text) + 1) + 3 + 2 );
+ if (!partial) {
+ bc->error = errno;
+ return -1;
+ }
+
+ /* the text information is at most "nnn:fff:c " * strlen +term */
+ textinfo = malloc(10*strlen(text) + 2);
+ if (!textinfo) {
+ bc->error = errno;
+ free(partial);
+ return -1;
+ }
+
+ strcpy(partial, fillers[0]);
+ ptr = partial + strlen(partial);
+ textptr = textinfo;
+ textpos = startpos;
+
+ for (i=0; ipartial = partial;
+ bc->textinfo = textinfo;
+
+ return 0;
+}
diff --git a/oldProject/BarCode/pcl.c b/oldProject/BarCode/pcl.c
new file mode 100644
index 0000000..c50a828
--- /dev/null
+++ b/oldProject/BarCode/pcl.c
@@ -0,0 +1,185 @@
+/*
+ * pcl.c -- printing the "partial" bar encoding in PCL format
+ *
+ * Copyright (c) 1999 Alessandro Rubini (rubini@gnu.org)
+ * Copyright (c) 1999 Prosa Srl. (prosa@prosa.it)
+ * Copyright (c) 2001 Andrea Scopece (a.scopece@tin.it)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include
+#include
+#include
+#include
+#include
+
+#include "barcode.h"
+
+#define SHRINK_AMOUNT 0.15 /* shrink the bars to account for ink spreading */
+
+
+/*
+ * How do the "partial" and "textinfo" strings work? See file "ps.c"
+ */
+
+
+int Barcode_pcl_print(struct Barcode_Item *bc, FILE *f)
+{
+ int i, j, k, barlen;
+ double f1, f2, fsav=0;
+ int mode = '-'; /* text below bars */
+ double scalef=1, xpos, x0, y0, yr;
+ unsigned char *ptr;
+ unsigned char c;
+
+ char font_id[6]; /* default font, should be "scalable" */
+ /* 0 Line printer, use on older LJet II, isn't scalable */
+ /* 4148 Univers, use on LJet III series, and Lj 4L, 5L */
+ /* 16602 Arial, default LJ family 4, 5, 6, Color, Djet */
+
+ if (!bc->partial || !bc->textinfo) {
+ bc->error = EINVAL;
+ return -1;
+ }
+
+ /*
+ * Maybe this first part can be made common to several printing back-ends,
+ * we'll see how that works when other ouput engines are added
+ */
+
+ /* First, calculate barlen */
+ barlen = bc->partial[0] - '0';
+ for (ptr = bc->partial+1; *ptr; ptr++)
+ if (isdigit(*ptr))
+ barlen += (*ptr - '0');
+ else if (islower(*ptr))
+ barlen += (*ptr - 'a'+1);
+
+ /* The scale factor depends on bar length */
+ if (!bc->scalef) {
+ if (!bc->width) bc->width = barlen; /* default */
+ scalef = bc->scalef = (double)bc->width / (double)barlen;
+ }
+
+ /* The width defaults to "just enough" */
+ if (!bc->width) bc->width = barlen * scalef +1;
+
+ /* But it can be too small, in this case enlarge and center the area */
+ if (bc->width < barlen * scalef) {
+ int wid = barlen * scalef + 1;
+ bc->xoff -= (wid - bc->width)/2 ;
+ bc->width = wid;
+ /* Can't extend too far on the left */
+ if (bc->xoff < 0) {
+ bc->width += -bc->xoff;
+ bc->xoff = 0;
+ }
+ }
+
+ /* The height defaults to 80 points (rescaled) */
+ if (!bc->height) bc->height = 80 * scalef;
+ i = 5 + 10 * ((bc->flags & BARCODE_NO_ASCII)==0);
+ if (bc->height < i * scalef ) {
+ double scaleg = ((double)bc->height) / i;
+ int wid = bc->width * scaleg / scalef;
+ bc->xoff += (bc->width - wid)/2;
+ bc->width = wid;
+ scalef = scaleg;
+ }
+
+
+ /*
+ * deal with PCL output
+ */
+
+ xpos = bc->margin + (bc->partial[0]-'0') * scalef;
+ for (ptr = bc->partial+1, i=1; *ptr; ptr++, i++) {
+ /* special cases: '+' and '-' */
+ if (*ptr == '+' || *ptr == '-') {
+ mode = *ptr; /* don't count it */ i++; continue;
+ }
+
+ /* j is the width of this bar/space */
+ if (isdigit (*ptr)) j = *ptr-'0';
+ else j = *ptr-'a'+1;
+ if (i%2) { /* bar */
+ x0 = bc->xoff + xpos;
+ y0 = bc->yoff + bc->margin;
+ yr = bc->height;
+ if (!(bc->flags & BARCODE_NO_ASCII)) { /* leave space for text */
+ if (mode == '-') {
+ /* text below bars: 10 points or five points */
+ yr -= (isdigit(*ptr) ? 10 : 5) * scalef;
+ } else { /* '+' */
+ /* text above bars: 10 or 0 from bottom, and 10 from top */
+ y0 += (isdigit(*ptr) ? 10 : 0) * scalef;
+ yr -= (isdigit(*ptr) ? 20 : 10) * scalef;
+ }
+ }
+
+ fprintf(f,"%c&a%.0fH", 27, x0 * 10.0);
+ fprintf(f,"%c&a%.0fV", 27, y0 * 10.0);
+ fprintf(f,"%c*c%.0fH", 27, ((j*scalef)-SHRINK_AMOUNT) * 10.0);
+ fprintf(f,"%c*c%.0fV", 27, yr * 10.0);
+ fprintf(f,"%c*c0P\n", 27);
+ }
+ xpos += j * scalef;
+ }
+
+ /* the text */
+
+ mode = '-'; /* reinstantiate default */
+ if (!(bc->flags & BARCODE_NO_ASCII)) {
+ k=0; /* k is the "previous font size" */
+ for (ptr = bc->textinfo; ptr; ptr = strchr(ptr, ' ')) {
+ while (*ptr == ' ') ptr++;
+ if (!*ptr) break;
+ if (*ptr == '+' || *ptr == '-') {
+ mode = *ptr; continue;
+ }
+ if (sscanf(ptr, "%lf:%lf:%c", &f1, &f2, &c) != 3) {
+ fprintf(stderr, "barcode: impossible data: %s\n", ptr);
+ continue;
+ }
+
+ /* select a Scalable Font */
+
+ if (fsav != f2)
+ {
+ if ((bc->flags & BARCODE_OUT_PCL_III) == BARCODE_OUT_PCL_III)
+ { strcpy(font_id, "4148"); /* font Univers */
+ }
+ else
+ { strcpy(font_id, "16602"); /* font Arial */
+ }
+
+ fprintf(f,"%c(8U%c(s1p%5.2fv0s0b%sT", 27, 27, f2 * scalef, font_id);
+ }
+ fsav = f2;
+
+ fprintf(f,"%c&a%.0fH", 27, (bc->xoff + f1 * scalef + bc->margin) * 10.0);
+ fprintf(f,"%c&a%.0fV", 27,
+ mode != '-'
+ ? ((double)bc->yoff + bc->margin + 8*scalef) * 10.0
+ : ((double)bc->yoff + bc->margin + bc->height ) * 10.0);
+
+ fprintf(f, "%c", c);
+ }
+
+ }
+
+ return 0;
+}
diff --git a/oldProject/BarCode/plessey.c b/oldProject/BarCode/plessey.c
new file mode 100644
index 0000000..ec47100
--- /dev/null
+++ b/oldProject/BarCode/plessey.c
@@ -0,0 +1,164 @@
+/*
+ * plessey.c -- encoding for Plessey
+ *
+ * Copyright (c) 2000 Leonid A. Broukhis (leob@mailcom.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include
+#include
+#include
+#include
+#include
+
+#include "barcode.h"
+
+static char * patterns[] = { "13", "31" };
+
+/* this is ordered in decades to simplify encoding */
+static char alphabet[] =
+ "0123456789" "ABCDEF";
+
+/* stop sequence may be 231311313 (barcodemill.com) */
+static char *fillers[] = { "031311331", "331311313" };
+
+static int width = 16, startpos = 16;
+
+/*
+ * Check that the text can be encoded. Returns 0 or -1.
+ * If it's all lowecase convert to uppercase and accept it
+ */
+int Barcode_pls_verify(unsigned char *text)
+{
+ int i, upper = 0, lower = 0;
+
+ if (!strlen(text))
+ return -1;
+ for (i=0; text[i]; i++) {
+ if (!strchr(alphabet,toupper(text[i])))
+ return -1;
+ if (isupper(text[i])) upper++;
+ if (islower(text[i])) lower++;
+ }
+ if (upper && lower)
+ return -1;
+ return 0;
+}
+
+static int add_one(char *ptr, int code)
+{
+ sprintf(ptr, "%s%s%s%s",
+ patterns[code & 1],
+ patterns[(code >> 1) & 1],
+ patterns[(code >> 2) & 1],
+ patterns[(code >> 3) & 1]
+ );
+ return 0;
+}
+
+/*
+ * The encoding functions fills the "partial" and "textinfo" fields.
+ * Lowercase chars are converted to uppercase
+ */
+int Barcode_pls_encode(struct Barcode_Item *bc)
+{
+ static char *text;
+ static char *partial; /* dynamic */
+ static char *textinfo; /* dynamic */
+ char *c, *ptr, *textptr;
+ unsigned char *checkptr;
+ int i, code, textpos;
+ static char check[9] = {1,1,1,1,0,1,0,0,1};
+ if (bc->partial)
+ free(bc->partial);
+ if (bc->textinfo)
+ free(bc->textinfo);
+ bc->partial = bc->textinfo = NULL; /* safe */
+
+ if (!bc->encoding)
+ bc->encoding = strdup("plessey");
+
+ text = bc->ascii;
+ if (!text) {
+ bc->error = EINVAL;
+ return -1;
+ }
+ /* the partial code is 8 * (head + text + check + tail) + margin + term. */
+ partial = malloc( (strlen(text) + 4) * 8 + 3);
+ checkptr = calloc (1, strlen(text) * 4 + 8);
+
+ if (!partial || !checkptr) {
+ if (partial) free(partial);
+ if (checkptr) free(checkptr);
+ bc->error = errno;
+ return -1;
+ }
+
+ /* the text information is at most "nnn:fff:c " * strlen +term */
+ textinfo = malloc(10*strlen(text) + 2);
+ if (!textinfo) {
+ bc->error = errno;
+ free(partial);
+ return -1;
+ }
+
+ strcpy(partial, fillers[0]);
+ ptr = partial + strlen(partial);
+ textptr = textinfo;
+ textpos = startpos;
+
+ for (i=0; ierror = EINVAL; /* impossible if text is verified */
+ free(partial);
+ free(textinfo);
+ return -1;
+ }
+ code = c - alphabet;
+ add_one(ptr, code);
+ sprintf(textptr, "%i:12:%c ", textpos, toupper(text[i]));
+
+ textpos += width; /* width of each code */
+ textptr += strlen(textptr);
+ ptr += strlen(ptr);
+ checkptr[4*i] = code & 1;
+ checkptr[4*i+1] = (code >> 1) & 1;
+ checkptr[4*i+2] = (code >> 2) & 1;
+ checkptr[4*i+3] = (code >> 3) & 1;
+ }
+ /* The CRC checksum is required */
+ for (i=0; i < 4*strlen(text); i++) {
+ int j;
+ if (checkptr[i])
+ for (j = 0; j < 9; j++)
+ checkptr[i+j] ^= check[j];
+ }
+ for (i = 0; i < 8; i++) {
+ sprintf(ptr, patterns[checkptr[strlen(text) * 4 + i]]);
+ ptr += 2;
+ }
+ fprintf(stderr, "CRC: ");
+ for (i = 0; i < 8; i++) {
+ fputc('0' + checkptr[strlen(text) * 4 + i], stderr);
+ }
+ fputc('\n', stderr);
+ strcpy(ptr, fillers[1]);
+ bc->partial = partial;
+ bc->textinfo = textinfo;
+
+ return 0;
+}
diff --git a/oldProject/BarCode/ps.c b/oldProject/BarCode/ps.c
new file mode 100644
index 0000000..587d69c
--- /dev/null
+++ b/oldProject/BarCode/ps.c
@@ -0,0 +1,259 @@
+/*
+ * ps.c -- printing the "partial" bar encoding
+ *
+ * Copyright (c) 1999 Alessandro Rubini (rubini@gnu.org)
+ * Copyright (c) 1999 Prosa Srl. (prosa@prosa.it)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include
+#include
+#include
+#include
+#include
+
+#include "barcode.h"
+
+#define SHRINK_AMOUNT 0.15 /* shrink the bars to account for ink spreading */
+
+
+/*
+ * How do the "partial" and "textinfo" strings work?
+ *
+ * The first char in "partial" tells how much extra space to add to the
+ * left of the bars. For EAN-13, it is used to leave space to print the
+ * first digit, other codes may have '0' for no-extra-space-needed.
+ *
+ * The next characters are alternating bars and spaces, as multiples
+ * of the base dimension which is 1 unless the code is
+ * rescaled. Rescaling is calculated as the ratio from the requested
+ * width and the calculated width. Digits represent bar/space
+ * dimensions. Lower-case letters represent those bars that should
+ * extend lower than the others: 'a' is equivalent to '1', 'b' is '2' and
+ * so on.
+ *
+ * The "textinfo" string is made up of fields "%lf:%lf:%c" separated by
+ * blank space. The first integer is the x position of the character,
+ * the second is the font size (before rescaling) and the char item is
+ * the charcter to be printed.
+ *
+ * Both the "partial" and "textinfo" strings may include "-" or "+" as
+ * special characters (in "textinfo" the char should be a standalone
+ * word). They state where the text should be printed: below the bars
+ * ("-", default) or above the bars. This is used, for example, to
+ * print the add-5 and add-2 codes to the right of UPC or EAN codes
+ * (the add-5 extension is mostly used in ISBN codes.
+ */
+
+
+int Barcode_ps_print(struct Barcode_Item *bc, FILE *f)
+{
+ int i, j, k, barlen, printable=1;
+ double f1, f2, fsav=0;
+ int mode = '-'; /* text below bars */
+ double scalef=1, xpos, x0, y0, yr;
+ unsigned char *ptr;
+ unsigned char c;
+
+ if (!bc->partial || !bc->textinfo) {
+ bc->error = EINVAL;
+ return -1;
+ }
+
+
+ /*
+ * Maybe this first part can be made common to several printing back-ends,
+ * we'll see how that works when other ouput engines are added
+ */
+
+ /* First, calculate barlen */
+ barlen = bc->partial[0] - '0';
+ for (ptr = bc->partial+1; *ptr; ptr++)
+ if (isdigit(*ptr))
+ barlen += (*ptr - '0');
+ else if (islower(*ptr))
+ barlen += (*ptr - 'a'+1);
+
+ /* The scale factor depends on bar length */
+ if (!bc->scalef) {
+ if (!bc->width) bc->width = barlen; /* default */
+ scalef = bc->scalef = (double)bc->width / (double)barlen;
+ }
+
+ /* The width defaults to "just enough" */
+ if (!bc->width) bc->width = barlen * scalef +1;
+
+ /* But it can be too small, in this case enlarge and center the area */
+ if (bc->width < barlen * scalef) {
+ int wid = barlen * scalef + 1;
+ bc->xoff -= (wid - bc->width)/2 ;
+ bc->width = wid;
+ /* Can't extend too far on the left */
+ if (bc->xoff < 0) {
+ bc->width += -bc->xoff;
+ bc->xoff = 0;
+ }
+ }
+
+ /* The height defaults to 80 points (rescaled) */
+ if (!bc->height) bc->height = 80 * scalef;
+
+ /* If too small (5 + text), reduce the scale factor and center */
+ i = 5 + 10 * ((bc->flags & BARCODE_NO_ASCII)==0);
+ if (bc->height < i * scalef ) {
+ double scaleg = ((double)bc->height) / i;
+ int wid = bc->width * scaleg / scalef;
+ bc->xoff += (bc->width - wid)/2;
+ bc->width = wid;
+ scalef = scaleg;
+ }
+
+ /*
+ * Ok, then deal with actual ps (eps) output
+ */
+
+ if (!(bc->flags & BARCODE_OUT_NOHEADERS)) { /* spit a header first */
+ if (bc->flags & BARCODE_OUT_EPS)
+ fprintf(f, "%%!PS-Adobe-2.0 EPSF-1.2\n");
+ else
+ fprintf(f, "%%!PS-Adobe-2.0\n");
+ fprintf(f, "%%%%Creator: libbarcode\n");
+ if (bc->flags & BARCODE_OUT_EPS) {
+ fprintf(f, "%%%%BoundingBox: %i %i %i %i\n",
+ bc->xoff,
+ bc->yoff,
+ bc->xoff + bc->width + 2* bc->margin,
+ bc->yoff + bc->height + 2* bc->margin);
+ }
+ fprintf(f, "%%%%EndComments\n");
+ if (bc->flags & BARCODE_OUT_PS) {
+ fprintf(f, "%%%%EndProlog\n\n");
+ fprintf(f, "%%%%Page: 1 1\n\n");
+ }
+ }
+
+ /* Print some informative comments */
+ for (i=0; bc->ascii[i]; i++)
+ if (bc->ascii[i] < ' ')
+ printable = 0;
+
+ fprintf(f,"%% Printing barcode for \"%s\", scaled %5.2f",
+ printable ? bc->ascii : "", scalef);
+ if (bc->encoding)
+ fprintf(f,", encoded using \"%s\"",bc->encoding);
+ fprintf(f, "\n");
+ fprintf(f,"%% The space/bar succession is represented "
+ "by the following widths (space first):\n"
+ "%% ");
+ for (i=0; ipartial); i++) {
+ unsigned char c = bc->partial[i];
+ if (isdigit(c)) putc(c, f);
+ if (islower(c)) putc(c-'a'+'1', f);
+ if (isupper(c)) putc(c-'A'+'1', f);
+ }
+ /* open array for "forall" */
+ fprintf(f, "\n[\n%% height xpos ypos width"
+ " height xpos ypos width\n");
+
+ xpos = bc->margin + (bc->partial[0]-'0') * scalef;
+ for (ptr = bc->partial+1, i=1; *ptr; ptr++, i++) {
+ /* special cases: '+' and '-' */
+ if (*ptr == '+' || *ptr == '-') {
+ mode = *ptr; /* don't count it */ i++; continue;
+ }
+ /* j is the width of this bar/space */
+ if (isdigit (*ptr)) j = *ptr-'0';
+ else j = *ptr-'a'+1;
+ if (i%2) { /* bar */
+ x0 = bc->xoff + xpos + (j*scalef)/2;
+ y0 = bc->yoff + bc->margin;
+ yr = bc->height;
+ if (!(bc->flags & BARCODE_NO_ASCII)) { /* leave space for text */
+ if (mode == '-') {
+ /* text below bars: 10 points or five points */
+ y0 += (isdigit(*ptr) ? 10 : 5) * scalef;
+ yr -= (isdigit(*ptr) ? 10 : 5) * scalef;
+ } else { /* '+' */
+ /* text above bars: 10 or 0 from bottom, and 10 from top */
+ y0 += (isdigit(*ptr) ? 10 : 0) * scalef;
+ yr -= (isdigit(*ptr) ? 20 : 10) * scalef;
+ }
+ }
+ /* Define an array and then use "forall" (Hans Schou) */
+ fprintf(f," [%5.2f %6.2f %6.2f %5.2f]%s",
+ yr, x0, y0, (j * scalef) - SHRINK_AMOUNT,
+ i%4 == 1 ? " " : "\n");
+ }
+ xpos += j * scalef;
+ }
+ fprintf(f,"\n]\t{ {} forall setlinewidth moveto 0 exch rlineto stroke} "
+ "bind forall\n");
+
+ /* Then, the text */
+
+ mode = '-'; /* reinstantiate default */
+ if (!(bc->flags & BARCODE_NO_ASCII)) {
+ fprintf(f, "[\n%% char xpos ypos fontsize\n");
+ k=0; /* k is the "previous font size" */
+ for (ptr = bc->textinfo; ptr; ptr = strchr(ptr, ' ')) {
+ while (*ptr == ' ') ptr++;
+ if (!*ptr) break;
+ if (*ptr == '+' || *ptr == '-') {
+ mode = *ptr; continue;
+ }
+ if (sscanf(ptr, "%lf:%lf:%c", &f1, &f2, &c) != 3) {
+ fprintf(stderr, "barcode: impossible data: %s\n", ptr);
+ continue;
+ }
+
+ fprintf(f, " [(");
+ /* Both the backslash and the two parens are special */
+ if (c=='\\' || c==')' || c=='(')
+ fprintf(f, "\\%c) ", c);
+ else
+ fprintf(f, "%c) ", c);
+ fprintf(f, "%6.2f %6.2f %5.2f]\n",
+ bc->xoff + f1 * scalef + bc->margin,
+ mode == '-'
+ ? (double)bc->yoff + bc->margin
+ : (double)bc->yoff + bc->margin+bc->height - 8*scalef,
+ fsav == f2 ? 0.0 : f2 * scalef);
+ fsav = f2;
+ }
+ fprintf(f,"] { {} forall dup 0.00 ne {\n\t"
+ "/Helvetica findfont exch scalefont setfont\n"
+ " } {pop} ifelse\n"
+ " moveto show} bind forall\n");
+
+
+ }
+
+ fprintf(f,"%% End barcode for \"%s\"\n\n",
+ printable ? bc->ascii : "");
+
+ if (!(bc->flags & BARCODE_OUT_NOHEADERS)) {
+ if (bc->flags & BARCODE_OUT_PS) {
+ fprintf(f,"showpage\n");
+ fprintf(f, "%%%%Trailer\n\n");
+ }
+
+ }
+ return 0;
+}
+
+
+
+
diff --git a/oldProject/BarCode/rr/QBarCode.cpp b/oldProject/BarCode/rr/QBarCode.cpp
new file mode 100644
index 0000000..1549daf
--- /dev/null
+++ b/oldProject/BarCode/rr/QBarCode.cpp
@@ -0,0 +1,178 @@
+#include "QBarCode.h"
+#include "ui_myBarCode.h"
+#include "QImage"
+#include "QFile"
+#include "QFileInfo"
+#include "QDebug"
+#include "stdio.h"
+
+QBarCode::QBarCode(QWidget *parent) :
+ QDialog(parent),
+ ui(new Ui::QBarCode)
+{
+ ui->setupUi(this);
+
+ connect(ui->BarCodeGenerate,SIGNAL(pressed()),this,SLOT(onEnCodeBar()));
+
+ ui->lineEdit->setText("12345678ABCDEFG");
+
+ //onEnCodeBar();
+
+}
+
+QBarCode::~QBarCode()
+{
+ delete ui;
+}
+
+
+void QBarCode::onEnCodeBar(){
+
+ QFile f1;
+ //ui->lineEdit->setText("dfdsfdsfdsfdsf");
+ int ps = 1, pcl = 0, oflags;
+ ps = 0; pcl = 0;
+
+ oflags = BARCODE_OUT_PS | BARCODE_OUT_NOHEADERS;
+
+// char *txt = ui->lineEdit->text.toStdString().c_str();
+ //sprintf(txt,"%s", (char *)ui->lineEdit->text().data());
+ /* and my data as code-128B autodetected */
+ QString txt =ui->lineEdit->text();
+ Barcode_Encode_and_Print((char *)txt.toStdString().c_str(),stdout, 0, 60, 240, 510,
+ oflags);
+
+ /* A few code-39 ones */
+ // Barcode_Encode_and_Print("silly code",stdout, 0, 0, 40, 320,
+ // BARCODE_39 | oflags);
+
+// Barcode_Encode_and_Print("SAMPLE CODES",stdout, 100, 30, 400, 80,
+// BARCODE_39 | oflags);
+
+ /* ISBN with add-5 */
+// Barcode_Encode_and_Print("1-56592-292-1 90000",stdout, 0, 0, 40, 430,
+// BARCODE_ISBN | oflags);
+
+
+}
+/*
+ * Do it all in one step
+ */
+int QBarCode::Barcode_Encode_and_Print(char *text, FILE *f, int wid, int hei,
+ int xoff, int yoff, int flags)
+{
+ struct Barcode_Item * bc;
+
+ if (!(bc=Barcode_Create(text))) {
+ qDebug()<<"mem less then:";//<< -ENOMEM ;
+ return -1;
+ }
+
+ if ( Barcode_Position(bc, wid, hei, xoff, yoff, 0.0) < 0
+ || Barcode_Encode(bc, flags) < 0
+ //|| Barcode_Print(bc, f, flags) < 0
+ ) {
+ qDebug()<< bc->error;
+ Barcode_Delete(bc);
+ return -1;
+ }
+ //QFile f1;
+ bcText = text;
+ bcTextinfo = bc->textinfo;
+ bcPartial = bc->partial;
+ ui->textEdit->setText(bcPartial);
+
+ Barcode_ToImage(bc);
+
+ Barcode_Delete(bc);
+ return 0;
+}
+
+// 将条形码编码转换成点阵图形
+int QBarCode::Barcode_ToImage(Barcode_Item * bc ){
+ bc->ascii;
+ bc->partial;
+ bc->textinfo;
+ int len =QString(bc->partial).length();
+ bcWidth =6;
+ for(int i=0;ipartial[i]&0x0f);
+ //
+ //bcWidth = len;
+ bcHeight = 40;
+
+ QImage image(bcWidth,bcHeight,QImage::Format_ARGB32);
+ //image.dotsPerMeterX()
+ //image.size().setHeight(50);
+ image.fill(0x00ffffff);
+ //QPainter painter(&image);
+ //ui->textEdit->document()->drawContents (&painter, image.rect()); /*将text写到pic*/
+ QString txt = bc->ascii;
+
+ ui->textEdit->setText( QString().sprintf("W:%d,H:%d,Len:%d",ui->BarCodeView->width(),ui->BarCodeView->height(),len));
+
+ //0b1a2a4123221223211221132221231213212223112312131311222314111b3c1a1b
+ //11:12:1 22:12:2 33:12:3 44:12:4 55:12:5 66:12:6 77:12:7 88:12:8
+ //02112141232212232112211322212312132122231123121313112223141112331112
+
+ memset(pointMap,0,sizeof(pointMap));
+ unsigned char *img= image.bits();
+ for(int j=0;j< 20;j++){
+ int i=3;
+ unsigned char p=0;
+ for(int n=0;( npartial[n];
+ if(c<0x30 || c>127) continue;
+ c = c-0x30;
+ if(n%2==1){
+ for(int r=0;rlabBarCode->setPixmap(QPixmap(QString::fromUtf8(".\\imgd.BMP")));
+
+ //ui->widgetPrintTextDisplay->dat = pointMap;
+
+ ShowBarCode(fileName);
+}
+
+void QBarCode::ShowBarCode(QString fileName)
+{
+ /****************界面初始化********************************/
+
+ this->pictureName =fileName ;
+ scene = new QGraphicsScene;
+ scene->setSceneRect( -200,0,bcWidth*4+200,bcHeight);
+ scene->setItemIndexMethod(QGraphicsScene::NoIndex);
+ QPixmap pixmap(this->pictureName);
+ pixmap = pixmap.scaledToWidth(2.5*bcWidth);
+ item = scene->addPixmap(pixmap);
+
+ /***************设置view的场景*****************************/
+ ui->BarCodeView->setScene(scene);
+ ui->BarCodeView->setRenderHint(QPainter::Antialiasing);
+ ui->BarCodeView->setCacheMode(QGraphicsView::CacheBackground);
+ ui->BarCodeView->setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate);
+ ui->BarCodeView->setDragMode(QGraphicsView::ScrollHandDrag);
+ //ui->graphicsView->resize(400,300);
+
+ ui->BarCodeView->setScene(scene);//设置view的场景
+
+}
+
diff --git a/oldProject/BarCode/rr/QBarCode.h b/oldProject/BarCode/rr/QBarCode.h
new file mode 100644
index 0000000..080b347
--- /dev/null
+++ b/oldProject/BarCode/rr/QBarCode.h
@@ -0,0 +1,44 @@
+#ifndef QBARCODE_H
+#define QBARCODE_H
+
+#include
+#include "barcode.h"
+#include "QGraphicsScene"
+#include "QGraphicsPixmapItem"
+
+namespace Ui {
+ class QBarCode;
+}
+
+class QBarCode : public QDialog
+{
+ Q_OBJECT
+
+public:
+ explicit QBarCode(QWidget *parent = 0);
+ ~QBarCode();
+ unsigned char pointMap[40*1000];
+ QString pictureName;//当前显示的图片
+private slots:
+ void onEnCodeBar();
+
+private:
+ void ShowBarCode(QString fileName);
+ int Barcode_Encode_and_Print(char *text, FILE *f, int wid, int hei,
+ int xoff, int yoff, int flags);
+ int Barcode_ToImage(Barcode_Item * bc );
+
+ QGraphicsScene *scene;//声明scene
+ QGraphicsPixmapItem *item;//声明item
+
+ QString bcPartial;
+ QString bcTextinfo;
+ QString bcText;
+ int bcWidth,bcHeight;
+
+
+private:
+ Ui::QBarCode *ui;
+};
+
+#endif // QBARCODE_H
diff --git a/oldProject/BarCode/rr/QBarCode.ui b/oldProject/BarCode/rr/QBarCode.ui
new file mode 100644
index 0000000..ceeb9bf
--- /dev/null
+++ b/oldProject/BarCode/rr/QBarCode.ui
@@ -0,0 +1,147 @@
+
+
+ QBarCode
+
+
+
+ 0
+ 0
+ 680
+ 316
+
+
+
+ Form
+
+
+
-
+
+
-
+
+
+ -
+
+
+ 条形码类型
+
+
+
+ -
+
+
+ 字体
+
+
+
+ -
+
+
+ 条形码高度
+
+
+
+ -
+
+
+ 放大等级
+
+
+
+ -
+
+
+ -
+
+
+
+ 120
+ 0
+
+
+
+
+ -
+
+
+ -
+
+
+ 1
+
+
+ 10
+
+
+ 1
+
+
+
+ -
+
+
+ 插入文档
+
+
+
+ -
+
+
+ 文本信息
+
+
+
+ -
+
+
+ -
+
+
+
+ 16777215
+ 60
+
+
+
+
+ -
+
+
+ FileName
+
+
+
+ -
+
+
+ 打开文件
+
+
+
+ -
+
+
+ 生成条形码
+
+
+
+ -
+
+
+ 关闭
+
+
+
+
+
+ -
+
+
+ TextLabel
+
+
+
+
+
+
+
+
diff --git a/oldProject/Binarization/Binarization.cpp b/oldProject/Binarization/Binarization.cpp
new file mode 100644
index 0000000..0eff500
--- /dev/null
+++ b/oldProject/Binarization/Binarization.cpp
@@ -0,0 +1,141 @@
+#include "Binarization.h"
+
+CBinarization::CBinarization( QString imgPath )
+ : threshold(0)
+{
+ // ¼ÓÔØͼƬ
+ _img = new QImage();
+ if (NULL != _img)
+ {
+ _img->load(imgPath);
+ }
+}
+
+// Éú³ɻҶÈͼÏñ
+QImage* CBinarization::grayScaleImg()
+{
+ if (NULL == _img)
+ {
+ return NULL;
+ }
+ int nWidth = _img->width();
+ int nHeight = _img->height();
+
+ // ÕâÀïÁôÒ⣬ÎÒʹÓÃÁËQImage::Format_Grayscale8¸ñʽµÄͼƬ£¬ÕâÖÖͼƬÿ¸öÏñËØֻÓÃÁË8bit´洢»ҶÈÑÕɫֵ
+ QImage* grayImg = new QImage(nWidth, nHeight, QImage::Format_RGB888);
+ QRgb rgbVal = 0;
+ int grayVal = 0;
+
+ for (int x = 0; x < nWidth; ++x)
+ {
+ for (int y = 0; y < nHeight; ++y)
+ {
+ rgbVal = _img->pixel(x, y);
+
+ grayVal = qGray(rgbVal); // ÕâÀïµ÷ÓÃQtµĺ¯Êý£¬ʹÓÃ(R * 11 + G * 16 + B * 5)/32µķ½·¨¼ÆËã
+
+ grayImg->setPixel(x, y, QColor(grayVal, grayVal, grayVal).rgb());
+ }
+ }
+
+ return grayImg;
+}
+
+int CBinarization::Otsu(QImage* img)
+{
+ if (NULL == img)
+ {
+ return -1;
+ }
+ vector histogram = Histogram(img);
+ int total = 0;
+ for (int i = 0; i != histogram.size(); ++i)
+ {
+ total += histogram[i];
+ }
+
+ double sum = 0.0;
+ for (unsigned int i = 1; i < histogram.size(); ++i)
+ sum += i * histogram[i];
+ double sumB = 0.0;
+ double wB = 0.0;
+ double wF = 0.0;
+ double mB = 0.0;
+ double mF = 0.0;
+ double max = 0.0;
+ double between = 0.0;
+ double threshold = 0.0;
+ for (int i = 0; i != 256; ++i)
+ {
+ wB += histogram[i];
+ if (wB == 0)
+ continue;
+ wF = total - wB;
+ if (wF == 0)
+ break;
+ sumB += i * histogram[i];
+ mB = sumB / wB;
+ mF = (sum - sumB) / wF;
+ between = wB * wF * (mB - mF) * (mB - mF);
+ if ( between > max )
+ {
+ threshold = i;
+ max = between;
+ }
+ }
+ return threshold;
+}
+
+QImage* CBinarization::process(QImage* img)
+{
+ if (NULL == img)
+ {
+ return NULL;
+ }
+ int width = img->width();
+ int height = img->height();
+ int bytePerLine = img->bytesPerLine(); // ÿһÐеÄ×ֽÚÊý
+ unsigned char *data = img->bits();
+ unsigned char *binarydata = new unsigned char[bytePerLine * height];
+
+ unsigned char g = 0;
+ for (int i = 0; i < height; ++i)
+ {
+ for (int j = 0; j < width; ++j)
+ {
+ g = *(data + i * bytePerLine + j * 3); // ÕâÀïj ³ËÒÔ 3
+ if(int(g) >= threshold)
+ {
+ binarydata[ i * bytePerLine + j * 3] = 0xFF; // ÿ¸öɫֵÐèҪ¶Ô3¸ö×ֽڸ³ֵ
+ binarydata[ i * bytePerLine + j * 3 + 1] = 0xFF;
+ binarydata[ i * bytePerLine + j * 3 + 2] = 0xFF;
+ }
+ else
+ {
+ binarydata[ i * bytePerLine + j * 3] = 0x00;
+ binarydata[ i * bytePerLine + j * 3 + 1] = 0x00;
+ binarydata[ i * bytePerLine + j * 3 + 2] = 0x00;
+ }
+ }
+ }
+
+ QImage *ret = new QImage(binarydata, width, height, bytePerLine, QImage::Format_RGB888);
+ return ret;
+}
+
+std::vector CBinarization::Histogram( QImage* img )
+{
+ unsigned char* graydata = img->bits();
+ vector hist(256); // 256ɫ
+ for (int i = 0; i != img->width(); ++i)
+ {
+ for (int j = 0; j != img->height(); ++j)
+ {
+ int index = int(*graydata);
+ hist[index] += 1;
+ graydata += 1; // step
+ }
+ }
+ graydata = NULL;
+ return hist;
+}
diff --git a/oldProject/Binarization/Binarization.h b/oldProject/Binarization/Binarization.h
new file mode 100644
index 0000000..32a958d
--- /dev/null
+++ b/oldProject/Binarization/Binarization.h
@@ -0,0 +1,24 @@
+#ifndef CBINARIZATION_H
+#define CBINARIZATION_H
+
+#include
+#include
+
+using namespace std;
+
+class CBinarization
+{
+public:
+ CBinarization(QString imgPath);
+
+ QImage* grayScaleImg();
+ int Otsu(QImage* img);
+ QImage* process(QImage* img);
+ int threshold;
+
+private:
+ QImage* _img;
+
+ vector Histogram(QImage* img);
+};
+#endif
diff --git a/oldProject/CN/mainwindow.ui b/oldProject/CN/mainwindow.ui
new file mode 100644
index 0000000..7d8be97
--- /dev/null
+++ b/oldProject/CN/mainwindow.ui
@@ -0,0 +1,3813 @@
+
+
+ MainWindow
+
+
+ true
+
+
+
+ 0
+ 0
+ 640
+ 460
+
+
+
+
+ 0
+ 0
+
+
+
+
+ 0
+ 0
+
+
+
+
+ 5
+ 5
+
+
+
+ Qt::StrongFocus
+
+
+ InkJet
+
+
+
+
+ 0
+ 0
+ 641
+ 455
+
+
+
+
+ 0
+
+ -
+
+
+
+ 0
+ 50
+
+
+
+
+ 16777215
+ 50
+
+
+
+ 1
+
+
+
+
+ 0
+ 50
+
+
+
+
+ 16777215
+ 50
+
+
+
+
+
+
+ 0
+ 50
+
+
+
+
+
+ 0
+ 0
+ 686
+ 47
+
+
+
+
-
+
+
+
+ 0
+ 45
+
+
+
+ 编辑
+
+
+
+ :/icon/edit.png:/icon/edit.png
+
+
+
+ -
+
+
+
+ 0
+ 45
+
+
+
+ 打开文件
+
+
+
+ :/icon/fileopen.png:/icon/fileopen.png
+
+
+
+ -
+
+
+
+ 0
+ 45
+
+
+
+ 二维码
+
+
+
+ :/icon/bypm.png:/icon/bypm.png
+
+
+
+ -
+
+
+
+ 0
+ 45
+
+
+
+ 条形码
+
+
+
+ :/icon/BarCode1.png:/icon/BarCode1.png
+
+
+
+ -
+
+
+
+ 0
+ 45
+
+
+
+ 缩小
+
+
+
+ :/icon/zoomout.png:/icon/zoomout.png
+
+
+
+ -
+
+
+
+ 0
+ 45
+
+
+
+ 放大
+
+
+
+ :/icon/zoomin.png:/icon/zoomin.png
+
+
+
+ -
+
+
+ 交替打印文件名
+
+
+
+
+
+
+
+
+ -
+
+
+ 0
+
+
-
+
+
+
+ 0
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+ 最大:[40行x 2048列]
+
+
+ QFrame::NoFrame
+
+
+ QFrame::Sunken
+
+
+
+
+
+
+ -
+
+
+
+ 140
+ 25
+
+
+
+
+ 140
+ 25
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+
+ QFrame::NoFrame
+
+
+ QFrame::Sunken
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+
+ QFrame::NoFrame
+
+
+ QFrame::Sunken
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+ 同步器速度
+
+
+ QFrame::NoFrame
+
+
+ QFrame::Sunken
+
+
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ -
+
+
+
+ 0
+ 25
+
+
+
+
+ 100
+ 25
+
+
+
+ 当前时间
+
+
+
+
+
+
+
+
+ -
+
+
+
+ 640
+ 107
+
+
+
+ 0
+
+
+
+
-
+
+
+
+ 610
+ 95
+
+
+
+
+ 620
+ 96
+
+
+
+ BlankCursor
+
+
+ 0
+
+
+ false
+
+
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
+<html><head><meta name="qrichtext" content="1" /><style type="text/css">
+p, li { white-space: pre-wrap; }
+</style></head><body style=" font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;">
+<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'wenquanyi';"></p></body></html>
+
+
+
+
+
+
+
+
+
+ 5
+ 5
+ 620
+ 100
+
+
+
+
+ 0
+ 0
+
+
+
+
+ 620
+ 100
+
+
+
+
+ 16777215
+ 80
+
+
+
+ false
+
+
+
+
+ 0
+ 0
+ 500
+ 53
+
+
+
+
+ 0
+ 0
+
+
+
+
+ 0
+ 0
+
+
+
+
+
+
+
+
+ -
+
+
+ 0
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+ :/image/ALARMGreen.PNG
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+ :/image/ALARMGreen.PNG
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+ :/image/ALARMGreen.PNG
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+ :/image/ALARMGreen.PNG
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+ :/image/ALARMGreen.PNG
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+ :/image/ALARMGreen.PNG
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+ :/image/ALARMGreen.PNG
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+ :/image/ALARMGreen.PNG
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+ :/image/ALARMGreen.PNG
+
+
+
+ -
+
+
+
+ 0
+ 60
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+ :/image/reset.png
+
+
+
+
+
+ -
+
+
+ 0
+
+
-
+
+
+
+ 60
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+
+ 墨线开关
+
+
+
+ -
+
+
+
+ 60
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+
+ 喷头盖开
+
+
+
+ -
+
+
+
+ 60
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+
+ 墨水缸满
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 60
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+
+ 墨水液位
+
+
+
+ -
+
+
+
+ 60
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+
+ 溶剂液位
+
+
+
+ -
+
+
+
+ 60
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+
+ 回收故障
+
+
+
+ -
+
+
+
+ 60
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+
+ 粘度故障
+
+
+
+ -
+
+
+
+ 60
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+
+ 相位故障
+
+
+
+ -
+
+
+
+ 60
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+
+ 高压故障
+
+
+
+ -
+
+
+
+ 60
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+
+ 故障恢复
+
+
+
+
+
+ -
+
+
+ 0
+
+
+ 4
+
+
-
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+
+ 110
+ 0
+
+
+
+
+ 110
+ 16777215
+
+
+
+ 立即重新计米
+
+
+
+ -
+
+
+
+ 110
+ 20
+
+
+
+
+ 110
+ 16777215
+
+
+
+ QFrame::NoFrame
+
+
+ QFrame::Sunken
+
+
+ 产品计数
+
+
+
+ -
+
+
+
+ 110
+ 20
+
+
+
+
+ 110
+ 16777215
+
+
+
+ QFrame::WinPanel
+
+
+ QFrame::Sunken
+
+
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+
+ 110
+ 20
+
+
+
+
+ 110
+ 16777215
+
+
+
+ QFrame::NoFrame
+
+
+ QFrame::Sunken
+
+
+ 产品总计数
+
+
+
+ -
+
+
+
+ 110
+ 20
+
+
+
+
+ 110
+ 16777215
+
+
+
+ QFrame::WinPanel
+
+
+ QFrame::Sunken
+
+
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+
+ 110
+ 20
+
+
+
+
+ 110
+ 16777215
+
+
+
+ QFrame::NoFrame
+
+
+
+
+
+
+ -
+
+
+
+ 110
+ 40
+
+
+
+
+ 110
+ 16777215
+
+
+
+ Qt::LeftToRight
+
+
+ false
+
+
+ 关机
+
+
+
+ :/icon/poweroff.png:/icon/poweroff.png
+
+
+
+
+
+ -
+
+
+ 7
+
+
+ 5
+
+
+ 0
+
+
-
+
+
+ 6
+
+
+ 3
+
+
+ 0
+
+
+ 0
+
+
+ 3
+
+
-
+
+
+ 3
+
+
-
+
+
+ 3
+
+
-
+
+
+
+ 300
+ 0
+
+
+
+
+ 300
+ 16777215
+
+
+
+
+
+
+ true
+
+
+
+ -
+
+
+
+ 160
+ 0
+
+
+
+
+ 180
+ 20
+
+
+
+ 2014-08-23
+
+
+ Qt::AlignCenter
+
+
+
+
+
+ -
+
+
-
+
+
+ 0
+
+
-
+
+
+
+ 88
+ 0
+
+
+
+
+ 16777215
+ 20
+
+
+
+
+
+
+
+ -
+
+
+
+ 70
+ 20
+
+
+
+ 晶振电压
+
+
+
+ -
+
+
+
+ 35
+ 20
+
+
+
+ 粘度
+
+
+
+ -
+
+
+
+ 35
+ 20
+
+
+
+ 压力
+
+
+
+ -
+
+
+
+ 64
+ 0
+
+
+
+
+ 16777215
+ 20
+
+
+
+
+
+
+
+ -
+
+
+
+ 88
+ 0
+
+
+
+
+ 16777215
+ 20
+
+
+
+
+
+
+
+ -
+
+
+
+ 70
+ 20
+
+
+
+ 隔膜位置
+
+
+
+ -
+
+
+
+ 70
+ 0
+
+
+
+
+ 64
+ 20
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 60
+
+
+
+
+ 80
+ 16777215
+
+
+
+
+
+
+
+
+ 60
+ 60
+ 60
+
+
+
+
+
+
+
+
+ 60
+ 60
+ 60
+
+
+
+
+
+
+
+
+ 147
+ 146
+ 146
+
+
+
+
+
+
+
+ 开
+
+
+
+ :/icon/openreclaimtanl.png:/icon/openreclaimtanl.png
+
+
+
+ -
+
+
+
+ 60
+ 0
+
+
+
+
+ 70
+ 60
+
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 60
+
+
+
+
+ 80
+ 16777215
+
+
+
+ 关
+
+
+
+ :/icon/closereclaimtanl.png:/icon/closereclaimtanl.png
+
+
+
+
+
+
+
+
+
+ -
+
+
+ 3
+
+
+ 0
+
+
-
+
+
+
+ 0
+ 70
+
+
+
+
+ 110
+ 16777215
+
+
+
+
+
+
+
+
+ 0
+ 170
+ 0
+
+
+
+
+
+
+ 85
+ 170
+ 127
+
+
+
+
+
+
+ 0
+ 170
+ 0
+
+
+
+
+
+
+ 0
+ 170
+ 0
+
+
+
+
+
+
+ 0
+ 170
+ 0
+
+
+
+
+
+
+ 0
+ 170
+ 0
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 255
+ 255
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 255
+ 255
+ 255
+
+
+
+
+
+
+ 0
+ 170
+ 0
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 127
+ 212
+ 127
+
+
+
+
+
+
+ 255
+ 255
+ 220
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+
+
+ 85
+ 170
+ 127
+
+
+
+
+
+
+ 85
+ 170
+ 127
+
+
+
+
+
+
+ 85
+ 170
+ 127
+
+
+
+
+
+
+ 85
+ 170
+ 127
+
+
+
+
+
+
+ 85
+ 170
+ 127
+
+
+
+
+
+
+ 85
+ 170
+ 127
+
+
+
+
+
+
+ 85
+ 170
+ 127
+
+
+
+
+
+
+ 255
+ 255
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 255
+ 255
+ 255
+
+
+
+
+
+
+ 0
+ 170
+ 0
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 127
+ 212
+ 127
+
+
+
+
+
+
+ 255
+ 255
+ 220
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+
+
+ 186
+ 188
+ 185
+
+
+
+
+
+
+ 242
+ 241
+ 240
+
+
+
+
+
+
+ 186
+ 188
+ 185
+
+
+
+
+
+
+ 186
+ 188
+ 185
+
+
+
+
+
+
+ 186
+ 188
+ 185
+
+
+
+
+
+
+ 186
+ 188
+ 185
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 255
+ 255
+ 255
+
+
+
+
+
+
+ 147
+ 146
+ 146
+
+
+
+
+
+
+ 0
+ 170
+ 0
+
+
+
+
+
+
+ 0
+ 170
+ 0
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 0
+ 170
+ 0
+
+
+
+
+
+
+ 255
+ 255
+ 220
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+
+
+ :/icon/startprint2.png
+ :/icon/startprint1.png
+ :/icon/startprint1.png
+ :/icon/startprint.png:/icon/startprint2.png
+
+
+
+ 110
+ 70
+
+
+
+ false
+
+
+
+ -
+
+
+
+ 0
+ 70
+
+
+
+
+ 110
+ 16777215
+
+
+
+
+
+
+
+
+ 170
+ 0
+ 0
+
+
+
+
+
+
+ 193
+ 121
+ 121
+
+
+
+
+
+
+ 170
+ 0
+ 0
+
+
+
+
+
+
+ 193
+ 121
+ 121
+
+
+
+
+
+
+ 193
+ 121
+ 121
+
+
+
+
+
+
+ 193
+ 121
+ 121
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 255
+ 255
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 255
+ 255
+ 255
+
+
+
+
+
+
+ 227
+ 97
+ 75
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 241
+ 176
+ 165
+
+
+
+
+
+
+ 255
+ 255
+ 220
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+
+
+ 193
+ 121
+ 121
+
+
+
+
+
+
+ 193
+ 121
+ 121
+
+
+
+
+
+
+ 193
+ 121
+ 121
+
+
+
+
+
+
+ 193
+ 121
+ 121
+
+
+
+
+
+
+ 193
+ 121
+ 121
+
+
+
+
+
+
+ 193
+ 121
+ 121
+
+
+
+
+
+
+ 193
+ 121
+ 121
+
+
+
+
+
+
+ 255
+ 255
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 255
+ 255
+ 255
+
+
+
+
+
+
+ 227
+ 97
+ 75
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 241
+ 176
+ 165
+
+
+
+
+
+
+ 255
+ 255
+ 220
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+
+
+ 209
+ 199
+ 189
+
+
+
+
+
+
+ 242
+ 241
+ 240
+
+
+
+
+
+
+ 209
+ 199
+ 189
+
+
+
+
+
+
+ 209
+ 199
+ 189
+
+
+
+
+
+
+ 209
+ 199
+ 189
+
+
+
+
+
+
+ 209
+ 199
+ 189
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 255
+ 255
+ 255
+
+
+
+
+
+
+ 147
+ 146
+ 146
+
+
+
+
+
+
+ 227
+ 97
+ 75
+
+
+
+
+
+
+ 227
+ 97
+ 75
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 227
+ 97
+ 75
+
+
+
+
+
+
+ 255
+ 255
+ 220
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+
+
+ :/icon/stopprint2.png
+ :/icon/stopprint1.png
+ :/icon/stopprint1.png
+ :/icon/stopprint.png:/icon/stopprint2.png
+
+
+
+ 110
+ 70
+
+
+
+
+ -
+
+
+
+ 0
+ 70
+
+
+
+
+ 110
+ 16777215
+
+
+
+
+
+
+
+
+ 255
+ 170
+ 0
+
+
+
+
+
+
+ 206
+ 186
+ 124
+
+
+
+
+
+
+ 255
+ 170
+ 0
+
+
+
+
+
+
+ 255
+ 170
+ 0
+
+
+
+
+
+
+ 255
+ 170
+ 0
+
+
+
+
+
+
+ 255
+ 170
+ 0
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 255
+ 255
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 255
+ 255
+ 255
+
+
+
+
+
+
+ 255
+ 170
+ 0
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 255
+ 212
+ 127
+
+
+
+
+
+
+ 255
+ 255
+ 220
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+
+
+ 206
+ 186
+ 124
+
+
+
+
+
+
+ 206
+ 186
+ 124
+
+
+
+
+
+
+ 206
+ 186
+ 124
+
+
+
+
+
+
+ 206
+ 186
+ 124
+
+
+
+
+
+
+ 206
+ 186
+ 124
+
+
+
+
+
+
+ 206
+ 186
+ 124
+
+
+
+
+
+
+ 206
+ 186
+ 124
+
+
+
+
+
+
+ 255
+ 255
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 255
+ 255
+ 255
+
+
+
+
+
+
+ 255
+ 170
+ 0
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 255
+ 212
+ 127
+
+
+
+
+
+
+ 255
+ 255
+ 220
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+
+
+ 209
+ 206
+ 203
+
+
+
+
+
+
+ 242
+ 241
+ 240
+
+
+
+
+
+
+ 209
+ 199
+ 189
+
+
+
+
+
+
+ 209
+ 199
+ 189
+
+
+
+
+
+
+ 209
+ 199
+ 189
+
+
+
+
+
+
+ 209
+ 199
+ 189
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 255
+ 255
+ 255
+
+
+
+
+
+
+ 147
+ 146
+ 146
+
+
+
+
+
+
+ 255
+ 170
+ 0
+
+
+
+
+
+
+ 255
+ 170
+ 0
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 255
+ 170
+ 0
+
+
+
+
+
+
+ 255
+ 255
+ 220
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+
+
+ :/icon/pauseprint2.png
+ :/icon/pauseprint1.png
+ :/icon/pauseprint1.png
+ :/icon/pauseprint.png:/icon/pauseprint2.png
+
+
+
+ 110
+ 70
+
+
+
+
+ -
+
+
+
+ 0
+ 70
+
+
+
+
+ 110
+ 16777215
+
+
+
+ 喷嘴逆清洗
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PicWidget
+ QWidget
+
+ 1
+
+
+ ClickLabel
+ QLabel
+
+
+
+ TextEditOption
+ QWidget
+
+ 1
+
+
+ PrintTextDisplay
+ QWidget
+
+ 1
+
+
+ MyTextEdit
+ QTextEdit
+
+
+
+
+
+
+
+
diff --git a/oldProject/ClickLabel.cpp b/oldProject/ClickLabel.cpp
new file mode 100644
index 0000000..a95580f
--- /dev/null
+++ b/oldProject/ClickLabel.cpp
@@ -0,0 +1,6 @@
+#include
+#include
+void ClickLabel::mousePressEvent(QMouseEvent *evt)
+{
+ emit pressed();
+}
diff --git a/oldProject/ClickLabel.h b/oldProject/ClickLabel.h
new file mode 100644
index 0000000..80d46f4
--- /dev/null
+++ b/oldProject/ClickLabel.h
@@ -0,0 +1,20 @@
+#ifndef __CLICKLABEL__
+#define __CLICKLABEL__
+
+#include
+
+class ClickLabel:public QLabel{
+ Q_OBJECT
+
+ signals:
+ void pressed(void);
+ public:
+ ClickLabel(QWidget *parent=0): QLabel(parent){
+ }
+
+ protected:
+ void mousePressEvent( QMouseEvent* );
+
+};
+
+#endif
diff --git a/oldProject/DacDisplayAndEdit.cpp b/oldProject/DacDisplayAndEdit.cpp
new file mode 100644
index 0000000..b52b015
--- /dev/null
+++ b/oldProject/DacDisplayAndEdit.cpp
@@ -0,0 +1,96 @@
+
+#include "DacDisplayAndEdit.h"
+#include "ui_dacdisplayandedit.h"
+#include "QLatin1Char"
+#include "qdebug.h"
+#include "qmessagebox.h"
+
+DacDisplayAndEdit::DacDisplayAndEdit(QWidget *parent) :
+ QWidget(parent),
+ ui(new Ui::DacDisplayAndEdit)
+{
+ ui->setupUi(this);
+ for(int i = 0; i < DAC_GRID_MAX_ROW*DAC_GRID_MAX_COL; i++){
+ memLineEdit[i] = new QLineEdit(this);
+ memLineEdit[i]->setAccessibleName(QString::number(i));
+ memLineEdit[i]->setEnabled(false);
+ ui->gridLayoutMem->addWidget(memLineEdit[i],(i/DAC_GRID_MAX_COL) + 1,(i%DAC_GRID_MAX_COL) + 1);
+ connect(memLineEdit[i],SIGNAL(editingFinished ()),this,SLOT(onLineEditEditingFinished()));
+ }
+ for(int i = 0; i < DAC_GRID_MAX_ROW; i++){
+ rowLabel[i] = new QLabel(this);
+ ui->gridLayoutMem->addWidget(rowLabel[i],i + 1,0);
+ }
+ editFlag = false;
+ writeMemBaseAddr = 0;
+ readMemBaseAddr = 0;
+ setEnabled(1);
+}
+
+DacDisplayAndEdit::~DacDisplayAndEdit()
+{
+ delete ui;
+}
+// updateSysStatusToUI
+void DacDisplayAndEdit::updateSysStatusToUI(void){
+ //
+}
+void DacDisplayAndEdit::updateAuthorization(int auth)
+{
+ //qDebug ()<setText(QString(" "));
+ for(int i = 1; i < DAC_GRID_MAX_ROW*DAC_GRID_MAX_COL; i++){
+ if(sysPara->para.adjVolDacRate[i&MAX_RD_DAC_SIZE_MASK]>25)sysPara->para.adjVolDacRate[i&MAX_RD_DAC_SIZE_MASK]=25;
+ if(sysPara->para.adjVolDacRate[i&MAX_RD_DAC_SIZE_MASK]<5) sysPara->para.adjVolDacRate[i&MAX_RD_DAC_SIZE_MASK]=5;
+ memLineEdit[i]->setText(QString("%1").arg(sysPara->para.adjVolDacRate[i&MAX_RD_DAC_SIZE_MASK],2,10/*,QLatin1Char('0')*/));
+ }
+ }
+}
+
+void DacDisplayAndEdit::on_pushButtonEdit_pressed()
+{//ddd
+ if(sysPara){
+ editFlag = !editFlag;
+ for(int i = 1; i < DAC_GRID_MAX_ROW*DAC_GRID_MAX_COL; i++){
+ memLineEdit[i]->setEnabled(editFlag);
+ if(editFlag) memLineEdit[i]->setText(QString("%1").arg(sysPara->para.adjVolDacRate[i&MAX_RD_DAC_SIZE_MASK],2,10,QLatin1Char('0')));
+
+ }
+ ui->pushButtonEdit->setText(editFlag?tr("完成"):tr("编辑"));
+ }
+}
+void DacDisplayAndEdit::on_pushButtonDefault_pressed()// pushButtonDefault pushButtonDefault
+{
+ if(sysPara){
+ QMessageBox msgBox(QMessageBox::Information,tr("提示"),tr("是否将点距微调参数设置为默认值?"));
+ QPushButton *saveButton = msgBox.addButton(tr("是"), QMessageBox::ActionRole);
+ QPushButton *cancleSaveButton = msgBox.addButton(tr("否"), QMessageBox::ActionRole);
+ QPushButton *abortButton = msgBox.addButton(QMessageBox::Cancel);
+ msgBox.exec();
+ if (msgBox.clickedButton() == saveButton) {
+ for(int i = 1; i < DAC_GRID_MAX_ROW*DAC_GRID_MAX_COL; i++){
+ sysPara->para.adjVolDacRate[i&MAX_RD_DAC_SIZE_MASK]=15;
+ memLineEdit[i]->setText(tr("%1").arg(sysPara->para.adjVolDacRate[i&MAX_RD_DAC_SIZE_MASK],2,10,QLatin1Char('0')));
+ }
+ }
+ }
+ else qDebug()<<"sysPara not bind!";
+}
+
+void DacDisplayAndEdit::onLineEditEditingFinished(){
+ int val,addr=0;
+ bool ok;
+ QLineEdit * edit = qobject_cast(sender());
+ QString name = edit->accessibleName();
+ val = edit->text().toInt(&ok,10);
+ if(sysPara){
+ addr = name.toInt(&ok);
+ if(val>25)val=25;
+ if(val<5) val =5;
+ sysPara->para.adjVolDacRate[(addr)&MAX_RD_DAC_SIZE_MASK] = (unsigned char)val;
+ }
+}
diff --git a/oldProject/DacDisplayAndEdit.h b/oldProject/DacDisplayAndEdit.h
new file mode 100644
index 0000000..8c30d84
--- /dev/null
+++ b/oldProject/DacDisplayAndEdit.h
@@ -0,0 +1,45 @@
+#ifndef DACDISPLAYANDEDIT_H
+#define DACDISPLAYANDEDIT_H
+
+#include
+#include
+#include
+#include
+#define DAC_GRID_MAX_ROW 4
+#define DAC_GRID_MAX_COL 10
+#define MAX_RD_DAC_SIZE_MASK 0x3f
+#define MAX_WR_DAC_SIZE_MASK 0x3f
+namespace Ui {
+class DacDisplayAndEdit;
+}
+
+class DacDisplayAndEdit : public QWidget,public ParaSettingUI
+{
+ Q_OBJECT
+
+public:
+ explicit DacDisplayAndEdit(QWidget *parent = 0);
+ ~DacDisplayAndEdit();
+
+ void updateSysStatusToUI(void);
+ void updateSysParaToUI(void);
+ void updateAuthorization(int auth);
+
+private slots:
+ void on_pushButtonEdit_pressed();
+ void on_pushButtonDefault_pressed();
+ void onLineEditEditingFinished();
+
+
+private:
+ Ui::DacDisplayAndEdit *ui;
+ QLineEdit *memLineEdit[DAC_GRID_MAX_ROW*DAC_GRID_MAX_COL];
+ QLabel *rowLabel[DAC_GRID_MAX_ROW];
+ bool editFlag; //是否当前处于编辑模式
+ int writeMemBaseAddr;
+ int readMemBaseAddr;
+};
+
+#endif
+// DacDisplayANDEDIT_H
+
diff --git a/oldProject/Dbredis/dbredis.cpp b/oldProject/Dbredis/dbredis.cpp
new file mode 100644
index 0000000..494d54e
--- /dev/null
+++ b/oldProject/Dbredis/dbredis.cpp
@@ -0,0 +1,158 @@
+#include "dbredis.h"
+#include
+
+QSqlDatabase DBRedis::m_DataBase;
+QString DBRedis::m_ConnectName = "dbredis";
+bool DBRedis::m_HasInit = false;
+
+
+DBRedis::DBRedis()
+{
+
+}
+
+DBRedis::~DBRedis()
+{
+ if (m_DataBase.isOpen())
+ {
+ m_DataBase.close();
+ }
+}
+
+int DBRedis::deleteExpiredEntries()
+{
+ int res = init();
+ if (res)
+ {
+ return res;
+ }
+
+ qint64 currentTimestamp = QDateTime::currentDateTime().toSecsSinceEpoch();
+ QSqlQuery query(m_DataBase);
+ query.prepare("DELETE FROM data_store WHERE expiry > 0 AND expiry < :currentTimestamp");
+ query.bindValue(":currentTimestamp", currentTimestamp);
+
+ if (!query.exec())
+ {
+ qDebug() << "Error deleting expired entries:" << query.lastError().text();
+ return 1;
+ }
+ return 0;
+}
+
+
+
+int DBRedis::setData(const QString & key, const QString & value, uint32_t expiry)
+{
+ int res = deleteExpiredEntries();
+ if (res)
+ {
+ return res;
+ }
+
+ QSqlQuery query(m_DataBase);
+ query.prepare("SELECT COUNT(*) FROM data_store WHERE key = :key");
+ query.bindValue(":key", key);
+ if (!query.exec())
+ {
+ qDebug() << "Error checking existing key";
+ return 1;
+ }
+ int count = 0;
+ while (query.next())
+ {
+ count += query.value(0).toInt();
+ }
+ if (count > 0)
+ {
+ query.prepare("UPDATE data_store SET value = :value, expiry = :expiry WHERE key = :key");
+ query.bindValue(":value", value);
+ query.bindValue(":expiry", expiry > 0 ? QDateTime::currentDateTime().toSecsSinceEpoch() + expiry : 0);
+ query.bindValue(":key", key);
+ }
+ else
+ {
+ query.prepare("INSERT INTO data_store (key, value, expiry) VALUES (:key, :value, :expiry)");
+ query.bindValue(":key", key);
+ query.bindValue(":value", value);
+ query.bindValue(":expiry", expiry > 0 ? QDateTime::currentDateTime().toSecsSinceEpoch() + expiry : 0);
+ }
+ if (!query.exec())
+ {
+ qDebug() << "Error setting value:" << query.lastError().text();
+ return 1;
+ }
+ return 0;
+}
+
+int DBRedis::getData(const QString & key, QString & value)
+{
+ value.clear();
+ int res = deleteExpiredEntries();
+ if (res)
+ {
+ return res;
+ }
+
+ QSqlQuery query(m_DataBase);
+ query.prepare("SELECT value FROM data_store WHERE key = :key");
+ query.bindValue(":key", key);
+ if (!query.exec())
+ {
+ qDebug() << "Error getting value:" << query.lastError().text();
+ return 1;
+ }
+ if (!query.next())
+ {
+ qDebug() << "Error getting value:" << query.lastError().text();
+ return 2;
+ }
+ value = query.value(0).toString();
+ return 0;
+}
+
+int DBRedis::deleteData(const QString & key)
+{
+ int res = deleteExpiredEntries();
+ if (res)
+ {
+ return res;
+ }
+
+ QSqlQuery query(m_DataBase);
+ query.prepare("DELETE FROM data_store WHERE key = :key");
+ query.bindValue(":key", key);
+ if (!query.exec())
+ {
+ qDebug() << "Error deleting value:" << query.lastError().text();
+ return 1;
+ }
+ return 0;
+}
+
+int DBRedis::init()
+{
+ if (m_HasInit)
+ {
+ return 0;
+ }
+ m_DataBase = QSqlDatabase::addDatabase("QSQLITE", m_ConnectName);
+ m_DataBase.setDatabaseName("dbredis.db");
+ if (m_DataBase.open())
+ {
+ QString table = "CREATE TABLE IF NOT EXISTS data_store(key TEXT, value TEXT, expiry INTEGER)";
+ QSqlQuery query(QSqlDatabase::database(m_ConnectName));
+ if (!query.exec(table.toUtf8()))
+ {
+ qDebug() << "Error deleting value:" << query.lastError().text();
+ return 1;
+ }
+ }
+ else
+ {
+ qDebug() << "Error db open fail";
+ return 3;
+ }
+ m_HasInit = true;
+ return 0;
+}
diff --git a/oldProject/Dbredis/dbredis.h b/oldProject/Dbredis/dbredis.h
new file mode 100644
index 0000000..adf79d8
--- /dev/null
+++ b/oldProject/Dbredis/dbredis.h
@@ -0,0 +1,80 @@
+#ifndef __DBREDIS_H
+#define __DBREDIS_H
+
+#include
+
+
+class DBRedis
+{
+public:
+ DBRedis();
+ ~DBRedis();
+ /***
+ * @描述 : 设定值
+ * @入参 : key 键
+ value 值
+ expiry 单位为秒 默认为 0
+ 0 为永不过期
+ 其他值必须大于0
+ * @输出 : 无
+ * @返回 : 0 成功
+ 1 数据库错误
+ 3 数据库错误
+ */
+ static int setData(const QString&key, const QString&value, uint32_t expiry = 0);
+
+
+
+ /***
+ * @描述 : 获取值
+ * @入参 : key 键
+ * @输出 : value 值
+ * @返回 : 0 成功
+ 1 数据库错误
+ 2 不存在该数据或已过期
+ 3 数据库错误
+ */
+ static int getData(const QString&key, QString&value);
+
+
+ /***
+ * @描述 : 删除值
+ * @入参 : key 键
+ * @输出 : 无
+ * @返回 : 0 成功
+ 1 数据库错误
+ 3 数据库错误
+ */
+ static int deleteData(const QString&key);
+private:
+ static QSqlDatabase m_DataBase;
+ static QString m_ConnectName;
+ static bool m_HasInit;
+private:
+ /***
+ * @描述 : 初始化
+ * @入参 : 无
+ * @输出 : 无
+ * @返回 : 0 成功
+ 1 数据库错误
+ 3 数据库错误
+ */
+ static int init();
+
+
+ /***
+ * @描述 : 删除过期的条目
+ * @入参 : 无
+ * @输出 : 无
+ * @返回 : 0 成功
+ 1 数据库错误
+ 3 数据库错误
+ */
+ static int deleteExpiredEntries();
+};
+
+
+
+#endif // !__DBREDIS_H
+
+
diff --git a/oldProject/DevOp.cpp b/oldProject/DevOp.cpp
new file mode 100644
index 0000000..bd99ee1
--- /dev/null
+++ b/oldProject/DevOp.cpp
@@ -0,0 +1,4551 @@
+/*
+ * DevOp.cpp
+ *
+ * Created on: Jun 25, 2013
+ * Author: yiyu
+ * QQ:1036184468
+ * Descriptoin:设备操作模块,各种泵阀之类的操作都在此处
+
+ */
+
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include "LogInfo.h"
+#include
+#include "InputMethod.h"
+#include "InkJetPrinter.h"
+#include
+#include
+#include
+#include
+#include
+#include
+#ifndef Q_OS_WIN32
+#include
+#include
+#else
+#define ioctl(a,...) (0 == 0)
+#endif
+#include
+#include
+#include
+#include
+#include
+#include
+#include "SysPara.h"
+#include
+#include "DevOp.h"
+#include "Public.h"
+#include "myinclude.h"
+
+#include "qnamespace.h"
+#include
+#include
+
+#include
+#include
+
+unsigned short DACArray[64];
+quint16 notGapDACArray[64];
+quint16 fullColDACArray[64];
+
+int fast_64k_5dot_full_default_dac[] = {65, 87, 105, 121, 134};
+int fast_64k_5dot_adj_default_dac[] = {62, 77, 91, 105, 120};
+int fast_64k_5dot_continue_default_dac[] = {0, 86, 102, 117, 133};
+int fast_64k_7dot_full_default_dac[] = {65, 87, 104, 120, 134, 147, 157};
+int fast_64k_7dot_adj_default_dac[] = {62, 77, 90, 102, 114, 126, 140};
+int fast_64k_7dot_continue_default_dac[] = {0, 86, 102, 116, 130, 142, 155};
+int fast_64k_9dot_full_default_dac[] = {65, 87, 105, 121, 137, 151, 164, 168, 181};
+int fast_64k_9dot_adj_default_dac[] = {62, 77, 90, 103, 116, 131, 143, 157, 173};
+int fast_64k_9dot_continue_default_dac[] = {0, 86, 102, 117, 132, 145, 161, 164, 181};
+
+int normal_64k_5dot_full_default_dac[] = {65, 80, 91, 102, 113};
+int normal_64k_5dot_adj_default_dac[] = {64, 76, 87, 97, 109};
+int normal_64k_5dot_continue_default_dac[] = {0, 79, 91, 102, 113};
+int normal_64k_7dot_full_default_dac[] = {65, 80, 92, 104, 115, 126, 137};
+int normal_64k_7dot_adj_default_dac[] = {64, 76, 87, 97, 108, 119, 131};
+int normal_64k_7dot_continue_default_dac[] = {0, 79, 91, 102, 114, 125, 136};
+int normal_64k_9dot_full_default_dac[] = {65, 80, 92, 104, 115, 126, 137, 148, 158};
+int normal_64k_9dot_adj_default_dac[] = {64, 76, 87, 97, 108, 119, 130, 141, 152};
+int normal_64k_9dot_continue_default_dac[] = {0, 79, 91, 102, 114, 125, 136, 147, 157};
+
+int normal_64k_12dot_full_default_dac[] = {65, 80, 92, 104, 115, 126, 137, 148, 159, 170, 179, 190};
+int normal_64k_12dot_adj_default_dac[] = {64, 76, 87, 97, 108, 119, 129, 140, 150, 160, 170, 181};
+int normal_64k_12dot_continue_default_dac[] = {0, 79, 91, 102, 114, 124, 135, 146, 156, 166, 176, 187};
+int normal_64k_16dot_full_default_dac[] = {65, 80, 92, 104, 115, 126, 137, 148, 159, 170, 181, 192, 202, 212, 221, 227};
+int normal_64k_16dot_adj_default_dac[] = {64, 76, 87, 97, 108, 119, 129, 140, 150, 160, 170, 180, 190, 200, 210, 220};
+int normal_64k_16dot_continue_default_dac[] = {0, 79, 91, 102, 114, 124, 135, 146, 156, 166, 176, 187, 197, 207, 217, 226};
+
+int normal_64k_24dot_full_default_dac[] = {65, 80, 90, 101, 112, 122, 133, 144, 155, 166, 177, 188, 198, 208, 217, 225,235,243,256,263,275,283,292,300};
+int normal_64k_24dot_adj_default_dac[] = {64, 75, 85, 95, 104, 114, 123, 135, 145, 154, 165, 175, 185, 195, 205, 215,224,232,242,252,260,269,278,287};
+int normal_64k_24dot_continue_default_dac[] = {0, 79, 89, 99, 110, 120, 130, 140, 150, 160, 171, 182, 192, 202, 210, 220,230,239,248,257,266,275,284,293};
+
+int slow1_64k_5dot_full_default_dac[] = {65, 77, 87, 97, 107};
+int slow1_64k_5dot_adj_default_dac[] = {65, 75, 85, 95, 105};
+int slow1_64k_5dot_continue_default_dac[] = {0, 77, 87, 97, 107};
+int slow1_64k_7dot_full_default_dac[] = {65, 77, 87, 97, 107, 117, 127};
+int slow1_64k_7dot_adj_default_dac[] = {65, 75, 85, 95, 104, 113, 124};
+int slow1_64k_7dot_continue_default_dac[] = {0, 77, 87, 97, 107, 117, 127};
+int slow1_64k_9dot_full_default_dac[] = {65, 77, 87, 97, 107, 117, 127, 137, 146};
+int slow1_64k_9dot_adj_default_dac[] = {65, 75, 85, 95, 104, 113, 123, 133, 143};
+int slow1_64k_9dot_continue_default_dac[] = {0, 77, 87, 96, 106, 116, 126, 136, 146};
+int slow1_64k_12dot_full_default_dac[] = {65, 77, 87, 97, 107, 117, 127, 137, 147, 157, 167, 176};
+int slow1_64k_12dot_adj_default_dac[] = {65, 75, 85, 94, 104, 113, 123, 133, 142, 151, 161, 171};
+int slow1_64k_12dot_continue_default_dac[] = {0, 77, 87, 96, 106, 116, 126, 136, 146, 155, 165, 175};
+int slow1_64k_16dot_full_default_dac[] = {65, 77, 87, 97, 107, 117, 127, 137, 147, 157, 167, 176, 186, 195, 204, 213};
+int slow1_64k_16dot_adj_default_dac[] = {65, 75, 85, 94, 104, 113, 123, 133, 142, 151, 161, 170, 179, 188, 197, 206};
+int slow1_64k_16dot_continue_default_dac[] = {0, 77, 87, 96, 106, 116, 126, 136, 146, 155, 165, 174, 183, 192, 201, 210};
+int slow1_64k_24dot_full_default_dac[] = {65, 76, 85, 94, 103, 112, 121, 130, 139, 148, 157, 166, 175, 184, 192, 201,210,219,228,236,245,253,261,268};
+int slow1_64k_24dot_adj_default_dac[] = {65, 74, 83, 92, 101, 109, 117, 126, 134, 142, 150, 159, 168, 176, 185, 193,202,210,218,226,234,242,250,257};
+int slow1_64k_24dot_continue_default_dac[] = {0, 76, 84, 93, 101, 110, 119, 128, 137, 146, 153, 162, 171, 180, 189, 198,206,215,223,231,239,247,255,263};
+
+/* ==============64k end ========================*/
+
+/* ============== 96k ========================*/
+int fast_96k_5dot_full_default_dac[] = {68, 92, 107, 118, 125};
+int fast_96k_5dot_adj_default_dac[] = {66, 77, 88, 99, 109};
+int fast_96k_5dot_continue_default_dac[] = {0, 91, 103, 115, 127};
+
+int fast_96k_5dot_full_default_dac_H[] = {80, 108, 124, 144, 156};
+int fast_96k_5dot_adj_default_dac_H[] = {74, 89, 105, 121, 136};
+int fast_96k_5dot_continue_default_dac_H[] = {0, 104, 120, 136, 152};
+
+int fast_96k_7dot_full_default_dac[] = {68, 92, 107, 120, 132, 142, 151};
+int fast_96k_7dot_adj_default_dac[] = {62, 74, 85, 97, 108, 120, 132};
+int fast_96k_7dot_continue_default_dac[] = {0, 85, 98, 111, 124, 137, 150};
+
+int fast_96k_7dot_full_default_dac_H[] = {80, 108, 125, 144, 160, 176, 186};
+int fast_96k_7dot_adj_default_dac_H[] = {76, 91, 106, 118, 132, 146, 164};
+int fast_96k_7dot_continue_default_dac_H[] = {0, 104, 120, 136, 152, 166, 184};
+
+int fast_96k_7dot_full_default_dac_S[] = {80, 108, 124, 138, 152, 164, 174};
+int fast_96k_7dot_adj_default_dac_S[] = {76, 91, 102, 114, 127, 140, 152};
+int fast_96k_7dot_continue_default_dac_S[] = {0, 104, 120, 134, 147, 160, 172};
+
+int fast_96k_9dot_full_default_dac[] = {68, 92, 107, 120, 132, 142, 150, 146, 154};
+
+int fast_96k_9dot_adj_default_dac[] = {62, 73, 84, 95, 106, 117, 128, 139, 150};
+int fast_96k_9dot_continue_default_dac[] = {0, 85, 98, 111, 124, 137, 148, 146, 153};
+
+int fast_96k_9dot_full_default_dac_S[] = {68, 92, 107, 120, 131, 142, 150, 160, 170};
+int fast_96k_9dot_adj_default_dac_S[] = {60, 72, 83, 94, 105, 116, 127, 138, 148};
+int fast_96k_9dot_continue_default_dac_S[] = {0, 85, 98, 113, 125, 141, 153, 164, 172};
+
+int fast_96k_12dot_full_default_dac[] = {60, 82, 96, 110, 124, 138, 152, 152, 164, 176, 188, 200};
+int fast_96k_12dot_adj_default_dac[] = {57, 71, 83, 95, 107, 119, 131, 143, 155, 167, 179, 191};
+int fast_96k_12dot_continue_default_dac[] = {0, 82, 98, 113, 126, 139, 152, 152, 164, 176, 188, 200};
+
+int fast_96k_12dot_full_default_dac_U[] = {68, 92, 106, 120, 132, 144, 154, 154, 166, 178, 190, 200};
+int fast_96k_12dot_adj_default_dac_U[] = {0, 65, 83, 95, 108, 120, 132, 144, 156, 168, 180, 192};
+int fast_96k_12dot_continue_default_dac_U[] = {0, 0, 95, 111, 126 , 139, 151, 153, 165, 177, 188, 200};
+
+int fast_96k_12dot_full_default_dac_UD[] = {63, 85, 99, 111, 123, 135, 147, 147, 158, 169, 180, 190};
+int fast_96k_12dot_adj_default_dac_UD[] = {0, 60, 77, 88, 99, 110, 122, 134, 146, 158, 170, 182};
+int fast_96k_12dot_continue_default_dac_UD[] = {0, 0, 90, 106, 121, 134, 146, 148, 160, 171, 181, 190};
+
+int fast_96k_12dot_full_default_dac_H[] = {68, 90, 108, 125, 141, 156, 170, 170, 180, 193, 204, 214};
+int fast_96k_12dot_adj_default_dac_H[] = {59, 73, 86, 99, 112, 125, 138, 151, 164, 177, 190, 203};
+int fast_96k_12dot_continue_default_dac_H[] = {0, 87, 102, 117, 131 , 145, 159, 161, 173, 186, 199, 212};
+
+int fast_96k_12dot_full_default_dac_HU[] = {68, 90, 108, 125, 141, 156, 169, 170, 181, 192, 203, 212};
+int fast_96k_12dot_adj_default_dac_HU[] = {0, 70, 86, 99, 112, 125, 138, 151, 164, 177, 190, 202};
+int fast_96k_12dot_continue_default_dac_HU[] = {0, 0, 100, 117, 130, 143, 157, 160, 173, 186, 199, 211};
+
+int normal_96k_5dot_full_default_dac[] = {70, 84, 96, 106, 116};
+int normal_96k_5dot_adj_default_dac[] = {70, 81, 91, 101, 111};
+int normal_96k_5dot_continue_default_dac[] = {0, 82, 94, 104, 114};
+
+int normal_96k_5dot_full_default_dac_H[] = {80, 96, 110, 124, 134};
+int normal_96k_5dot_adj_default_dac_H[] = {78, 91, 105, 117, 129};
+int normal_96k_5dot_continue_default_dac_H[] = {0, 94, 108, 121, 134};
+
+int normal_96k_7dot_full_default_dac[] = {70, 84, 96, 106, 116, 126, 135};
+int normal_96k_7dot_adj_default_dac[] = {69, 80, 90, 100, 110, 120, 129};
+int normal_96k_7dot_continue_default_dac[] = {0, 82, 94, 104, 114, 124, 134};
+
+int normal_96k_7dot_full_default_dac_H[] = {80, 96, 110, 124, 138, 152, 162};
+int normal_96k_7dot_adj_default_dac_H[] = {78, 91, 105, 118, 131, 144, 156};
+int normal_96k_7dot_continue_default_dac_H[] = {0, 94, 108, 121, 134, 147, 160};
+
+int normal_96k_9dot_full_default_dac[] = {70, 84, 94, 104, 114, 124, 134, 144, 150};
+int normal_96k_9dot_adj_default_dac[] = {68, 78, 88, 98, 107, 117, 126, 136, 143};
+int normal_96k_9dot_continue_default_dac[] = {0, 82, 92, 102, 112, 122, 132, 142, 152};
+
+int normal_96k_9dot_full_default_dac_H[] = {80, 98, 112, 126, 138, 148, 158, 168, 178};
+int normal_96k_9dot_adj_default_dac_H[] = {76, 88, 100, 112, 124, 135, 146, 157, 170};
+int normal_96k_9dot_continue_default_dac_H[] = {0, 94, 108, 120, 132, 144, 155, 165, 176};
+
+int normal_96k_12dot_full_default_dac[] = {70, 86, 97, 106, 115, 124, 133, 142, 151, 160, 169, 176};
+int normal_96k_12dot_adj_default_dac[] = {68, 77, 86, 95, 104, 113, 122, 131, 140, 149, 158, 167};
+int normal_96k_12dot_continue_default_dac[] = {0, 83, 92, 101, 110, 119, 128, 137, 146, 156, 165, 174};
+
+int normal_96k_12dot_full_default_dac_U[] = {72, 83, 92, 101, 110, 119, 128, 137, 146, 155, 164};
+int normal_96k_12dot_adj_default_dac_U[] = {0, 74, 83, 92, 101, 110, 119, 128, 137, 146, 155, 164};
+int normal_96k_12dot_continue_default_dac_U[] = {0, 0, 92, 101, 110, 119, 128, 137, 146, 155, 164, 173};
+
+int normal_96k_12dot_full_default_dac_H[] = {80, 94, 106, 118, 130, 142, 153, 163, 173, 183, 193, 200};
+int normal_96k_12dot_adj_default_dac_H[] = {76, 87, 98, 108, 118, 128, 138, 148, 158, 168, 178, 189};
+int normal_96k_12dot_continue_default_dac_H[] = {0, 92, 104, 115, 126, 137, 148, 158, 168, 178, 188, 198};
+
+int normal_96k_12dot_full_default_dac_HU[] = {78, 92, 102, 112, 122, 132, 142, 152, 162, 172, 182, 190};
+int normal_96k_12dot_adj_default_dac_HU[] = {0, 72, 83, 93, 103, 113, 123, 134, 146, 158, 170, 180};
+int normal_96k_12dot_continue_default_dac_HU[] = {0, 0, 92, 102, 112, 122, 132, 143, 155, 167, 179, 188};
+
+int normal_96k_16dot_full_default_dac[] = {70, 80, 88, 98, 107, 116, 125, 134, 143, 153, 162, 171, 180, 189, 198, 205};
+int normal_96k_16dot_adj_default_dac[] = {64, 74, 88, 89, 97, 105, 113, 121, 129, 138, 147, 156, 165, 174, 183, 192};
+int normal_96k_16dot_continue_default_dac[] = {0, 77, 86, 95, 104, 113, 121, 130, 139, 147, 156, 166, 175, 185, 194,200};
+
+int normal_96k_16dot_full_default_dac_H[] = {80, 96, 108, 118, 128, 138, 148, 158, 168, 178, 188, 198, 208, 218, 228, 236};
+int normal_96k_16dot_adj_default_dac_H[] = {76, 87, 98, 108, 118, 128, 137, 146, 155, 164, 173, 183, 193, 203, 214, 224};
+int normal_96k_16dot_continue_default_dac_H[] = {0, 92, 104, 114, 124, 134, 144, 154, 164, 174, 184, 194, 204, 214, 224, 234};
+
+int slow1_96k_5dot_full_default_dac[] = {70, 80, 88, 97, 104};
+int slow1_96k_5dot_adj_default_dac[] = {68, 76, 85, 93, 101};
+int slow1_96k_5dot_continue_default_dac[] = {0, 79, 88, 96, 103};
+
+int slow1_96k_7dot_full_default_dac[] = {70, 80, 88, 97, 104, 111, 118};
+int slow1_96k_7dot_adj_default_dac[] = {68, 76, 85, 93, 101, 108, 113};
+int slow1_96k_7dot_continue_default_dac[] = {0, 79, 88, 96, 103, 110, 117};
+
+int slow1_96k_9dot_full_default_dac[] = {70, 81, 88, 97, 104, 112, 119, 126, 133};
+int slow1_96k_9dot_adj_default_dac[] = {68, 76, 84, 91, 99, 106, 113, 120, 127};
+int slow1_96k_9dot_continue_default_dac[] = {0, 79, 88, 96, 103, 110, 117, 124, 131};
+
+int slow1_96k_12dot_full_default_dac[] = {70, 81, 88, 97, 104, 112, 119, 126, 133, 140, 147, 155};
+int slow1_96k_12dot_adj_default_dac[] = {68, 76, 84, 91, 99, 106, 113, 120, 127, 134, 141, 147};
+int slow1_96k_12dot_continue_default_dac[] = {0, 79, 88, 96, 103, 110, 117, 124, 131, 138, 145, 152};
+
+int slow1_96k_16dot_full_default_dac[] = {70, 81, 88, 97, 104, 112, 119, 126, 133, 140, 147, 154, 161, 168, 175, 181};
+int slow1_96k_16dot_adj_default_dac[] = {68, 76, 84, 91, 99, 106, 113, 120, 127, 134, 141, 148, 155, 162, 169, 176};
+int slow1_96k_16dot_continue_default_dac[] = {0, 79, 88, 96, 103, 110, 117, 124, 131, 138, 145, 152, 159, 166, 173, 180};
+
+int slow1_96k_24dot_full_default_dac[] = {70, 80 , 88, 96, 104, 112, 120, 128, 136, 144, 152, 160, 168, 173, 181, 187,194,201,208,215,222,229,236,242};
+int slow1_96k_24dot_adj_default_dac[] = {69, 76, 84, 91, 98, 106, 114, 121, 128, 136, 143, 150, 157, 164, 171, 177,183,190,196,203,209,215,221,227};
+int slow1_96k_24dot_continue_default_dac[] = {0, 79, 87, 95, 103, 110, 118, 125, 133, 140, 148, 155, 161, 169, 175, 181,186,195,200,208,215,222,228,234};
+
+int fast_96k_5dot_full_default_dac_F[] = {70, 92, 107, 120, 130};
+int fast_96k_7dot_full_default_dac_F[] = {70, 92, 107, 120, 132, 142, 151};
+int normal_96k_5dot_full_default_dac_F[] = {70, 85, 95, 106, 116};
+int normal_96k_7dot_full_default_dac_F[] = {70, 85, 95, 107, 117, 126, 135};
+/* ==============96k end ========================*/
+
+/* ==============128k ========================*/
+int fast_128k_5dot_full_default_dac[] = {80, 106, 121, 135, 145};
+int fast_128k_5dot_adj_default_dac[] = {77, 87, 100, 111, 122};
+int fast_128k_5dot_continue_default_dac[] = {0, 101, 114, 128, 142};
+int fast_128k_7dot_full_default_dac[] = {79, 105, 122, 140, 155, 169, 178};
+int fast_128k_7dot_adj_default_dac[] = {75, 87, 102, 113, 130, 142, 157};
+int fast_128k_7dot_continue_default_dac[] = { 0, 101, 119, 134, 149, 164, 178};
+int fast_128k_7dot_full_default_dac_A[] = {79, 105, 122, 137, 149, 164, 175};
+int fast_128k_7dot_adj_default_dac_A[] = {73, 84, 98, 112, 126, 140, 154};
+int fast_128k_7dot_continue_default_dac_A[] = { 0, 100, 117, 132, 147, 162, 175};
+int fast_128k_5dot_full_default_dac_A[] = {80, 106, 121, 140, 154};
+int fast_128k_5dot_adj_default_dac_A[] = {75, 90, 106, 120, 134};
+int fast_128k_5dot_continue_default_dac_A[] = {0, 105, 127, 142, 158};
+int fast_128k_5dot_full_default_dac_B[] = {83, 110, 123, 140, 148};
+int fast_128k_5dot_adj_default_dac_B[] = {78, 90, 103, 114, 126};
+int fast_128k_5dot_continue_default_dac_B[] = {0, 105, 118, 133, 146};
+int fast_128k_7dot_full_default_dac_B[] = {79, 105, 122, 140, 156, 167, 178};
+int fast_128k_7dot_adj_default_dac_B[] = {75, 87, 101, 114, 128, 142, 156};
+int fast_128k_7dot_continue_default_dac_B[] = { 0, 105, 120, 135, 150, 165, 180};
+int fast_128k_7dot_full_default_dac_C[] = {79, 105, 120, 135, 145, 155, 165};
+int fast_128k_7dot_adj_default_dac_C[] = {71, 85, 96, 107, 120, 133, 143};
+int fast_128k_7dot_continue_default_dac_C[] = { 0, 97, 113, 126, 139, 152, 165};
+int fast_128k_9dot_full_default_dac_A[] = {74, 99, 115, 130, 140, 150, 163, 158, 166};
+int fast_128k_9dot_adj_default_dac_A[] = {72, 82, 92, 104, 115, 127, 138, 149, 160};
+int fast_128k_9dot_continue_default_dac_A[] = {0, 95, 108, 121, 133, 145, 158, 157, 169};
+int fast_128k_9dot_full_default_dac_C[] = {78, 108, 125, 143, 158, 172, 185, 180, 191};
+int fast_128k_9dot_adj_default_dac_C[] = {73, 86, 99, 112, 125, 138, 151, 164, 178};
+int fast_128k_9dot_continue_default_dac_C[] = {0, 100, 116, 132, 144, 158, 174, 176, 191};
+int fast_128k_9dot_full_default_dac_D[] = {80, 106, 123, 137, 150, 163, 173, 185, 192};
+int fast_128k_9dot_adj_default_dac_D[] = {73, 84, 96, 106, 116, 126, 136, 146, 156};
+int fast_128k_9dot_continue_default_dac_D[] = {0, 102, 116, 134, 144, 158, 168, 182, 192};
+int fast_128k_9dot_full_default_dac_B[] = {74, 100, 120, 140, 155, 170, 190, 188, 199};
+int fast_128k_9dot_adj_default_dac_B[] = {70, 86, 102, 117, 132, 147, 162, 177, 190};
+int fast_128k_9dot_continue_default_dac_B[] = {0, 100, 120, 136, 152, 168, 185, 187, 200};
+
+int fast_128k_9dot_full_default_dac[9] = {74, 99, 115, 130, 140, 153, 163, 158, 166};
+
+int fast_128k_9dot_adj_default_dac[] = {72, 83, 96, 106, 118, 127, 138, 149, 158};
+int fast_128k_9dot_continue_default_dac[] = {0, 95, 108, 121, 133, 145, 158, 157, 167};
+
+int normal_128k_5dot_full_default_dac[] = {80, 96, 107, 118, 128};
+int normal_128k_5dot_adj_default_dac[] = {77, 87, 98, 108, 118};
+int normal_128k_5dot_continue_default_dac[] = {0, 94, 105, 116, 127};
+int normal_128k_7dot_full_default_dac[] = {80, 96, 107, 118, 128, 137, 143};
+int normal_128k_7dot_adj_default_dac[] = {77, 87, 98, 108, 116, 127, 134};
+int normal_128k_7dot_continue_default_dac[] = {0, 94, 104, 115, 126, 135, 144};
+int normal_128k_9dot_full_default_dac[] = {80, 96, 107, 118, 128, 137, 143, 154, 162};
+int normal_128k_9dot_adj_default_dac[] = {77, 87, 98, 108, 118, 128, 137, 147, 156};
+int normal_128k_9dot_continue_default_dac[] = {0, 93, 104, 115, 126, 135, 140, 151, 161};
+
+unsigned short fast_128k_7dot_dac[]={
+ 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 900, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0,1050, 0, 0, 0, 0, 0, 0, 0,
+ 920,1240, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,1240, 0, 0, 0, 0, 0, 0,
+ 940, 0,1350, 0, 0, 0, 0, 0, 0,
+ 0,1050,1400, 0, 0, 0, 0, 0, 0,
+ 950,1280,1460, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0,1380, 0, 0, 0, 0, 0,
+ 920, 0, 0,1510, 0, 0, 0, 0, 0,
+ 0,1050, 0,1510, 0, 0, 0, 0, 0,
+
+ 950,1280, 0,1600, 0, 0, 0, 0, 0,
+ 0, 0,1220,1600, 0, 0, 0, 0, 0,
+ 940, 0,1380,1600, 0, 0, 0, 0, 0,
+ 0,1050,1400,1600, 0, 0, 0, 0, 0,
+ 950,1290,1490,1630, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,1550, 0, 0, 0, 0,
+ 950, 0, 0, 0,1670, 0, 0, 0, 0,
+ 0,1050, 0, 0,1700, 0, 0, 0, 0,
+ 950,1280, 0, 0,1730, 0, 0, 0, 0,
+ 0, 0,1240, 0,1730, 0, 0, 0, 0,
+
+ 940, 0,1400, 1,1600, 0, 0, 0, 0,
+ 0,1050,1400, 1,1600, 0, 0, 0, 0,
+ 930,1280,1480, 1,1600, 0, 0, 0, 0,
+ 0, 0, 0,5460,1600, 0, 0, 0, 0,
+ 950, 0, 0,5626,1620, 0, 0, 0, 0,
+ 0,1070, 0,5626,1620, 0, 0, 0, 0,
+ 940,1280, 0,5696,1620, 0, 0, 0, 0,
+ 0, 0,1260,5706,1620, 0, 0, 0, 0,
+ 950, 0,1400,5746,1620, 0, 0, 0, 0,
+ 0,1070,1440,5746,1620, 0, 0, 0, 0,
+
+ 950,1290,1480,5746,1620, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0,1700, 0, 0, 0,
+ 940, 0, 0, 0, 0,1830, 0, 0, 0,
+ 0,1050, 0, 0, 0,1840, 0, 0, 0,
+ 940,1260, 0, 0, 0,1760, 0, 0, 0,
+ 0, 0,1240, 0, 0,1880, 0, 0, 0,
+ 940, 0,1380, 0, 1,1780, 0, 0, 0,
+ 0,1060,1400, 0, 1,1780, 0, 0, 0,
+ 940,1260,1440, 0, 1,1780, 0, 0, 0,
+ 0, 0, 0,1400, 1,1780, 0, 0, 0,
+
+ 940, 0, 0,1500, 1,1780, 0, 0, 0,
+ 0,1060, 0,1540, 1,1780, 0, 0, 0,
+ 940,1280, 0,1600, 1,1780, 0, 0, 0,
+ 0, 0,1240,1600, 1,1780, 0, 0, 0,
+ 940, 0,1400,1640, 1,1780, 0, 0, 0,
+ 0,1060,1430,1640, 1,1780, 0, 0, 0,
+ 940,1260,1480,1660, 1,1780, 0, 0, 0,
+ 0, 0, 0, 0,5646,1780, 0, 0, 0,
+ 940, 0, 0, 0,5796,1800, 0, 0, 0,
+ 0,1060, 0, 0,5796,1800, 0, 0, 0,
+
+ 940,1260, 0, 0,5856,1800, 0, 0, 0,
+ 0, 0,1240, 0,5856,1800, 0, 0, 0,
+ 940, 0,1400, 0,5866,1800, 0, 0, 0,
+ 0,1060,1420, 0,5866,1800, 0, 0, 0,
+ 940,1280,1480, 0,5876,1800, 0, 0, 0,
+ 0, 0, 0,1390,5876,1800, 0, 0, 0,
+ 940, 0, 0,1540,5896,1800, 0, 0, 0,
+ 0,1050, 0,1540,5896,1800, 0, 0, 0,
+ 940,1260, 0,1660,5916,1800, 0, 0, 0,
+ 0, 0,1240,1660,5916,1800, 0, 0, 0,
+
+ 950, 0,1400,1670,5926,1800, 0, 0, 0,
+ 0,1060,1420,1670,5926,1800, 0, 0, 0,
+ 950,1260,1460,1670,5926,1800, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,1830, 0, 0,
+ 930, 0, 0, 0, 0, 0,1830, 0, 0,
+ 0,1050, 0, 0, 0, 0,1950, 0, 0,
+ 940,1280, 0, 0, 0, 0,1980, 0, 0,
+ 0, 0,1240, 0, 0, 0,1980, 0, 0,
+ 940, 0,1380, 0, 0, 0,2000, 0, 0,
+ 0,1060,1420, 0, 0, 0,2000, 0, 0,
+
+ 940,1260,1440, 0, 0, 0,2000, 0, 0,
+ 0, 0, 0,1390, 0, 0,2000, 0, 0,
+ 940, 0, 0,1530, 0, 0,2000, 0, 0,
+ 0,1060, 0,1540, 0, 0,2000, 0, 0,
+ 940,1260, 0,1600, 0, 1,1870, 0, 0,
+ 0, 0,1240,1620, 0, 0,2000, 0, 0,
+ 940, 0,1410,1620, 0, 1,1900, 0, 0,
+ 0,1060,1420,1620, 0, 1,1900, 0, 0,
+ 940,1260,1460,1640, 0, 1,1900, 0, 0,
+ 0, 0, 0, 0,1570, 1,1900, 0, 0,
+
+ 950, 0, 0, 0,1700, 1,1900, 0, 0,
+ 0,1060, 0, 0,1710, 1,1900, 0, 0,
+ 940,1280, 0, 0,1750, 1,1900, 0, 0,
+ 0, 0,1260, 0,1750, 1,1900, 0, 0,
+ 940, 0,1400, 0,1770, 1,1900, 0, 0,
+ 0,1060,1420, 0,1770, 1,1900, 0, 0,
+ 950,1280,1480, 0,1810, 1,1900, 0, 0,
+ 0, 0, 0,1400,1800, 1,1910, 0, 0,
+ 950, 0, 0,1560,1830, 1,1920, 0, 0,
+ 0,1060, 0,1580,1830, 1,1920, 0, 0,
+
+ 940,1280, 0,1630,1830, 1,1920, 0, 0,
+ 0, 0,1260,1630,1830, 1,1920, 0, 0,
+ 950, 0,1420,1650,1840, 1,1920, 0, 0,
+ 0,1070,1430,1650,1840, 1,1920, 0, 0,
+ 950,1280,1480,1680,1850, 1,1920, 0, 0,
+ 0, 0, 0, 0, 0,5776,1930, 0, 0,
+ 940, 0, 0, 0, 0,5896,1930, 0, 0,
+ 0,1070, 0, 0, 1,5816,1930, 0, 0,
+ 950,1280, 0, 0, 1,5836,1930, 0, 0,
+ 0, 0,1240, 0, 1,5836,1930, 0, 0,
+
+ 950, 0,1380, 0, 1,5836,1930, 0, 0,
+ 0,1070,1420, 0, 1,5836,1930, 0, 0,
+ 950,1280,1480, 0, 1,5836,1930, 0, 0,
+ 0, 0, 0,1480, 1,5876,1930, 0, 0,
+ 940, 0, 0,1550, 1,5876,1930, 0, 0,
+ 0,1070, 0,1550, 1,5876,1930, 0, 0,
+ 940,1280, 0,1620, 1,5876,1930, 0, 0,
+ 0, 0,1240,1620, 1,5876,1930, 0, 0,
+ 940, 0,1380,1620, 1,5876,1930, 0, 0,
+ 0,1070,1440,1660, 1,5876,1930, 0, 0,
+
+ 950,1290,1490,1680, 1,1780,2080, 0, 0,
+ 0, 0, 0, 0,5656,5876,1930, 0, 0,
+ 950, 0, 0, 1,5676,5876,1930, 0, 0,
+ 0,1070, 0, 1,5676,5876,1930, 0, 0,
+ 940,1280, 0, 1,1580,6036,1930, 0, 0,
+ 0, 0,1240, 1,1580,6036,1930, 0, 0,
+ 940, 0,1400, 1,1580,6036,1930, 0, 0,
+ 0,1060,1440, 1,1580,6036,1930, 0, 0,
+ 950,1280,1480, 0,1780,6056,1930, 0, 0,
+ 0, 0, 0,1420,1790,6056,1930, 0, 0,
+
+ 950, 0, 1,1400,1770,6056,1930, 0, 0,
+ 0,1070, 1,1400,1770,6056,1930, 0, 0,
+ 950,1280, 0,1630,1850,6091,1940, 0, 0,
+ 0, 0,1290,1650,1850,6091,1940, 0, 0,
+ 950, 0,1400,1670,1850,6091,1940, 0, 0,
+ 0,1100,1460,1670,1850,6091,1940, 0, 0,
+ 960,1320,1570,1760,1980, 1,1940, 0, 0
+};
+
+unsigned short normal_128k_7dot_dac[]={
+ 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 970, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0,1115, 0, 0, 0, 0, 0, 0, 0,
+ 5066,1180, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,1245, 0, 0, 0, 0, 0, 0,
+ 970, 1,1310, 0, 0, 0, 0, 0, 0,
+ 0,5211,1340, 0, 0, 0, 0, 0, 0,
+ 5086,5296,1340, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0,1385, 0, 0, 0, 0, 0,
+ 970, 1, 0,1430, 0, 0, 0, 0, 0,
+ 0,1120, 1,1450, 0, 0, 0, 0, 0,
+
+ 5076,1200, 1,1460, 0, 0, 0, 0, 0,
+ 0, 0,5356,1490, 0, 0, 0, 0, 0,
+ 980, 1,5416,1490, 0, 0, 0, 0, 0,
+ 0,5256,5456,1480, 0, 0, 0, 0, 0,
+ 5086,5316,5456,1480, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,1535, 0, 0, 0, 0,
+ 980, 1, 0, 0,1560, 0, 0, 0, 0,
+ 0,1140, 1, 0,1580, 0, 0, 0, 0,
+ 5076,1200, 1, 0,1580, 0, 0, 0, 0,
+ 0, 0,1275, 1,1585, 0, 0, 0, 0,
+
+ 980, 1,1310, 1,1585, 0, 0, 0, 0,
+ 0,5246,1360, 1,1585, 0, 0, 0, 0,
+ 5076,5296,1360, 1,1620, 0, 0, 0, 0,
+ 0, 0, 0,5521,1645, 0, 0, 0, 0,
+ 980, 1, 0,5546,1635, 0, 0, 0, 0,
+ 0,1140, 1,5566,1635, 0, 0, 0, 0,
+ 5076,1200, 1,5576,1635, 0, 0, 0, 0,
+ 0, 0,5406,5626,1635, 0, 0, 0, 0,
+ 980, 1,5436,5616,1635, 0, 0, 0, 0,
+ 0,5276,5476,5596,1635, 0, 0, 0, 0,
+
+ 5086,5316,5456,5596,1635, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0,1680, 0, 0, 0,
+ 980, 1, 0, 0, 0,1700, 0, 0, 0,
+ 0,1130, 1, 0, 0,1700, 0, 0, 0,
+ 5076,1200, 1, 0, 0,1720, 0, 0, 0,
+ 0, 0,1280, 1, 0,1720, 0, 0, 0,
+ 980, 1,1315, 1, 0,1720, 0, 0, 0,
+ 0,5236,1360, 1, 0,1740, 0, 0, 0,
+ 5086,5296,1360, 1, 0,1750, 0, 0, 0,
+ 0, 0, 0,1430, 1,1750, 0, 0, 0,
+
+ 980, 1, 0,1460, 1,1750, 0, 0, 0,
+ 0,1140, 1,1470, 1,1750, 0, 0, 0,
+ 5076,1200, 1,1480, 1,1750, 0, 0, 0,
+ 0, 0,5396,1500, 1,1760, 0, 0, 0,
+ 980, 1,5426,1510, 1,1760, 0, 0, 0,
+ 0,5256,5456,1510, 1,1760, 0, 0, 0,
+ 5076,5316,5456,1510, 1,1770, 0, 0, 0,
+ 0, 0, 0, 0,5666,1780, 0, 0, 0,
+ 980, 1, 0, 0,5676,1780, 0, 0, 0,
+ 0,1130, 1, 0,5686,1780, 0, 0, 0,
+
+ 5076,1200, 1, 0,5696,1780, 0, 0, 0,
+ 0, 0,1290, 1,5716,1780, 0, 0, 0,
+ 980, 1,1330, 1,5756,1780, 0, 0, 0,
+ 0,5236,1360, 1,5756,1780, 0, 0, 0,
+ 5076,5296,1360, 1,5756,1780, 0, 0, 0,
+ 0, 0, 0,5526,5746,1780, 0, 0, 0,
+ 980, 1, 0,5556,5756,1780, 0, 0, 0,
+ 0,1130, 1,5586,5756,1780, 0, 0, 0,
+ 5076,1200, 1,5586,5756,1780, 0, 0, 0,
+ 0, 0,5386,5601,5756,1780, 0, 0, 0,
+
+ 980, 1,5436,5601,5756,1780, 0, 0, 0,
+ 0,5246,5466,5601,5756,1780, 0, 0, 0,
+ 5086,5306,5476,5601,5756,1780, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,1810, 0, 0,
+ 980, 1, 0, 0, 0, 0,1810, 0, 0,
+ 0,1130, 1, 0, 0, 0,1840, 0, 0,
+ 5076,1200, 1, 0, 0, 0,1840, 0, 0,
+ 0, 0,1290, 1, 0, 0,1850, 0, 0,
+ 980, 1,1330, 1, 0, 0,1850, 0, 0,
+ 0,5231,1360, 1, 0, 0,1850, 0, 0,
+
+ 5076,5296,1360, 1, 0, 0,1850, 0, 0,
+ 0, 0, 0,1410, 1, 0,1850, 0, 0,
+ 980, 1, 0,1440, 1, 0,1860, 0, 0,
+ 0,1135, 1,1470, 1, 0,1860, 0, 0,
+ 5076,1200, 1,1480, 1, 0,1870, 0, 0,
+ 0, 0,5381,1505, 1, 0,1870, 0, 0,
+ 980, 1,5416,1510, 1, 0,1870, 0, 0,
+ 0,5236,5456,1510, 1, 0,1870, 0, 0,
+ 5086,5296,5456,1510, 1, 0,1880, 0, 0,
+ 0, 0, 0, 0,1550, 1,1880, 0, 0,
+
+ 980, 1, 0, 0,1570, 1,1880, 0, 0,
+ 0,1130, 1, 0,1590, 1,1880, 0, 0,
+ 5076,1200, 1, 0,1610, 1,1890, 0, 0,
+ 0, 0,1300, 1,1620, 1,1890, 0, 0,
+ 980, 1,1330, 1,1620, 1,1890, 0, 0,
+ 0,5236,1360, 1,1630, 1,1890, 0, 0,
+ 5076,5296,1360, 1,1640, 1,1890, 0, 0,
+ 0, 0, 0,5506,1640, 1,1900, 0, 0,
+ 980, 1, 0,5546,1640, 1,1900, 0, 0,
+ 0,1135, 1,5556,1640, 1,1900, 0, 0,
+
+ 5076,1200, 1,5556,1640, 1,1900, 0, 0,
+ 0, 0,5386,5596,1640, 1,1900, 0, 0,
+ 980, 1,5436,5606,1650, 1,1910, 0, 0,
+ 0,5226,5456,5606,1650, 1,1910, 0, 0,
+ 5086,5306,5466,5606,1650, 1,1910, 0, 0,
+ 0, 0, 0, 0, 0,5791,1910, 0, 0,
+ 980, 1, 0, 0, 0,5816,1910, 0, 0,
+ 0,1130, 1, 0, 0,5816,1910, 0, 0,
+ 5076,1200, 1, 0, 0,5816,1910, 0, 0,
+ 0, 0,1290, 1, 0,5816,1910, 0, 0,
+
+ 990, 1,1320, 1, 0,5816,1910, 0, 0,
+ 0,5226,1360, 1, 0,5836,1910, 0, 0,
+ 5086,5306,1360, 1, 0,5836,1910, 0, 0,
+ 0, 0, 0,1420, 1,5846,1910, 0, 0,
+ 980, 1, 0,1450, 1,5846,1910, 0, 0,
+ 0,1130, 1,1450, 1,5846,1910, 0, 0,
+ 5076,1200, 1,1480, 1,5866,1910, 0, 0,
+ 0, 0,5386,1480, 1,5866,1910, 0, 0,
+ 980, 1,5426,1510, 1,5876,1920, 0, 0,
+ 0,5236,5476,1510, 1,5886,1920, 0, 0,
+
+ 5086,5306,5456,1510, 1,5886,1920, 0, 0,
+ 0, 0, 0, 0,5641,5886,1920, 0, 0,
+ 980, 1, 0, 0,5646,5886,1920, 0, 0,
+ 0,1130, 1, 0,5676,5886,1920, 0, 0,
+ 5076,1200, 1, 0,5696,5886,1920, 0, 0,
+ 0, 0,1290, 1,5706,5896,1920, 0, 0,
+ 980, 1,1310, 1,5706,5896,1920, 0, 0,
+ 0,5226,1350, 1,5706,5896,1920, 0, 0,
+ 5086,5306,1350, 1,5706,5896,1920, 0, 0,
+ 0, 0, 0,5506,5736,5896,1920, 0, 0,
+
+ 980, 1, 0,5526,5736,5896,1920, 0, 0,
+ 0,1130, 1,5546,5736,5896,1920, 0, 0,
+ 5076,1200, 1,5546,5736,5896,1920, 0, 0,
+ 0, 0,5386,5586,5736,5896,1920, 0, 0,
+ 980, 1,5406,5586,5736,5896,1920, 0, 0,
+ 0,5226,5456,5606,5756,5896,1920, 0, 0,
+ 5096,5316,5456,5606,5756,5906,1940, 0, 0
+};
+
+
+unsigned short fast_128k_9dot_dac[]={
+ 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 950, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0,1070, 0, 0, 0, 0, 0, 0, 0,
+ 970,1300, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,1240, 0, 0, 0, 0, 0, 0,
+ 970, 0,1410, 0, 0, 0, 0, 0, 0,
+ 0,1090,1450, 0, 0, 0, 0, 0, 0,
+ 970,1320,1500, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0,1440, 0, 0, 0, 0, 0,
+ 970, 0, 0,1540, 0, 0, 0, 0, 0,
+ 0,1090, 0,1560, 0, 0, 0, 0, 0,
+
+ 970,1320, 0,1630, 0, 0, 0, 0, 0,
+ 0, 0,1250,1630, 0, 0, 0, 0, 0,
+ 970, 0,1430,1660, 0, 0, 0, 0, 0,
+ 0,1090,1460,1660, 0, 0, 0, 0, 0,
+ 990,1340,1540,1700, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,1580, 0, 0, 0, 0,
+ 970, 0, 0, 0,1700, 0, 0, 0, 0,
+ 0,1090, 0, 0,1700, 0, 0, 0, 0,
+ 970,1320, 0, 0,1770, 0, 0, 0, 0,
+ 0, 0,1300, 0,1770, 0, 0, 0, 0,
+
+ 970, 0,1430, 0,1770, 0, 0, 0, 0,
+ 0,1090,1460, 0,1800, 0, 0, 0, 0,
+ 990,1340,1540, 0,1830, 0, 0, 0, 0,
+ 0, 0, 0,1440,1830, 0, 0, 0, 0,
+ 970, 0, 0,1560,1830, 0, 0, 0, 0,
+ 0,1090, 0,1590,1830, 0, 0, 0, 0,
+ 990,1340, 0,1650,1840, 0, 0, 0, 0,
+ 0, 0,1300,1680,1840, 0, 0, 0, 0,
+ 990, 0,1440,1680,1840, 0, 0, 0, 0,
+ 0,1120,1480,1680,1840, 0, 0, 0, 0,
+
+ 990,1340,1540,1720,1860, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0,1720, 0, 0, 0,
+ 970, 0, 0, 0, 0,1860, 0, 0, 0,
+ 0,1090, 0, 0, 0,1860, 0, 0, 0,
+ 990,1340, 0, 0, 0,1900, 0, 0, 0,
+ 0, 0,1300, 0, 0,1900, 0, 0, 0,
+ 990, 0,1430, 0, 0,1900, 0, 0, 0,
+ 0,1090,1460, 0, 0,1920, 0, 0, 0,
+ 990,1340,1540, 0, 0,1920, 0, 0, 0,
+ 0, 0, 0,1440, 0,1920, 0, 0, 0,
+
+ 990, 0, 0,1600, 0,1940, 0, 0, 0,
+ 0,1120, 0,1600, 0,1940, 0, 0, 0,
+ 990,1320, 0,1660, 0,1940, 0, 0, 0,
+ 0, 0,1260,1660, 0,1960, 0, 0, 0,
+ 990, 0,1460,1700, 0,1960, 0, 0, 0,
+ 0,1120,1480,1700, 0,1980, 0, 0, 0,
+ 990,1340,1540,1720, 0,1980, 0, 0, 0,
+ 0, 0, 0, 0,1570,1980, 0, 0, 0,
+ 990, 0, 0, 0,1710,2010, 0, 0, 0,
+ 0,1120, 0, 0,1730,2010, 0, 0, 0,
+
+ 990,1340, 0, 0,1800,2010, 0, 0, 0,
+ 0, 0,1260, 0,1780,2010, 0, 0, 0,
+ 990, 0,1460, 0,1820,2010, 0, 0, 0,
+ 0,1120,1500, 0,1830,2010, 0, 0, 0,
+ 990,1340,1540, 0,1850,2020, 0, 0, 0,
+ 0, 0, 0,1480,1880,2020, 0, 0, 0,
+ 990, 0, 0,1600,1880,2020, 0, 0, 0,
+ 0,1120, 0,1620,1880,2020, 0, 0, 0,
+ 990,1340, 0,1670,1880,2020, 0, 0, 0,
+ 0, 0,1280,1670,1880,2020, 0, 0, 0,
+
+ 990, 0,1440,1710,5976,1820, 0, 0, 0,
+ 0,1120,1500,1740,5976,1820, 0, 0, 0,
+ 990,1340,1540,1740,5976,1820, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,1820, 0, 0,
+ 970, 0, 0, 0, 0, 0,1960, 0, 0,
+ 0,1120, 0, 0, 0, 0,1980, 0, 0,
+ 990,1320, 0, 0, 0, 0,2020, 0, 0,
+ 0, 0,1260, 0, 0, 0,2020, 0, 0,
+ 990, 0,1440, 0, 0, 0,2060, 0, 0,
+ 0,1120,1500, 0, 0, 0,2060, 0, 0,
+
+ 990,1340,1540, 0, 0, 0,2060, 0, 0,
+ 0, 0, 0,1480, 0, 0,2060, 0, 0,
+ 990, 0, 0,1580, 0, 0,2080, 0, 0,
+ 0,1120, 0,1620, 0, 0,2080, 0, 0,
+ 990,1320, 0,1680, 0, 0,2080, 0, 0,
+ 0, 0,1260,1680, 0, 0,2080, 0, 0,
+ 990, 0,1480,1700, 0, 0,2100, 0, 0,
+ 0,1120,1500,1700, 0, 0,2100, 0, 0,
+ 990,1340,1540,1720, 0, 0,2100, 0, 0,
+ 0, 0, 0, 0,1700, 1,1940, 0, 0,
+
+ 990, 0, 0, 0,1740, 1,1940, 0, 0,
+ 0,1120, 0, 0,1760, 1,1940, 0, 0,
+ 990,1320, 0, 0,1780, 1,1940, 0, 0,
+ 0, 0,1320, 0,1800, 1,1940, 0, 0,
+ 990, 0,1480, 0,1830, 1,1940, 0, 0,
+ 0,1120,1500, 0,1840, 1,1940, 0, 0,
+ 990,1340,1540, 0,1860, 1,1940, 0, 0,
+ 0, 0, 0,1440,1860, 1,1940, 0, 0,
+ 990, 0, 0,1580,1860, 1,1940, 0, 0,
+ 0,1120, 0,1600,1860, 1,1940, 0, 0,
+
+ 990,1320, 0,1660,1860, 1,1940, 0, 0,
+ 0, 0,1240,1660,1860, 1,1940, 0, 0,
+ 990, 1,1320,1660,1860, 1,1940, 0, 0,
+ 0,1120,1500,1660,1860, 1,1940, 0, 0,
+ 990,1340,1540,1660,1860, 1,1940, 0, 0,
+ 0, 0, 0, 0, 0,5776,1940, 0, 0,
+ 990, 0, 0, 0, 0,5956,1940, 0, 0,
+ 0,1120, 0, 0, 0,5956,1940, 0, 0,
+ 990,1320, 0, 0, 0,5996,1940, 0, 0,
+ 0, 0,1240, 0, 0,5996,1940, 0, 0,
+
+ 990, 0,1440, 0, 0,5996,1940, 0, 0,
+ 0,1120,1500, 0, 0,5996,1940, 0, 0,
+ 990,1340,1540, 0, 0,5996,1940, 0, 0,
+ 0, 0, 0,1440, 0,5996,1940, 0, 0,
+ 990, 0, 0,1600, 0,5996,1940, 0, 0,
+ 0,1120, 0,1630, 0,5996,1940, 0, 0,
+ 990,1320, 0,1650, 0,5996,1940, 0, 0,
+ 0, 0,1240,1660, 0,5996,1940, 0, 0,
+ 990, 0,1460,1660, 0,5996,1940, 0, 0,
+ 0,1120,1500,1680, 0,5996,1940, 0, 0,
+
+ 990,1340,1540,1680, 0,5996,1940, 0, 0,
+ 0, 0, 0, 0,5656,5876,1940, 0, 0,
+ 990, 0, 0, 0,5676,5876,1940, 0, 0,
+ 0,1120, 0, 0,5676,5876,1940, 0, 0,
+ 990,1320, 0, 1,1580,6036,1940, 0, 0,
+ 0, 0,1240, 1,1580,6036,1940, 0, 0,
+ 990, 0,1460, 1,1580,6036,1940, 0, 0,
+ 0,1120,1500, 1,1580,6036,1940, 0, 0,
+ 990,1340,1540, 1,1600,6036,1940, 0, 0,
+ 0, 0, 0,1420,1800,6056,1940, 0, 0,
+
+ 990, 0, 1,1400,1700,6065,1940, 0, 0,
+ 0,1120, 1,1460,1700,6065,1940, 0, 0,
+ 990,1320, 1,1500,1700,6065,1940, 0, 0,
+ 0, 0,1320,1660,1860,6091,1940, 0, 0,
+ 990, 0,1400,1680,1860,6091,1940, 0, 0,
+ 0,1120,1480,1680,1880,6091,1940, 0, 0,
+ 990,1340,1540,1680,1880,6091,1940, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0,2000, 0,
+ 990, 0, 0, 0, 0, 0, 0,2000, 0,
+ 0,1120, 0, 0, 0, 0, 0,2000, 0,
+
+ 990,1320, 0, 0, 0, 0, 0,2000, 0,
+ 0, 0,1240, 0, 0, 0, 0,2000, 0,
+ 990, 0,1440, 0, 0, 0, 0,2180, 0,
+ 0,1120,1500, 0, 0, 0, 0,2180, 0,
+ 990,1340,1540, 0, 0, 0, 0,2180, 0,
+ 0, 0, 0,1400, 0, 0, 0,2180, 0,
+ 990, 0, 0,1560, 0, 0, 0,2180, 0,
+ 0,1120, 0,1600, 0, 0, 0,2180, 0,
+ 990,1320, 0,1660, 0, 0, 0,2180, 0,
+ 0, 0,1240,1680, 0, 0, 0,2180, 0,
+
+ 990, 0,1440,1680, 0, 0, 0,2200, 0,
+ 0,1120,1500,1680, 0, 0, 0,2200, 0,
+ 990,1340,1540,1700, 0, 0, 0,2200, 0,
+ 0, 0, 0, 0,1600, 0, 0,2200, 0,
+ 990, 0, 0, 0,1720, 0, 0,2200, 0,
+ 0,1120, 0, 0,1720, 0, 0,2200, 0,
+ 990,1320, 0, 0,1740, 0, 0,2200, 0,
+ 0, 0,1240, 0,1760, 0, 0,2200, 0,
+ 990, 0,1480, 0,1780, 0, 0,2200, 0,
+ 0,1120,1500, 0,1780, 0, 1,2040, 0,
+
+ 990,1340,1540, 0,1820, 0, 1,2040, 0,
+ 0, 0, 0,1420,1840, 0, 1,2040, 0,
+ 990, 0, 0,1560,1860, 0, 1,2040, 0,
+ 0,1120, 0,1600,1880, 0, 1,2040, 0,
+ 990,1320, 0,1620,1900, 0, 1,2040, 0,
+ 0, 0,1240,1660,1900, 0, 1,2040, 0,
+ 990, 0,1440,1680,1900, 0, 1,2040, 0,
+ 0,1120,1500,1700,1900, 0, 1,2040, 0,
+ 990,1340,1540,1720,1900, 0, 1,2040, 0,
+ 0, 0, 0, 0, 0,1720, 1,2040, 0,
+
+ 990, 0, 0, 0, 0,1880, 1,2040, 0,
+ 0,1120, 0, 0, 0,1880, 1,2040, 0,
+ 990,1320, 0, 0, 0,1900, 1,2040, 0,
+ 0, 0,1240, 0, 0,1900, 1,2040, 0,
+ 990, 0,1480, 0, 0,1900, 1,2040, 0,
+ 0,1120,1500, 0, 0,1900, 1,2040, 0,
+ 990,1340,1540, 0, 0,1900, 1,2040, 0,
+ 0, 0, 0,1400, 0,1980, 1,2040, 0,
+ 990, 0, 0,1600, 0,1980, 1,2040, 0,
+ 0,1120, 0,1600, 0,1980, 1,2040, 0,
+
+ 990,1320, 0,1660, 0,1980, 1,2040, 0,
+ 0, 0,1260,1660, 0,1980, 1,2040, 0,
+ 990, 0,1440,1700, 0,1980, 1,2040, 0,
+ 0,1120,1500,1700, 0,1980, 1,2040, 0,
+ 990,1340,1540,1720, 0,1980, 1,2040, 0,
+ 0, 0, 0, 0,1600,2040, 1,2040, 0,
+ 990, 0, 0, 0,1740,2040, 1,2080, 0,
+ 0,1120, 0, 0,1800,2040, 1,2080, 0,
+ 990,1320, 0, 0,1800,2040, 1,2080, 0,
+ 0, 0,1260, 0,1800,2040, 1,2080, 0,
+
+ 990, 0,1440, 0,1880,2040, 1,2080, 0,
+ 0,1120,1500, 0,1880,2040, 1,2080, 0,
+ 990,1340,1540, 0,1880,2040, 1,2080, 0,
+ 0, 0, 0,1440,1880,2040, 1,2080, 0,
+ 990, 0, 0,1620,1880,2040, 1,2080, 0,
+ 0,1120, 0,1640,1880,2040, 1,2080, 0,
+ 990,1320, 0,1660,1880,2040, 1,2080, 0,
+ 0, 0,1260,1680,1880,2040, 1,2080, 0,
+ 990, 0,1460,1680,1880,2040, 1,2080, 0,
+ 0,1120,1500,1680,1880,2040, 1,2080, 0,
+
+ 990,1340,1540,1680,1880,2040, 1,2080, 0,
+ 0, 0, 0, 0, 0, 0,5900,2080, 0,
+ 990, 0, 0, 0, 0, 0,6040,2080, 0,
+ 0,1120, 0, 0, 0, 0,6040,2080, 0,
+ 990,1320, 0, 0, 0, 0,6040,2080, 0,
+ 0, 0,1260, 0, 0, 0,6040,2080, 0,
+ 990, 0,1440, 0, 0, 0,6040,2080, 0,
+ 0,1120,1500, 0, 0, 0,6040,2080, 0,
+ 990,1340,1540, 0, 0, 0,6040,2080, 0,
+ 0, 0, 0,1440, 0, 0,6040,2080, 0,
+
+ 990, 0, 0,1580, 0, 1,5960,2120, 0,
+ 0,1120, 0,1600, 0, 1,5960,2120, 0,
+ 990,1320, 0,1640, 0, 1,5960,2120, 0,
+ 0, 0,1260,1660, 0, 1,5960,2120, 0,
+ 990, 0,1440,1660, 0, 1,6020,2120, 0,
+ 0,1120,1500,1700, 0, 1,6020,2120, 0,
+ 990,1340,1540,1720, 0, 1,6020,2120, 0,
+ 0, 0, 0, 0,1600, 1,6020,2120, 0,
+ 990, 0, 0, 0,1740, 1,6020,2120, 0,
+ 0,1120, 0, 0,1760, 1,6020,2120, 0,
+
+ 990,1320, 0, 0,1800, 1,6020,2120, 0,
+ 0, 0,1260, 0,1800, 1,6020,2120, 0,
+ 990, 0,1440, 0,1800, 1,6020,2120, 0,
+ 0,1120,1500, 0,1800, 1,6020,2120, 0,
+ 990,1340,1540, 0,1800, 1,6020,2120, 0,
+ 0, 0, 0,1400,1820, 1,6020,2120, 0,
+ 990, 0, 0,1560,1860, 1,6020,2120, 0,
+ 0,1120, 0,1580,1860, 1,6020,2120, 0,
+ 990,1320, 0,1620,1860, 1,6020,2120, 0,
+ 0, 0,1260,1660,1860, 1,6020,2120, 0,
+
+ 990, 0,1440,5800,1860, 1,6020,2120, 0,
+ 0,1120,1500,5800,1860, 1,6020,2120, 0,
+ 990,1340,1540,5820,1860, 1,6020,2120, 0,
+ 0, 0, 0, 0, 0,5790,6020,2120, 0,
+ 990, 0, 0, 0, 0,5860,6020,2120, 0,
+ 0,1120, 0, 0, 0,5880,6020,2120, 0,
+ 990,1320, 0, 0, 0,5900,6020,2120, 0,
+ 0, 0,1260, 0, 0,5920,6020,2120, 0,
+ 990, 0,1440, 0, 0,5940,6020,2120, 0,
+ 0,1120,1500, 0, 0,5960,6020,2120, 0,
+
+ 990,1340,1540, 0, 0,5980,6020,2120, 0,
+ 0, 0, 0,1380, 1,5840,6020,2120, 0,
+ 990, 0, 0,1540, 1,5840,6020,2120, 0,
+ 0,1120, 0,1560, 1,5840,6020,2120, 0,
+ 990,1320, 0,1580, 1,5840,6020,2120, 0,
+ 0, 0,1260,1660, 1,5840,6020,2120, 0,
+ 990, 0,1420,1660, 1,5840,6020,2120, 0,
+ 0,1120,1500,1700, 1,5840,6020,2120, 0,
+ 990,1340,1540,1720, 1,5840,6020,2120, 0,
+ 0, 0, 0, 0,5600,5840,6020,2120, 0,
+
+ 990, 0, 0, 1,5680,5900,6060,2120, 0,
+ 0,1120, 0, 1,5680,5900,6060,2120, 0,
+ 990,1320, 0, 1,5680,5900,6060,2120, 0,
+ 0, 0,1260, 1,5680,5900,6060,2120, 0,
+ 990, 0,1440, 1,5680,5900,6060,2120, 0,
+ 0,1120,1500, 1,5680,5900,6060,2120, 0,
+ 990,1340,1540, 1,5680,5900,6060,2120, 0,
+ 0, 0, 0,5520,5760,5900,6060,2120, 0,
+ 990, 0, 0,5640,5780,5900,6100,2120, 0,
+ 0,1120, 0,5680,5780,5900,6100,2120, 0,
+
+ 990,1320, 0,5680,5780,5900,6100,2120, 0,
+ 0, 0,5430,5680,5780,5900,6100,2120, 0,
+ 990, 1,5460,5680,5780,5900,6100,2120, 0,
+ 0,5216,5460,5680,5780,5900,6100,2120, 0,
+ 990,1360,1640,1860,2020,2180, 1,2100, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,2100,
+ 990, 0, 0, 0, 0, 0, 0, 0,2100,
+ 0,1120, 0, 0, 0, 0, 0, 0,2220,
+ 990,1320, 0, 0, 0, 0, 0, 0,2260,
+ 0, 0,1260, 0, 0, 0, 0, 0,2260,
+
+ 990, 0,1440, 0, 0, 0, 0, 0,2300,
+ 0,1120,1500, 0, 0, 0, 0, 0,2300,
+ 990,1340,1540, 0, 0, 0, 0, 0,2300,
+ 0, 0, 0,1420, 0, 0, 0, 0,2300,
+ 990, 0, 0,1580, 0, 0, 0, 0,2300,
+ 0,1120, 0,1600, 0, 0, 0, 0,2300,
+ 990,1320, 0,1660, 0, 0, 0, 1,2200,
+ 0, 0,1260,1660, 0, 0, 0, 1,2200,
+ 990, 0,1440,1680, 0, 0, 0, 1,2200,
+ 0,1120,1500,1700, 0, 0, 0, 1,2200,
+
+ 990,1340,1540,1720, 0, 0, 0, 1,2200,
+ 0, 0, 0, 0,1480, 0, 0, 1,2200,
+ 990, 0, 0, 0,1740, 0, 0, 1,2200,
+ 0,1120, 0, 0,1760, 0, 0, 1,2200,
+ 990,1320, 0, 0,1780, 0, 0, 1,2200,
+ 0, 0,1260, 0,1800, 0, 0, 1,2200,
+ 990, 0,1440, 0,1820, 0, 0, 1,2200,
+ 0,1120,1500, 0,1840, 0, 0, 1,2200,
+ 990,1340,1540, 0,1860, 0, 0, 1,2200,
+ 0, 0, 0,1440,1860, 0, 0, 1,2200,
+
+ 990, 0, 0,1620,1880, 0, 0, 1,2200,
+ 0,1120, 0,1620,1880, 0, 0, 1,2200,
+ 990,1320, 0,1660,1880, 0, 0, 1,2200,
+ 0, 0,1260,1680,1880, 0, 0, 1,2200,
+ 990, 0,1460,1700,1880, 0, 0, 1,2200,
+ 0,1120,1500,1720,1880, 0, 0, 1,2200,
+ 990,1340,1540,1740,1880, 0, 0, 1,2200,
+ 0, 0, 0, 0, 0,1740, 0, 1,2200,
+ 990, 0, 0, 0, 0,1860, 0, 1,2200,
+ 0,1120, 0, 0, 0,1860, 0, 1,2200,
+
+ 990,1320, 0, 0, 0,1880, 0, 1,2200,
+ 0, 0,1260, 0, 0,1880, 0, 1,2200,
+ 990, 0,1440, 0, 0,1960, 0, 1,2200,
+ 0,1120,1500, 0, 0,1960, 0, 1,2200,
+ 990,1340,1540, 0, 0,1960, 0, 1,2200,
+ 0, 0, 0,1440, 0,1960, 0, 1,2200,
+ 990, 0, 0,1580, 0,1980, 0, 1,2200,
+ 0,1120, 0,1600, 0,1980, 0, 1,2200,
+ 990,1320, 0,1660, 0,1980, 0, 1,2200,
+ 0, 0,1260,1660, 0,1980, 0, 1,2200,
+
+ 990, 0,1440,1680, 0,2020, 0, 1,2200,
+ 0,1120,1500,1700, 0,2020, 0, 1,2200,
+ 990,1340,1540,1720, 0,2020, 0, 1,2200,
+ 0, 0, 0, 0,1580,2040, 0, 1,2200,
+ 990, 0, 0, 0,5820,1860, 0, 1,2200,
+ 0,1120, 0, 0,5860,1860, 0, 1,2200,
+ 990,1320, 0, 0,5880,1860, 0, 1,2200,
+ 0, 0,1260, 0,5900,1860, 0, 1,2200,
+ 990, 0,1440, 0,5920,1860, 0, 1,2200,
+ 0,1120,1500, 0,5920,1860, 0, 1,2200,
+
+ 990,1340,1540, 0,5920,1860, 0, 1,2200,
+ 0, 0, 0,1400,5940,1860, 0, 1,2200,
+ 990, 0, 0,1600,5940,1860, 0, 1,2200,
+ 0,1120, 0,1620,5940,1860, 0, 1,2200,
+ 990,1320, 0,1640,5940,1860, 0, 1,2200,
+ 0, 0,1260,1660,5960,1860, 0, 1,2200,
+ 990, 0,1420,1680,5960,1860, 0, 1,2200,
+ 0,1120,1500,1700,5960,1860, 0, 1,2200,
+ 990,1340,1540,1720,5960,1860, 0, 1,2200,
+ 0, 0, 0, 0, 0, 0,1880, 1,2200,
+
+ 990, 0, 0, 0, 0, 0,2020, 1,2200,
+ 0,1120, 0, 0, 0, 0,2020, 1,2200,
+ 990,1320, 0, 0, 0, 0,2060, 1,2200,
+ 0, 0,1260, 0, 0, 0,2060, 1,2200,
+ 990, 0,1440, 0, 0, 0,2080, 1,2200,
+ 0,1120,1500, 0, 0, 0,2080, 1,2200,
+ 990,1340,1540, 0, 0, 0,2080, 1,2200,
+ 0, 0, 0,1440, 0, 0,2080, 1,2200,
+ 990, 0, 0,1580, 0, 0,2080, 1,2200,
+ 0,1120, 0,1620, 0, 0,2080, 1,2200,
+
+ 990,1320, 0,1640, 0, 0,2080, 1,2200,
+ 0, 0,1260,1660, 0, 0,2080, 1,2200,
+ 990, 0,1440,1680, 0, 0,2120, 1,2200,
+ 0,1120,1500,1700, 0, 0,2120, 1,2200,
+ 990,1340,1540,1720, 0, 0,2120, 1,2200,
+ 0, 0, 0, 0,1600, 0,2120, 1,2200,
+ 990, 0, 0, 0,1800, 0,2160, 1,2200,
+ 0,1120, 0, 0,1820, 0,2160, 1,2200,
+ 990,1320, 0, 0,1860, 0,2160, 1,2200,
+ 0, 0,1260, 0,1860, 0,2160, 1,2200,
+
+ 990, 0,1460, 0,1860, 0,2160, 1,2200,
+ 0,1120,1500, 0,1860, 0,2160, 1,2200,
+ 990,1340,1540, 0,1860, 0,2160, 1,2200,
+ 0, 0, 0,1420,1860, 0,2160, 1,2200,
+ 990, 0, 0,1580,1860, 1,2000, 1,2200,
+ 0,1120, 0,1600,1860, 1,2000, 1,2200,
+ 990,1320, 0,1660,1860, 1,2000, 1,2200,
+ 0, 0,1260,1660,1860, 1,2000, 1,2200,
+ 990, 0,1460,1700,1900, 1,2000, 1,2200,
+ 0,1120,1500,1760,1900, 1,2000, 1,2200,
+
+ 990,1340,1540,1780,1900, 1,2000, 1,2200,
+ 0, 0, 0, 0, 0,5840,2000, 1,2200,
+ 990, 0, 0, 0, 1,5870,2000, 1,2200,
+ 0,1120, 0, 0, 1,5870,2000, 1,2200,
+ 990,1320, 0, 0, 1,5870,2000, 1,2220,
+ 0, 0,1260, 0, 1,5870,2000, 1,2220,
+ 990, 0,1480, 0, 1,5880,2000, 1,2220,
+ 0,1120,1500, 0, 1,5880,2000, 1,2220,
+ 990,1340,1540, 0, 1,5900,2000, 1,2220,
+ 0, 0, 0,1440, 1,5900,2000, 1,2220,
+
+ 990, 0, 0,1600, 1,5900,2000, 1,2220,
+ 0,1120, 0,1600, 1,5900,2000, 1,2220,
+ 990,1340, 0,1660, 1,5920,2000, 1,2220,
+ 0, 0,1260,1660, 1,5920,2000, 1,2220,
+ 990, 0,1480,1700, 1,5920,2000, 1,2220,
+ 0,1120,1500,1720, 1,5920,2000, 1,2220,
+ 990,1340,1540,1740, 1,5920,2000, 1,2220,
+ 0, 0, 0, 0,5680,5920,2000, 1,2220,
+ 990, 0, 0, 1,5700,5920,2000, 1,2220,
+ 0,1120, 0, 1,5700,5920,2000, 1,2220,
+
+ 990,1320, 0, 1,5700,5920,2000, 1,2220,
+ 0, 0,1260, 1,5700,5920,2000, 1,2220,
+ 990, 0,1480, 1,5700,5920,2000, 1,2220,
+ 0,1120,1500, 1,5700,5920,2000, 1,2220,
+ 990,1340,1540, 1,5740,5920,2000, 1,2220,
+ 0, 0, 0,5500,5740,5920,2000, 1,2220,
+ 990, 0, 1,5560,5780,5920,2000, 1,2220,
+ 0,1120, 1,5560,5780,5920,2000, 1,2220,
+ 990,1320, 1,5580,5780,5920,2000, 1,2220,
+ 0, 0,5360,5580,5780,5920,2000, 1,2220,
+
+ 990, 1,5420,5620,5780,5960,2020, 1,2240,
+ 0,5126,5460,5620,5780,5960,2020, 1,2240,
+ 990,5420,5460,5640,5820,5980,2020, 1,2240,
+ 0, 0, 0, 0, 0, 0, 0,6080,2260,
+ 990, 0, 0, 0, 0, 0, 1,6100,2240,
+ 0,1120, 0, 0, 0, 0, 1,6100,2240,
+ 990,1320, 0, 0, 0, 0, 1,6120,2240,
+ 0, 0,1260, 0, 0, 0, 1,6120,2240,
+ 990, 0,1440, 0, 0, 0, 1,6120,2240,
+ 0,1120,1500, 0, 0, 0, 1,6120,2240,
+
+ 990,1340,1540, 0, 0, 0, 1,6120,2240,
+ 0, 0, 0,1440, 0, 0, 1,6120,2240,
+ 990, 0, 0,1620, 0, 0, 1,6120,2240,
+ 0,1120, 0,1620, 0, 0, 1,6120,2240,
+ 990,1320, 0,1660, 0, 0, 1,6120,2240,
+ 0, 0,1260,1660, 0, 0, 1,6120,2240,
+ 990, 0,1440,1680, 0, 0, 1,6120,2240,
+ 0,1120,1500,1700, 0, 0, 1,6120,2240,
+ 990,1340,1540,1740, 0, 0, 1,6120,2240,
+ 0, 0, 0, 0,1600, 0, 1,6120,2240,
+
+ 990, 0, 0, 0,1740, 0, 1,6120,2240,
+ 0,1120, 0, 0,1760, 0, 1,6120,2240,
+ 990,1320, 0, 0,1800, 0, 1,6120,2240,
+ 0, 0,1260, 0,1800, 0, 1,6120,2240,
+ 990, 0,1460, 0,1840, 0, 1,6120,2240,
+ 0,1120,1500, 0,1860, 0, 1,6120,2240,
+ 990,1340,1540, 0,1880, 0, 1,6140,2240,
+ 0, 0, 0,1440,1880, 0, 1,6140,2240,
+ 990, 0, 0,1600,1880, 0, 1,6140,2240,
+ 0,1120, 0,1620,1880, 0, 1,6140,2240,
+
+ 990,1320, 0,1660,1880, 0, 1,6140,2240,
+ 0, 0,1260,1660,1880, 0, 1,6140,2240,
+ 990, 0,1460,1700,1900, 0, 1,6140,2240,
+ 0,1120,1500,1700,1900, 0, 1,6140,2240,
+ 990,1340,1540,1710,1900, 0, 1,6140,2240,
+ 0, 0, 0, 0, 0,1720, 1,6140,2240,
+ 990, 0, 0, 0, 0,1920, 1,6140,2240,
+ 0,1120, 0, 0, 0,1920, 1,6140,2240,
+ 990,1340, 0, 0, 0,1940, 1,6140,2240,
+ 0, 0,1260, 0, 0,1940, 1,6140,2240,
+
+ 990, 0,1440, 0, 0,2000, 1,6140,2240,
+ 0,1120,1500, 0, 0,2000, 1,6140,2240,
+ 990,1340,1540, 0, 0,2020, 1,6140,2240,
+ 0, 0, 0,1440, 0,2020, 1,6140,2240,
+ 990, 0, 0,1600, 0,2020, 1,6140,2240,
+ 0,1120, 0,1620, 0,2020, 1,6140,2240,
+ 990,1320, 0,1660, 0,2020, 1,6140,2240,
+ 0, 0,1260,1660, 0,2020, 1,6140,2240,
+ 990, 0,1440,1700, 0,2020, 1,6140,2240,
+ 0,1120,1500,1700, 0,2020, 1,6140,2240,
+
+ 990,1340,1540,1740, 0,2020, 1,6140,2240,
+ 0, 0, 0, 0,1560,2020, 1,6140,2240,
+ 990, 0, 0, 0,1700,2020, 1,6140,2240,
+ 0,1120, 0, 0,1720,2020, 1,6140,2240,
+ 990,1340, 0, 0,1780,2020, 1,6140,2240,
+ 0, 0,1260, 0,1780,2020, 1,6140,2240,
+ 990, 0,1440, 0,1820,2020, 1,6140,2240,
+ 0,1120,1500, 0,1820,2020, 1,6140,2240,
+ 990,1340,1540, 1,1660,2020, 1,6140,2240,
+ 0, 0, 0,5540,5786,1800, 1,6140,2240,
+
+ 990, 0, 1,5560,5776,1820, 1,6200,2240,
+ 0,1120, 1,5560,5776,1820, 1,6200,2240,
+ 990,1320, 1,5560,5776,1840, 1,6200,2240,
+ 0, 0,5356,5570,5776,1840, 1,6200,2240,
+ 990, 1,5396,5600,5786,1840, 1,6200,2240,
+ 0,5200,5435,5600,5786,1840, 1,6200,2240,
+ 990,5390,5435,5600,5786,1840, 1,6200,2240,
+ 0, 0, 0, 0, 0, 0,10076,10286,2180,
+ 990, 0, 0, 0, 0, 1,5971,6220,2240,
+ 0,1120, 0, 0, 0, 1,5971,6220,2240,
+
+ 990,1320, 0, 0, 0, 1,5971,6220,2240,
+ 0, 0,1260, 0, 0, 1,5971,6220,2240,
+ 990, 0,1440, 0, 0, 1,5989,6220,2240,
+ 0,1120,1500, 0, 0, 1,5989,6220,2240,
+ 990,1340,1540, 0, 0, 1,5999,6220,2240,
+ 0, 0, 0,1440, 0, 1,5999,6220,2240,
+ 990, 0, 0,1580, 0, 1,5999,6220,2240,
+ 0,1120, 0,1600, 0, 1,5999,6220,2240,
+ 990,1320, 0,1660, 0, 1,6011,6220,2240,
+ 0, 0,1260,1660, 0, 1,6011,6220,2240,
+
+ 990, 0,1440,1680, 0, 1,6011,6220,2240,
+ 0,1120,1500,1700, 0, 1,6011,6220,2240,
+ 990,1340,1540,1740, 0, 1,6019,6220,2240,
+ 0, 0, 0, 0,1600, 1,6019,6220,2240,
+ 990, 0, 0, 0,1780, 1,6019,6220,2240,
+ 0,1120, 0, 0,1780, 1,6019,6220,2240,
+ 990,1320, 0, 0,1820, 1,6019,6220,2240,
+ 0, 0,1260, 0,1820, 1,6019,6220,2240,
+ 990, 0,1440, 0,1820, 1,6019,6220,2240,
+ 0,1120,1500, 0,1820, 1,6019,6220,2240,
+
+ 990,1340,1540, 0,1860, 1,6019,6220,2240,
+ 0, 0, 0,1400,1860, 1,6019,6220,2240,
+ 990, 0, 0,1600,1860, 1,6019,6220,2240,
+ 0,1120, 0,1600,1860, 1,6019,6220,2240,
+ 990,1340, 0,1640,1860, 1,6029,6220,2240,
+ 0, 0,1260,1660,1860, 1,6029,6220,2240,
+ 990, 0,1440,1700,1860, 1,6029,6220,2240,
+ 0,1120,1480,1700,1860, 1,6029,6220,2240,
+ 990,1350,1570,1720,1920, 1,6029,6220,2240,
+ 0, 0, 0, 0, 0,9920,6029,6220,2240,
+
+ 990, 0, 0, 0, 1,5810,6029,6220,2240,
+ 0,1120, 0, 0, 1,5810,6029,6220,2240,
+ 990,1340, 0, 0, 1,5820,6029,6220,2240,
+ 0, 0,1260, 0, 1,5820,6029,6220,2240,
+ 990, 0,1440, 0, 1,5820,6029,6220,2240,
+ 0,1120,1500, 0, 1,5820,6029,6220,2240,
+ 990,1340,1540, 0, 1,5840,6029,6220,2240,
+ 0, 0, 0,1440, 1,5820,6029,6220,2240,
+ 990, 0, 0,1600, 1,5820,6029,6220,2240,
+ 0,1120, 0,1600, 1,5820,6029,6220,2240,
+
+ 990,1320, 0,1660, 1,5820,6029,6220,2240,
+ 0, 0,1260,1660, 1,5820,6029,6220,2240,
+ 990, 0,1440,1680, 1,5820,6029,6220,2240,
+ 0,1120,1500,1700, 1,5820,6029,6220,2240,
+ 990,1340,1540,1720, 1,5820,6029,6220,2240,
+ 0, 0, 0, 0,5580,5820,6029,6220,2240,
+ 990, 0, 0, 1,5620,5820,6029,6220,2240,
+ 0,1120, 0, 1,5620,5820,6029,6220,2240,
+ 990,1320, 0, 1,5640,5820,6029,6220,2240,
+ 0, 0,1260, 1,5640,5820,6029,6220,2240,
+
+ 990, 0,1440, 1,5640,5820,6029,6220,2240,
+ 0,1120,1500, 1,5640,5820,6029,6220,2240,
+ 990,1340,1540, 1,5660,5820,6029,6220,2240,
+ 0, 0, 0,5400,5660,5820,6029,6220,2240,
+ 990, 0, 1,5460,5660,5820,6029,6220,2240,
+ 0,1120, 1,5460,5660,5820,6029,6220,2240,
+ 990,1340, 1,5460,5660,5820,6029,6220,2240,
+ 0, 0, 0,5460,5660,5820,6029,6220,2240,
+ 990, 0, 1,5460,5660,5820,6029,6220,2240,
+ 0,1120, 1,5460,5660,5820,6029,6220,2240,
+
+ 1020,1400,1660,1860,2060,2240,2350, 1,2250
+};
+
+unsigned short normal_128k_9dot_dac[]={
+ 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 960, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0,1100, 0, 0, 0, 0, 0, 0, 0,
+ 980,1280, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,1250, 0, 0, 0, 0, 0, 0,
+ 980, 0,1390, 0, 0, 0, 0, 0, 0,
+ 0,1130,1440, 0, 0, 0, 0, 0, 0,
+ 980,1320,1480, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0,1400, 0, 0, 0, 0, 0,
+ 980, 0, 0,1510, 0, 0, 0, 0, 0,
+ 0,1130, 0,1530, 0, 0, 0, 0, 0,
+
+ 980,1320, 0,1580, 0, 0, 0, 0, 0,
+ 0, 0,1260,1580, 0, 0, 0, 0, 0,
+ 980, 1,1300,1580, 0, 0, 0, 0, 0,
+ 0,5246,5446,1460, 0, 0, 0, 0, 0,
+ 5076,5296,5446,1460, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,1520, 0, 0, 0, 0,
+ 980, 0, 0, 0,1620, 0, 0, 0, 0,
+ 0,1130, 0, 0,1640, 0, 0, 0, 0,
+ 980,1320, 0, 0,1690, 0, 0, 0, 0,
+ 0, 0,1280, 0,1680, 0, 0, 0, 0,
+
+ 1000, 0,1430, 1,1570, 0, 0, 0, 0,
+ 0,1090,1460, 1,1570, 0, 0, 0, 0,
+ 990,1340,1540, 1,1580, 0, 0, 0, 0,
+ 0, 0, 0,5496,1600, 0, 0, 0, 0,
+ 970, 0, 1,5546,1600, 0, 0, 0, 0,
+ 0,1140, 1,5546,1600, 0, 0, 0, 0,
+ 1000,1320, 1,5546,1600, 0, 0, 0, 0,
+ 0, 0,5346,5566,1600, 0, 0, 0, 0,
+ 1000, 1,5416,5586,1600, 0, 0, 0, 0,
+ 0,5226,5446,5586,1600, 0, 0, 0, 0,
+
+ 5076,5286,5446,5586,1600, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0,1640, 0, 0, 0,
+ 980, 0, 0, 0, 0,1760, 0, 0, 0,
+ 0,1130, 0, 0, 0,1780, 0, 0, 0,
+ 980,1320, 0, 0, 1,1680, 0, 0, 0,
+ 0, 0,1280, 0, 0,1800, 0, 0, 0,
+ 980, 0,1420, 0, 1,1680, 0, 0, 0,
+ 0,1130,1460, 0, 1,1680, 0, 0, 0,
+ 1000,1320,1480, 0, 1,1680, 0, 0, 0,
+ 0, 0, 0,1380, 1,1680, 0, 0, 0,
+
+ 980, 0, 0,1540, 1,1700, 0, 0, 0,
+ 0,1130, 0,1580, 1,1700, 0, 0, 0,
+ 1000,1320, 0,1620, 1,1700, 0, 0, 0,
+ 0, 0,5346,1480, 1,1700, 0, 0, 0,
+ 980, 1,5386,1480, 1,1700, 0, 0, 0,
+ 0,5246,5446,1480, 1,1700, 0, 0, 0,
+ 5076,5296,5446,1480, 1,1700, 0, 0, 0,
+ 0, 0, 0, 0,5616,1740, 0, 0, 0,
+ 980, 0, 0, 1,5636,1740, 0, 0, 0,
+ 0,1130, 0, 1,5646,1740, 0, 0, 0,
+
+ 1000,1320, 0, 1,5656,1740, 0, 0, 0,
+ 0, 0,1280, 1,5666,1740, 0, 0, 0,
+ 980, 0,1420, 1,5676,1740, 0, 0, 0,
+ 0,1130,1460, 1,5676,1740, 0, 0, 0,
+ 1000,1320,1480, 1,5676,1740, 0, 0, 0,
+ 0, 0, 0,5498,5726,1740, 0, 0, 0,
+ 980, 0, 1,5526,5706,1740, 0, 0, 0,
+ 0,1130, 1,5526,5706,1740, 0, 0, 0,
+ 1000,1320, 1,5526,5706,1740, 0, 0, 0,
+ 0, 0,5356,5576,5706,1740, 0, 0, 0,
+
+ 980, 1,5406,5576,5726,1740, 0, 0, 0,
+ 0,5216,5416,5576,5726,1740, 0, 0, 0,
+ 5076,5296,5446,5576,5726,1740, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,1760, 0, 0,
+ 980, 0, 0, 0, 0, 1,1780, 0, 0,
+ 0,1130, 0, 0, 0, 1,1790, 0, 0,
+ 1000,1320, 0, 0, 0, 1,1800, 0, 0,
+ 0, 0,1280, 0, 0, 1,1800, 0, 0,
+ 980, 0,1420, 0, 0, 1,1820, 0, 0,
+ 0,1130,1460, 0, 0, 1,1820, 0, 0,
+
+ 1000,1320,1480, 0, 0, 1,1820, 0, 0,
+ 0, 0, 0,1400, 0, 1,1820, 0, 0,
+ 980, 0, 0,1540, 0, 1,1820, 0, 0,
+ 0,1130, 0,1560, 0, 1,1820, 0, 0,
+ 1000,1320, 0,1610, 0, 1,1830, 0, 0,
+ 0, 0,1280,1620, 0, 1,1830, 0, 0,
+ 980, 1,5386,1480, 0, 1,1840, 0, 0,
+ 0,5246,5446,1480, 0, 1,1840, 0, 0,
+ 5076,5296,5446,1480, 0, 1,1840, 0, 0,
+ 0, 0, 0, 0,1540, 1,1860, 0, 0,
+
+ 980, 0, 0, 0,1690, 1,1840, 0, 0,
+ 0,1130, 0, 0,1700, 1,1840, 0, 0,
+ 1000,1320, 0, 0,1730, 1,1840, 0, 0,
+ 0, 0,1280, 0,1730, 1,1850, 0, 0,
+ 980, 0,1420, 1,1580, 1,1850, 0, 0,
+ 0,1130,1460, 1,1580, 1,1850, 0, 0,
+ 1000,1320,1480, 1,1580, 1,1850, 0, 0,
+ 0, 0, 0,5486,1600, 1,1850, 0, 0,
+ 980, 0, 1,5516,1610, 1,1850, 0, 0,
+ 0,1130, 1,5526,1610, 1,1850, 0, 0,
+
+ 1000,1320, 1,5546,1610, 1,1850, 0, 0,
+ 0, 0,5326,5586,1610, 1,1850, 0, 0,
+ 980, 1,5396,5596,1630, 1,1850, 0, 0,
+ 0,5246,5446,5596,1630, 1,1850, 0, 0,
+ 5076,5296,5446,5596,1630, 1,1850, 0, 0,
+ 0, 0, 0, 0, 0,5776,1880, 0, 0,
+ 980, 0, 0, 0, 1,5796,1880, 0, 0,
+ 0,1130, 0, 0, 1,5796,1880, 0, 0,
+ 1000,1320, 0, 0, 1,5796,1880, 0, 0,
+ 0, 0,1280, 0, 1,5796,1880, 0, 0,
+
+ 980, 0,1430, 0, 1,5796,1880, 0, 0,
+ 0,1130,1470, 0, 1,5796,1880, 0, 0,
+ 1000,1320,1490, 0, 1,5796,1880, 0, 0,
+ 0, 0, 0,1400, 1,5796,1880, 0, 0,
+ 980, 0, 0,1600, 1,5796,1880, 0, 0,
+ 0,1130, 0,1620, 1,5806,1880, 0, 0,
+ 1000,1320, 0,1640, 1,5816,1880, 0, 0,
+ 0, 0,1290,1660, 1,5816,1880, 0, 0,
+ 980, 1,5396,1500, 1,5826,1890, 0, 0,
+ 0,5246,5446,1500, 1,5826,1890, 0, 0,
+
+ 5076,5296,5446,1500, 1,5826,1890, 0, 0,
+ 0, 0, 0, 0,5616,5846,1890, 0, 0,
+ 980, 0, 0, 1,5646,5866,1900, 0, 0,
+ 0,1130, 0, 1,5656,5866,1900, 0, 0,
+ 1000,1320, 0, 1,5666,5866,1900, 0, 0,
+ 0, 0,1280, 1,5666,5866,1900, 0, 0,
+ 980, 0,1430, 1,5686,5876,1900, 0, 0,
+ 0,1120,1470, 1,5696,5876,1900, 0, 0,
+ 1000,1320,1490, 1,5706,5876,1900, 0, 0,
+ 0, 0, 0,5466,5706,5876,1900, 0, 0,
+
+ 980, 0, 1,5536,5746,5896,1900, 0, 0,
+ 0,1130, 1,5546,5746,5896,1900, 0, 0,
+ 1000,1320, 1,5566,5746,5896,1900, 0, 0,
+ 0, 0,5366,5596,5746,5896,1900, 0, 0,
+ 980, 1,5396,5596,5746,5896,1900, 0, 0,
+ 0,5206,5446,5596,5746,5896,1900, 0, 0,
+ 5076,5296,5446,5596,5746,5896,1900, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0,1920, 0,
+ 980, 0, 0, 0, 0, 0, 1,1920, 0,
+ 0,1130, 0, 0, 0, 0, 1,1930, 0,
+
+ 1000,1320, 0, 0, 0, 0, 1,1940, 0,
+ 0, 0,1280, 0, 0, 0, 1,1940, 0,
+ 980, 0,1410, 0, 0, 0, 1,1940, 0,
+ 0,1130,1460, 0, 0, 0, 1,1940, 0,
+ 1000,1320,1490, 0, 0, 0, 1,1940, 0,
+ 0, 0, 0,1390, 0, 0, 1,1940, 0,
+ 980, 0, 0,1540, 0, 0, 1,1950, 0,
+ 0,1130, 0,1560, 0, 0, 1,1950, 0,
+ 1000,1320, 0,1600, 0, 0, 1,1950, 0,
+ 0, 0,1280,1620, 0, 0, 1,1960, 0,
+
+ 980, 1,5386,1480, 0, 0, 1,1960, 0,
+ 0,5246,5446,1480, 0, 0, 1,1960, 0,
+ 5076,5296,5446,1480, 0, 0, 1,1960, 0,
+ 0, 0, 0, 0,1540, 0, 1,1960, 0,
+ 980, 0, 0, 1,1540, 0, 1,1960, 0,
+ 0,1130, 0, 1,1550, 0, 1,1960, 0,
+ 1000,1320, 0, 1,1560, 0, 1,1960, 0,
+ 0, 0,1280, 1,1580, 0, 1,1960, 0,
+ 980, 0,1420, 1,1590, 0, 1,1960, 0,
+ 0,1130,1460, 1,1600, 0, 1,1960, 0,
+
+ 1000,1320,1490, 1,1620, 0, 1,1960, 0,
+ 0, 0, 0,5496,1640, 0, 1,1960, 0,
+ 980, 0, 1,5516,1620, 0, 1,1960, 0,
+ 0,1130, 1,5526,1620, 0, 1,1960, 0,
+ 1000,1320, 1,5526,1620, 0, 1,1960, 0,
+ 0, 0,5246,5536,1620, 0, 1,1960, 0,
+ 980, 1,5386,5596,1620, 0, 1,1970, 0,
+ 0,5206,5446,5596,1620, 0, 1,1970, 0,
+ 5076,5296,5446,5596,1620, 0, 1,1970, 0,
+ 0, 0, 0, 0, 0,1660, 1,1970, 0,
+
+ 980, 0, 0, 0, 1,1700, 1,1980, 0,
+ 0,1130, 0, 0, 1,1700, 1,1980, 0,
+ 1000,1320, 0, 0, 1,1700, 1,1980, 0,
+ 0, 0,1280, 0, 1,1710, 1,1980, 0,
+ 980, 0,1430, 0, 1,1720, 1,1980, 0,
+ 0,1130,1470, 0, 1,1720, 1,1980, 0,
+ 1000,1320,1490, 0, 1,1720, 1,1980, 0,
+ 0, 0, 0,1420, 1,1720, 1,1980, 0,
+ 980, 0, 1,1430, 1,1720, 1,1980, 0,
+ 0,1130, 1,1460, 1,1720, 1,1980, 0,
+
+ 1000,1320, 1,1480, 1,1720, 1,1980, 0,
+ 0, 0,5356,1480, 1,1720, 1,1980, 0,
+ 990, 1,5386,1480, 1,1730, 1,1990, 0,
+ 0,5246,5446,1480, 1,1730, 1,1990, 0,
+ 5076,5296,5446,1480, 1,1730, 1,1990, 0,
+ 0, 0, 0, 0,5616,1750, 1,1990, 0,
+ 980, 0, 0, 1,5636,1760, 1,1990, 0,
+ 0,1130, 0, 1,5646,1760, 1,1990, 0,
+ 1000,1320, 0, 1,5666,1760, 1,1990, 0,
+ 0, 0,1280, 1,5666,1760, 1,1990, 0,
+
+ 980, 0,1430, 1,5666,1760, 1,1990, 0,
+ 0,1130,1470, 1,5666,1760, 1,1990, 0,
+ 1000,1320,1490, 1,5696,1780, 1,1990, 0,
+ 0, 0, 0,5496,5706,1770, 1,1990, 0,
+ 980, 0, 1,5516,5706,1780, 1,2020, 0,
+ 0,1130, 1,5526,5716,1780, 1,2020, 0,
+ 1000,1320, 1,5546,5726,1780, 1,2020, 0,
+ 0, 0,5356,5546,5726,1780, 1,2020, 0,
+ 980, 1,5396,5596,5746,1780, 1,2020, 0,
+ 0,5206,5446,5596,5746,1780, 1,2020, 0,
+
+ 5076,5296,5446,5596,5746,1780, 1,2020, 0,
+ 0, 0, 0, 0, 0, 0,5896,2020, 0,
+ 980, 0, 0, 0, 0, 1,5886,2020, 0,
+ 0,1120, 0, 0, 0, 1,5896,2020, 0,
+ 1000,1320, 0, 0, 0, 1,5896,2020, 0,
+ 0, 0,1280, 0, 0, 1,5896,2020, 0,
+ 980, 0,1430, 0, 0, 1,5946,2020, 0,
+ 0,1130,1470, 0, 0, 1,5946,2020, 0,
+ 1000,1320,1490, 0, 0, 1,5956,2020, 0,
+ 0, 0, 0,1400, 0, 1,5946,2020, 0,
+
+ 980, 0, 1,1430, 0, 1,5956,2030, 0,
+ 0,1140, 1,1450, 0, 1,5956,2030, 0,
+ 1000,1320, 1,1460, 0, 1,5956,2030, 0,
+ 0, 0,5366,1480, 0, 1,5956,2030, 0,
+ 980, 1,5386,1480, 0, 1,5956,2030, 0,
+ 0,5246,5446,1480, 0, 1,5956,2030, 0,
+ 5076,5296,5446,1480, 0, 1,5956,2030, 0,
+ 0, 0, 0, 0,1580, 1,5956,2030, 0,
+ 980, 0, 0, 1,1590, 1,5976,2050, 0,
+ 0,1140, 0, 1,1600, 1,5976,2050, 0,
+
+ 1000,1320, 0, 1,1600, 1,5976,2050, 0,
+ 0, 0,1300, 1,1600, 1,5976,2050, 0,
+ 980, 0,1440, 1,1610, 1,5976,2050, 0,
+ 0,1140,1480, 1,1620, 1,5976,2050, 0,
+ 1000,1330,1500, 1,1620, 1,5976,2050, 0,
+ 0, 0, 0,5496,1620, 1,5976,2050, 0,
+ 980, 0, 1,5526,1620, 1,5996,2050, 0,
+ 0,1140, 1,5546,1630, 1,5996,2050, 0,
+ 1000,1330, 1,5546,1630, 1,5996,2050, 0,
+ 0, 0,5346,5586,1630, 1,5996,2050, 0,
+
+ 980, 1,5386,5596,1630, 1,5996,2050, 0,
+ 0,5246,5446,5596,1630, 1,5996,2050, 0,
+ 5076,5296,5446,5596,1630, 1,5996,2050, 0,
+ 0, 0, 0, 0, 0,5766,6006,2050, 0,
+ 980, 0, 0, 0, 1,5806,6006,2050, 0,
+ 0,1140, 0, 0, 1,5806,6006,2050, 0,
+ 1000,1320, 0, 0, 1,5816,6006,2050, 0,
+ 0, 0,1280, 0, 1,5806,6006,2050, 0,
+ 980, 0,1440, 0, 1,5816,6006,2050, 0,
+ 0,1140,1480, 0, 1,5826,6006,2050, 0,
+
+ 1000,1320,1490, 0, 1,5826,6006,2050, 0,
+ 0, 0, 0,1430, 1,5826,6006,2050, 0,
+ 980, 0, 1,1450, 1,5826,6006,2050, 0,
+ 0,1140, 1,1460, 1,5836,6006,2050, 0,
+ 1000,1320, 1,1480, 1,5846,6006,2050, 0,
+ 0, 0,5366,1500, 1,5846,6006,2050, 0,
+ 980, 1,5406,1500, 1,5866,6026,2050, 0,
+ 0,5246,5446,1500, 1,5866,6026,2050, 0,
+ 5076,5296,5446,1500, 1,5866,6026,2050, 0,
+ 0, 0, 0, 0,5626,5886,6026,2050, 0,
+
+ 980, 0, 0, 1,5676,5886,6026,2050, 0,
+ 0,1140, 0, 1,5676,5886,6026,2050, 0,
+ 1000,1320, 0, 1,5696,5886,6026,2050, 0,
+ 0, 0,1290, 1,5696,5886,6026,2050, 0,
+ 980, 0,1440, 1,5696,5896,6026,2050, 0,
+ 0,1140,1480, 1,5696,5896,6026,2050, 0,
+ 1000,1320,1500, 1,5716,5896,6026,2050, 0,
+ 0, 0, 0,5466,5716,5896,6026,2050, 0,
+ 980, 0, 1,5516,5726,5896,6026,2050, 0,
+ 0,1140, 1,5526,5726,5896,6026,2050, 0,
+
+ 1000,1320, 1,5566,5726,5896,6026,2050, 0,
+ 0, 0,5356,5566,5726,5896,6026,2050, 0,
+ 980, 1,5376,5566,5726,5896,6026,2050, 0,
+ 0,5246,5446,5566,5726,5896,6026,2050, 0,
+ 5076,5296,5446,5566,5726,5896,6026,2050, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,2040,
+ 980, 0, 0, 0, 0, 0, 0, 1,2050,
+ 0,1130, 0, 0, 0, 0, 0, 1,2060,
+ 1000,1320, 0, 0, 0, 0, 0, 1,2070,
+ 0, 0,1280, 0, 0, 0, 0, 1,2070,
+
+ 980, 0,1420, 0, 0, 0, 0, 1,2070,
+ 0,1130,1470, 0, 0, 0, 0, 1,2070,
+ 1000,1320,1490, 0, 0, 0, 0, 1,2070,
+ 0, 0, 0,1400, 0, 0, 0, 1,2070,
+ 980, 0, 0,1530, 0, 0, 0, 1,2080,
+ 0,1130, 0,1570, 0, 0, 0, 1,2080,
+ 1000,1320, 0,1610, 0, 0, 0, 1,2090,
+ 0, 0,1280,1630, 0, 0, 0, 1,2080,
+ 980, 1,5386,1480, 0, 0, 0, 1,2090,
+ 0,5246,5446,1480, 0, 0, 0, 1,2090,
+
+ 5076,5296,5446,1490, 0, 0, 0, 1,2090,
+ 0, 0, 0, 0,1530, 0, 0, 1,2090,
+ 980, 0, 0, 1,1550, 0, 0, 1,2090,
+ 0,1130, 0, 1,1560, 0, 0, 1,2090,
+ 1000,1320, 0, 1,1580, 0, 0, 1,2090,
+ 0, 0,1280, 1,1580, 0, 0, 1,2090,
+ 980, 0,1430, 1,1580, 0, 0, 1,2090,
+ 0,1130,1470, 1,1590, 0, 0, 1,2090,
+ 1000,1320,1490, 1,1600, 0, 0, 1,2090,
+ 0, 0, 0,5496,1620, 0, 0, 1,2090,
+
+ 980, 0, 1,5536,1620, 0, 0, 1,2100,
+ 0,1130, 1,5546,1620, 0, 0, 1,2100,
+ 1000,1320, 1,5566,1620, 0, 0, 1,2100,
+ 0, 0,5366,5586,1620, 0, 0, 1,2100,
+ 980, 1,5376,5566,1620, 0, 0, 1,2100,
+ 0,5246,5446,5566,1620, 0, 0, 1,2100,
+ 5096,5296,5446,5566,1620, 0, 0, 1,2100,
+ 0, 0, 0, 0, 0,1660, 0, 1,2100,
+ 980, 0, 0, 0, 1,1670, 0, 1,2100,
+ 0,1130, 0, 0, 1,1680, 0, 1,2100,
+
+ 1000,1320, 0, 0, 1,1700, 0, 1,2100,
+ 0, 0,1280, 0, 1,1700, 0, 1,2100,
+ 980, 0,1430, 0, 1,1710, 0, 1,2110,
+ 0,1130,1470, 0, 1,1720, 0, 1,2110,
+ 1000,1320,1490, 0, 1,1730, 0, 1,2110,
+ 0, 0, 0,1400, 1,1720, 0, 1,2110,
+ 980, 0, 1,1420, 1,1720, 0, 1,2110,
+ 0,1130, 1,1440, 1,1720, 0, 1,2110,
+ 1000,1320, 1,1460, 1,1730, 0, 1,2110,
+ 0, 0,5346,1460, 1,1730, 0, 1,2110,
+
+ 980, 1,5386,1480, 1,1740, 0, 1,2120,
+ 0,5246,5446,1480, 1,1740, 0, 1,2120,
+ 5076,5296,5446,1500, 1,1740, 0, 1,2120,
+ 0, 0, 0, 0,5616,1740, 0, 1,2120,
+ 980, 0, 0, 1,5626,1750, 0, 1,2120,
+ 0,1130, 0, 1,5636,1750, 0, 1,2120,
+ 1000,1320, 0, 1,5656,1750, 0, 1,2120,
+ 0, 0,1280, 1,5666,1750, 0, 1,2120,
+ 980, 0,1440, 1,5666,1750, 0, 1,2120,
+ 0,1130,1480, 1,5666,1750, 0, 1,2120,
+
+ 1000,1320,1490, 1,5686,1750, 0, 1,2120,
+ 0, 0, 0,5486,5726,1750, 0, 1,2120,
+ 980, 0, 1,5496,5726,1750, 0, 1,2130,
+ 0,1140, 1,5526,5726,1750, 0, 1,2130,
+ 1000,1320, 1,5546,5726,1760, 0, 1,2130,
+ 0, 0,5356,5576,5726,1760, 0, 1,2130,
+ 980, 1,5376,5566,5726,1760, 0, 1,2130,
+ 0,5246,5446,5566,5726,1760, 0, 1,2130,
+ 5076,5296,5446,5566,5726,1760, 0, 1,2130,
+ 0, 0, 0, 0, 0, 0,1810, 1,2130,
+
+ 980, 0, 0, 0, 0, 1,1820, 1,2130,
+ 0,1130, 0, 0, 0, 1,1820, 1,2130,
+ 1000,1320, 0, 0, 0, 1,1830, 1,2130,
+ 0, 0,1280, 0, 0, 1,1830, 1,2130,
+ 980, 0,1430, 0, 0, 1,1830, 1,2130,
+ 0,1130,1470, 0, 0, 1,1830, 1,2130,
+ 1000,1320,1490, 0, 0, 1,1830, 1,2130,
+ 0, 0, 0,1400, 0, 1,1830, 1,2130,
+ 980, 0, 1,1420, 0, 1,1850, 1,2130,
+ 0,1130, 1,1440, 0, 1,1850, 1,2130,
+
+ 1000,1320, 1,1460, 0, 1,1850, 1,2130,
+ 0, 0,5346,1460, 0, 1,1850, 1,2130,
+ 980, 1,5386,1480, 0, 1,1860, 1,2130,
+ 0,5246,5446,1480, 0, 1,1860, 1,2130,
+ 5076,5296,5446,1500, 0, 1,1870, 1,2130,
+ 0, 0, 0, 0,1530, 1,1860, 1,2130,
+ 980, 0, 0, 1,1560, 1,1870, 1,2130,
+ 0,1130, 0, 1,1570, 1,1870, 1,2130,
+ 1000,1320, 0, 1,1580, 1,1870, 1,2130,
+ 0, 0,1280, 1,1580, 1,1870, 1,2130,
+
+ 980, 0,1430, 1,1600, 1,1880, 1,2140,
+ 0,1130,1470, 1,1610, 1,1880, 1,2140,
+ 1000,1320,1490, 1,1610, 1,1880, 1,2140,
+ 0, 0, 0,5486,1620, 1,1880, 1,2140,
+ 980, 0, 1,5516,1620, 1,1890, 1,2140,
+ 0,1130, 1,5536,1620, 1,1890, 1,2140,
+ 1000,1320, 1,5566,1620, 1,1890, 1,2140,
+ 0, 0,5366,5586,1620, 1,1890, 1,2140,
+ 980, 1,5376,5566,1630, 1,1900, 1,2140,
+ 0,5246,5466,5566,1630, 1,1900, 1,2140,
+
+ 5076,5296,5446,5566,1630, 1,1900, 1,2140,
+ 0, 0, 0, 0, 0,5376,1900, 1,2140,
+ 980, 0, 0, 0, 1,5776,1900, 1,2150,
+ 0,1130, 0, 0, 1,5796,1900, 1,2150,
+ 1000,1320, 0, 0, 1,5796,1900, 1,2150,
+ 0, 0,1280, 0, 1,5796,1900, 1,2150,
+ 980, 0,1440, 0, 1,5796,1900, 1,2150,
+ 0,1130,1480, 0, 1,5806,1900, 1,2150,
+ 1000,1320,1500, 0, 1,5806,1900, 1,2150,
+ 0, 0, 0,1430, 1,5806,1900, 1,2150,
+
+ 980, 0, 1,1450, 1,5806,1910, 1,2160,
+ 0,1130, 1,1460, 1,5806,1910, 1,2160,
+ 1000,1320, 1,1470, 1,5816,1910, 1,2160,
+ 0, 0,5346,1480, 1,5816,1910, 1,2160,
+ 980, 1,5386,1480, 1,5816,1910, 1,2160,
+ 0,5246,5446,1480, 1,5816,1910, 1,2160,
+ 5076,5296,5446,1500, 1,5816,1910, 1,2160,
+ 0, 0, 0, 0,5586,5836,1910, 1,2160,
+ 980, 0, 0, 1,5626,5836,1910, 1,2160,
+ 0,1140, 0, 1,5636,5836,1910, 1,2160,
+
+ 1000,1320, 0, 1,5646,5836,1910, 1,2160,
+ 0, 0,1290, 1,5646,5836,1910, 1,2160,
+ 980, 0,1430, 1,5646,5836,1910, 1,2160,
+ 0,1140,1480, 1,5656,5836,1910, 1,2160,
+ 1000,1320,1500, 1,5686,5836,1910, 1,2160,
+ 0, 0, 0,5446,5686,5836,1910, 1,2160,
+ 980, 0, 1,5516,5716,5856,1920, 1,2160,
+ 0,1140, 1,5536,5716,5856,1920, 1,2160,
+ 1000,1320, 1,5566,5726,5856,1920, 1,2160,
+ 0, 0,5366,5586,5736,5856,1920, 1,2160,
+
+ 980, 1,5376,5566,5726,5856,1930, 1,2170,
+ 0,5246,5446,5566,5726,5856,1930, 1,2170,
+ 5076,5296,5446,5566,5726,5856,1930, 1,2170,
+ 0, 0, 0, 0, 0, 0, 0,6046,2170,
+ 980, 0, 0, 0, 0, 0, 1,6076,2180,
+ 0,1130, 0, 0, 0, 0, 1,6086,2180,
+ 1000,1320, 0, 0, 0, 0, 1,6086,2180,
+ 0, 0,1280, 0, 0, 0, 1,6086,2180,
+ 980, 0,1420, 0, 0, 0, 1,6086,2180,
+ 0,1130,1470, 0, 0, 0, 1,6086,2180,
+
+ 1000,1320,1490, 0, 0, 0, 1,6086,2180,
+ 0, 0, 0,1400, 0, 0, 1,6086,2180,
+ 980, 0, 1,1420, 0, 0, 1,6086,2180,
+ 0,1130, 1,1440, 0, 0, 1,6086,2180,
+ 1000,1320, 1,1460, 0, 0, 1,6086,2180,
+ 0, 0,5346,1460, 0, 0, 1,6086,2180,
+ 980, 1,5386,1480, 0, 0, 1,6096,2180,
+ 0,5246,5446,1480, 0, 0, 1,6096,2180,
+ 5076,5296,5446,1500, 0, 0, 1,6096,2180,
+ 0, 0, 0, 0,1540, 0, 1,6096,2180,
+
+ 980, 0, 0, 1,1570, 0, 1,6106,2180,
+ 0,1130, 0, 1,1580, 0, 1,6106,2180,
+ 1000,1320, 0, 1,1600, 0, 1,6106,2180,
+ 0, 0,1280, 1,1600, 0, 1,6106,2180,
+ 980, 0,1430, 1,1600, 0, 1,6106,2180,
+ 0,1130,1470, 1,1600, 0, 1,6106,2180,
+ 1000,1320,1490, 1,1610, 0, 1,6106,2180,
+ 0, 0, 0,5486,1610, 0, 1,6106,2180,
+ 980, 0, 1,5526,1620, 0, 1,6106,2180,
+ 0,1130, 1,5546,1620, 0, 1,6106,2180,
+
+ 1000,1320, 1,5546,1630, 0, 1,6106,2180,
+ 0, 0,5346,5586,1630, 0, 1,6106,2180,
+ 980, 1,5376,5566,1630, 0, 1,6116,2180,
+ 0,5246,5446,5566,1630, 0, 1,6116,2180,
+ 5076,5296,5446,5566,1630, 0, 1,6116,2180,
+ 0, 0, 0, 0, 0,1700, 1,6116,2180,
+ 980, 0, 0, 0, 1,1720, 1,6116,2180,
+ 0,1130, 0, 0, 1,1730, 1,6116,2180,
+ 1000,1320, 0, 0, 1,1730, 1,6116,2180,
+ 0, 0,1280, 0, 1,1730, 1,6116,2180,
+
+ 980, 0,1430, 0, 1,1740, 1,6116,2180,
+ 0,1130,1470, 0, 1,1740, 1,6116,2180,
+ 1000,1320,1490, 0, 1,1740, 1,6116,2180,
+ 0, 0, 0,1430, 1,1740, 1,6116,2180,
+ 980, 0, 1,1430, 1,1740, 1,6116,2180,
+ 0,1130, 1,1450, 1,1740, 1,6116,2180,
+ 1000,1320, 1,1460, 1,1740, 1,6116,2180,
+ 0, 0,5366,1470, 1,1740, 1,6116,2180,
+ 980, 1,5386,1480, 1,1750, 1,6116,2180,
+ 0,5246,5446,1480, 1,1750, 1,6116,2180,
+
+ 5076,5296,5446,1500, 1,1750, 1,6116,2180,
+ 0, 0, 0, 0,5616,1750, 1,6116,2180,
+ 980, 0, 0, 1,5616,1770, 1,6126,2190,
+ 0,1130, 0, 1,5636,1770, 1,6126,2190,
+ 1000,1320, 0, 1,5646,1770, 1,6126,2190,
+ 0, 0,1280, 1,5646,1770, 1,6126,2190,
+ 980, 0,1430, 1,5646,1770, 1,6126,2190,
+ 0,1130,1480, 1,5666,1770, 1,6126,2190,
+ 1000,1320,1500, 1,5686,1770, 1,6126,2190,
+ 0, 0, 0,5446,5686,1770, 1,6126,2190,
+
+ 980, 0, 1,5516,5716,1770, 1,6126,2190,
+ 0,1130, 1,5536,5726,1770, 1,6126,2190,
+ 1000,1320, 1,5566,5726,1770, 1,6126,2190,
+ 0, 0,5366,5586,5736,1770, 1,6126,2190,
+ 980, 1,5376,5566,5726,1780, 1,6136,2190,
+ 0,5246,5446,5566,5726,1780, 1,6136,2190,
+ 5076,5296,5446,5566,5726,1780, 1,6136,2190,
+ 0, 0, 0, 0, 0, 0,5886,6136,2190,
+ 980, 0, 0, 0, 0, 1,5906,6156,2190,
+ 0,1130, 0, 0, 0, 1,5916,6156,2190,
+
+ 1000,1320, 0, 0, 0, 1,5936,6156,2190,
+ 0, 0,1280, 0, 0, 1,5916,6156,2190,
+ 980, 0,1430, 0, 0, 1,5946,6176,2190,
+ 0,1130,1470, 0, 0, 1,5956,6176,2190,
+ 1000,1320,1490, 0, 0, 1,5956,6176,2190,
+ 0, 0, 0,1420, 0, 1,5966,6176,2190,
+ 980, 0, 1,1430, 0, 1,5966,6166,2190,
+ 0,1130, 1,1450, 0, 1,5966,6166,2190,
+ 1000,1320, 1,1460, 0, 1,5966,6166,2190,
+ 0, 0,5366,1470, 0, 1,5966,6166,2190,
+
+ 980, 1,5376,1480, 0, 1,5966,6166,2190,
+ 0,5246,5446,1480, 0, 1,5966,6166,2190,
+ 5076,5296,5446,1500, 0, 1,5966,6166,2190,
+ 0, 0, 0, 0,1580, 1,5966,6166,2190,
+ 980, 0, 0, 1,1600, 1,5976,6166,2190,
+ 0,1130, 0, 1,1600, 1,5976,6166,2190,
+ 1000,1320, 0, 1,1600, 1,5976,6166,2190,
+ 0, 0,1280, 1,1600, 1,5976,6166,2190,
+ 980, 0,1430, 1,1600, 1,5976,6166,2190,
+ 0,1130,1480, 1,1600, 1,5976,6166,2190,
+
+ 1000,1320,1490, 1,1610, 1,5976,6166,2190,
+ 0, 0, 0,5446,1620, 1,5976,6166,2190,
+ 980, 0, 1,5526,1620, 1,5986,6166,2190,
+ 0,1130, 1,5546,1620, 1,5986,6166,2190,
+ 1000,1320, 1,5546,1630, 1,5986,6166,2190,
+ 0, 0,5346,5566,1630, 1,5986,6166,2190,
+ 980, 1,5376,5566,1630, 1,5986,6166,2190,
+ 0,5246,5446,5566,1630, 1,5986,6166,2190,
+ 5076,5296,5446,5566,1630, 1,5986,6166,2190,
+ 0, 0, 0, 0, 0,9876,10080,10240,2160,
+
+ 980, 0, 0, 0, 1,5776,6016,6166,2190,
+ 0,1130, 0, 0, 1,5786,6016,6166,2190,
+ 1000,1320, 0, 0, 1,5796,6016,6166,2190,
+ 0, 0,1280, 0, 1,5786,6016,6166,2190,
+ 980, 0,1440, 0, 1,5796,6016,6166,2190,
+ 0,1130,1480, 0, 1,5796,6016,6166,2190,
+ 1000,1320,1490, 0, 1,5796,6016,6166,2190,
+ 0, 0, 0,1430, 1,5796,6016,6166,2190,
+ 980, 0, 1,1430, 1,5796,6016,6166,2190,
+ 0,1130, 1,1450, 1,5796,6016,6166,2190,
+
+ 1000,1320, 1,1460, 1,5796,6016,6166,2190,
+ 0, 0,5366,1470, 1,5816,6016,6166,2190,
+ 980, 1,5376,1480, 1,5826,6016,6166,2200,
+ 0,5246,5446,1480, 1,5836,6016,6166,2200,
+ 5076,5296,5446,1500, 1,5836,6016,6166,2200,
+ 0, 0, 0, 0,9736,5836,6016,6166,2200,
+ 980, 0, 0, 1,9736,5846,6016,6166,2200,
+ 0,1130, 0, 1,9736,5846,6016,6166,2200,
+ 1000,1320, 0, 1,9736,5846,6016,6166,2200,
+ 0, 0,1290, 1,9736,5846,6016,6166,2200,
+
+ 980, 0,1440, 1,9756,5846,6016,6166,2200,
+ 0,1130,1480, 1,9756,5846,6016,6166,2200,
+ 1000,1320,1500, 1,9756,5846,6016,6166,2200,
+ 0, 0, 0,9586, 1,5746,5986,6146,2200,
+ 980, 0, 1,9576,5666,5866,6016,6166,2210,
+ 0,1130, 1,9586,5666,5866,6016,6166,2210,
+ 1000,1320, 1,9596,5666,5866,6016,6166,2210,
+ 0, 0,9486, 1,5626,5846,6016,6166,2210,
+ 980, 1,5386,5566,5726,5866,6016,6166,2210,
+ 0,5246, 1,5436,5666,5856,6006,6166,2210,
+
+ 5100,5300,5450,5600,5750,5900,6050,6200,2200
+ };
+
+
+extern InkJetPrinter *pInkJectPrinter;
+// 传送打印内容的数据结构
+// $D1rccccLLLLddd...ddco
+struct _DataFromPC {
+ char keyword; // 特征字符 $
+ char fun; // 功能码,固定为"D", 表示传送打印点阵信息
+ char devAddr; // 默认01, (01~08)
+ char printRowDotNum; // 信息点阵垂直有效行数5~40点
+ int printColDotNum; // 信息点阵水平有效列数8~3100列,均为8的整数倍值。
+ int Length; // (printRowDotNum* (1+printColDotNum/8)) + 1字节(检验码)+1字节(结束字符)
+ char *dotData; // 按行列顺序排列的点阵数据,实际点阵数据总字节数为:printRowDotNum* printColDotNum/8
+ char crc; // 校验字节
+ char eoc; // 结束符,固定为小写字母'o'
+}dataFromPC,r_dataFromPC;
+
+struct _TextFromPC {
+ char keyword; // 特征字符 ‘#’
+ char fun; // 功能码,固定为‘T’, 表示传送打印点阵信息
+ char devAddr; // 默认 1, (1~8)
+ unsigned char Length; // Head(4) + 字串长度[32] + 1字节(检验码)+1字节(结束字符)
+ char mStr[32]; // 定长,不足补 '\0'
+ char crc; // 校验字节
+ char eoc; // 结束符,固定为小写字母'o'
+}TextFromPC,r_TextFromPC; // 38字节
+
+// 传送参数和命令的数据结构
+// &C14PPFco
+struct _ParaFromPC{
+ unsigned char keyword; // 特征字符 &
+ unsigned char fun; // 功能码,固定为"C",表示传送参数或命令
+ unsigned char devAddr; // 默认01, (01~08)
+ unsigned char Length; // 参数长度,从参数printCmd到 eoc 的总字节数
+ unsigned char printCmd; // "P"表示开始打印,"S"表示停止打印,"p"表示暂停打印, "O"表示不操作
+ unsigned char printMode; // "F" 正向打印,"R" 正向打印, "U" 上下颠倒打印,"T" 上下左右同时颠倒打印
+ // 还可以添加其它参数
+
+ unsigned char crc; // 校验字节
+ unsigned char eoc; // 结束符,固定为小写字母'o'
+
+}paraFromPC,r_paraFromPC;
+// &R14S?co 查询喷码机状态
+// &R14D?co 查询打印内容点阵
+
+
+// 查询喷码机状态的数据结构
+/*所有警告都是高电平警告*/
+struct _StatusToPC{
+ unsigned char keyword; // 特征字符 #
+ unsigned char fun; // 功能码,固定为"S",表示传送喷码机状态数据
+ unsigned char devAddr; // 默认01, (01~08)
+ unsigned char Length; // 参数长度,从参数printCmd到 eoc 的总字节数
+ unsigned char printCmd; // 打印操作当前状态, "P"表示正在打印,"S"表示停止打印,"p"表示暂停打印, "C"表示回收槽未开,"W"表示等待状态
+ unsigned char printMode; // 当前打印方向状态,其中:"F" 正向打印,"R" 正向打印, "U" 上下颠倒打印,"T" 上下左右同时颠倒打印
+
+ unsigned char statWarn:8; // {墨线开关,高压报警,回收故障,墨水液位,溶剂液位,墨水渗漏,喷头盖开,粘度故障}
+
+ unsigned char isPumpValveControledByHand:1; // 手动控制阀泵标志,1手动,0自动
+ unsigned char mainInkPumpError:1; //主墨泵故障
+ unsigned char selfCheckDone:1; // 自检完成标志, 1完成,0没有完成
+ unsigned char reclainTankReachEnd:1; //回收槽打开完成标志
+ unsigned char beeperOnFlag:1; // 报警标志 有故障
+ unsigned char lostCommuFlag:1; //失去通信
+ unsigned char isPrinting:1; // 正在打印标志
+ unsigned char reclaimTankBlockedAppending:1; //回收槽被卡住
+
+ unsigned int selfCheckCnt; // 自检时间计数器,60s倒计时
+ unsigned int currReclaimTankPos; // 回收槽开位置
+ //unsigned char InkLineStaus; // 0 关,1-开ing,2--关ing,3-开完成
+ unsigned int productCnt; // 产品计数器
+ // 还可以添加一些其它状态
+
+ unsigned char crc; // 校验字节
+ unsigned char eoc; // 结束符,固定为小写字母'o'
+}statusToPC;
+// 不足4的倍数时,自动补足到4的倍数。 如statusToPC原本为 22字节,但实际的sizeof(statusToPC) = 24
+
+// 传送当前打印内容点阵到PC的数据结构
+struct _DataToPC {
+ unsigned char keyword; // 特征字符 #
+ unsigned char fun; // 功能码,固定为"D", 表示传送打印点阵信息
+ unsigned char devAddr; // 默认01, (01~08)
+ unsigned char printRowDotNum; // 信息点阵垂直有效行数5~40点
+ unsigned int printColDotNum; // 信息点阵水平有效列数8~3100列,均为8的整数倍值。
+ unsigned int Length; // (printRowDotNum* (1+printColDotNum/8)) + 1字节(检验码)+1字节(结束字符)
+ unsigned char *dotData; // 按行列顺序排列的点阵数据,实际点阵数据总字节数为:printRowDotNum* printColDotNum/8
+ unsigned char crc; // 校验字节
+ unsigned char eoc; // 结束符,固定为小写字母'o'
+}dataToPC;
+
+typedef struct adjlen_strut {
+
+ unsigned char uint8varLenHeadEn:8; // 头部使能
+ unsigned int changeHeadlen:24; // 头部可变长的长度。实际长度
+ unsigned int headCounter:16; // 变量1起始值+这个数,执行可变长
+ unsigned int endCounter:16; // 变量1结束值-这个数,执行可变长
+ unsigned char uint8varLenEndEn:8; // 尾部使能
+ unsigned int changeEndlen:24; // 尾部可变长的长度。实际长度
+}Adjlen_strut;
+
+DevOp::DevOp(SysPara * sysPara)
+{
+ this->sysPara = sysPara;
+#ifndef Q_OS_WIN32
+ DAdataout = open("/dev/fpga_driver", O_RDWR);
+ if(DAdataout < 0){
+ qDebug()<<"fpga_driver false.";
+ fpgaDevOpenFlag = false;
+ }
+ else {
+ qDebug()<<"fpga_driver ok.";
+ fpgaDevOpenFlag = true;
+ }
+
+ pwm_sp = open("/dev/pwm1",0);
+ if(pwm_sp <0 ){
+ qDebug()<<"pwm_sp open error,ret:"<20)
+ OscillatorVoltage[i] = 68+i-50;
+ else if(i>11)
+ {
+ OscillatorVoltage[i] = 15+2*(i-10);
+ }
+ else
+ {
+ OscillatorVoltage[i]=11;
+ }
+ }
+ OscillatorVoltage[0]=0;
+ if(!sysPara){
+ QMessageBox::critical(0,"错误","DevOp构造函数的sysParam不能为空"); //设个陷阱,防止误操作
+ }
+}
+
+DevOp::~DevOp(){
+ if(DAdataout >= 0) close(DAdataout);
+
+ if(pwm_sp >= 0)
+ close(pwm_sp);
+ if(pwm_fd >= 0)
+ close(pwm_fd);
+
+ if(Interrupt_fd >= 0)
+ close(Interrupt_fd);
+ if(iocontrl >= 0)
+ close(iocontrl);
+
+ if(adc_fd >= 0)
+ close(adc_fd);
+ for(int i = 0; i < MAX_VARI_NUM; i++){
+ vars_t *p_var = &sysPara->status.vars[i];
+ if(p_var->original){
+ if(p_var->dat)
+ free(p_var->dat);
+ }
+ }
+}
+
+
+void DevOp::stm32Rd(int addr,unsigned char*dat,int len){
+ if(pInkJectPrinter == NULL)
+ return;
+ if(!stopSendDataSTM32)
+ emit sendSerialDataToSTM32(1,addr,dat,len,2);
+ else
+ emit sendSerialDataToSTM32(0,0,dat,0,2);
+
+}
+
+void DevOp::stm32Wr(int addr,unsigned char*dat,int len){
+ if(pInkJectPrinter == NULL)
+ return;
+ if(!stopSendDataSTM32)
+ emit sendSerialDataToSTM32(2,addr,dat,len,2);
+}
+
+void DevOp::fpgaRd(int addr,unsigned char*dat,int len){
+ if(pInkJectPrinter == NULL)
+ return;
+ emit sendSerialDataToFPGA(1,addr,dat,len,1);
+
+}
+
+
+unsigned char dataOfPowerOnTimer[2]={};
+void DevOp::sendSTM32SetPowerOnTimer(quint16 time)
+{
+ dataOfPowerOnTimer[0] = time;
+ dataOfPowerOnTimer[1] = time>>8;
+ stm32Wr(0xA2,dataOfPowerOnTimer,2);
+}
+
+
+typedef struct{
+ int addr;
+ unsigned char* data;
+ int len;
+}writeData;
+
+QMap map;
+
+typedef struct{
+ int addr;
+ unsigned char data[2];
+ int len;
+}writeDataValue;
+
+QMap mapValue;
+
+void DevOp::fpgaWrD2(int addr,unsigned char*dat,int len){
+ if(pInkJectPrinter == NULL)
+ return;
+
+ writeData writedata;
+ writedata.addr = addr;
+ writedata.data = dat;
+ writedata.len = len;
+
+ map.insert(addr,writedata);
+ emit sendSerialDataToFPGA(0xD2,map.value(addr).addr,map.value(addr).data,map.value(addr).len,1);
+}
+
+void DevOp::fpgaWr(int addr,unsigned char*dat,int len){
+ if(pInkJectPrinter == NULL)
+ return;
+
+ writeData writedata;
+ writedata.addr = addr;
+ writedata.data = dat;
+ writedata.len = len;
+
+ map.insert(addr,writedata);
+ emit sendSerialDataToFPGA(2,map.value(addr).addr,map.value(addr).data,map.value(addr).len,1);
+
+}
+
+
+unsigned char data_a440[1];
+
+void DevOp::fpgaWrD(int addr,unsigned int dat,int len){
+ if(len > 2){
+ QString hexStr = QString::number(addr, 16).toUpper();
+ return;
+ }
+ writeDataValue writedata;
+ writedata.addr = addr;
+ writedata.data[0] = dat;
+ writedata.data[1] = dat>>8;
+ writedata.len = len;
+ mapValue.insert(addr,writedata);
+ fpgaWr(addr,data_a440,1);
+}
+
+void DevOp::fpgaResetWarning(char mode){
+
+ if(mode==1){
+ resumeFault();
+ }
+
+}
+
+unsigned int DevOp::fpgaRdD(int addr,int len){
+ unsigned int data = 0;
+ if(len > 4){
+ DisErrorMsg();
+ return 0;
+ }
+ fpgaRd(addr, (unsigned char *)&data, len);
+ return data;
+}
+
+unsigned char dataofReleaseValve[1];
+void DevOp::controlReleaseValve(bool openFlag){
+ if(pInkJectPrinter == NULL)
+ return;
+ unsigned char dat=0;
+ if(openFlag){
+ dataofReleaseValve[0]=0x11;
+ emit sendSerialDataToSTM32(2,0x17,dataofReleaseValve,1,2);
+ }else{
+ dataofReleaseValve[0]=0x10;
+ emit sendSerialDataToSTM32(2,0x17,dataofReleaseValve,1,2);
+ }
+ releaseValveOpenFlag = openFlag;
+ pumpValveCtrl();
+}
+unsigned char dataofMixValve[1];
+void DevOp::controlMixValve(bool openFlag){
+ if(pInkJectPrinter == NULL)
+ return;
+ if(openFlag){
+ dataofMixValve[0]=0x11;
+ emit sendSerialDataToSTM32(2,0x18,dataofMixValve,1,2);
+ }else{
+ dataofMixValve[0]=0x10;
+ emit sendSerialDataToSTM32(2,0x18,dataofMixValve,1,2);
+ }
+ mixValveFlag = openFlag;
+ pumpValveCtrl();
+}
+unsigned char dataofInkValve[1];
+void DevOp::controlInkValve(bool openFlag){
+ if(pInkJectPrinter == NULL)
+ return;
+ unsigned char dat=0;
+ if(openFlag){
+ dataofInkValve[0]=0x11;
+ emit sendSerialDataToSTM32(2,0x15,dataofInkValve,1,2);
+ }else{
+ dataofInkValve[0]=0x10;
+ emit sendSerialDataToSTM32(2,0x15,dataofInkValve,1,2);
+ }
+ inkValveOpenFlag = openFlag;
+ pumpValveCtrl();
+}
+
+unsigned char dataofInkValvePWM[1];
+void DevOp::controlInkValvePWMSTM32(int PWMPulse){
+ if(pInkJectPrinter == NULL)
+ return;
+ dataofInkValvePWM[0]=0x11+PWMPulse;
+ emit sendSerialDataToSTM32(2,0x15,dataofInkValvePWM,1,2);
+}
+
+unsigned char dataofCycleValve[1];
+void DevOp::controlCycleValve(bool openFlag){
+ if(pInkJectPrinter == NULL)
+ return;
+ if(openFlag){
+ dataofCycleValve[0]=0x11;
+ emit sendSerialDataToSTM32(2,0x16,dataofCycleValve,1,2);
+ }else{
+ dataofCycleValve[0]=0x10;
+ emit sendSerialDataToSTM32(2,0x16,dataofCycleValve,1,2);
+ }
+ cycleValveOpenFlag = openFlag;
+ pumpValveCtrl();
+}
+unsigned char dataofCompressPump[1];
+void DevOp::controlCompressPump(bool openFlag){
+ if(pInkJectPrinter == NULL)
+ return;
+ if(openFlag){
+ dataofCompressPump[0]=0x11;
+ emit sendSerialDataToSTM32(2,0x11,dataofCompressPump,1,2);
+ }else{
+ dataofCompressPump[0]=0x10;
+ emit sendSerialDataToSTM32(2,0x11,dataofCompressPump,1,2);
+ }
+
+ compressPumpOpenFlag = openFlag;
+ pumpValveCtrl();
+}
+
+#define PWM_IOCTL_SET_FREQ 1 // PWM输出
+#define PWM_IOCTL_STOP 0 //设置为低电平输出
+#define PWM_IOCTL_HIGH 2 // 设置为高电平输出
+#define PWM_IOCTL_SET_WIDE 3
+
+//#define FRE_SP 12000
+#define FRE_SP 13760
+unsigned char dataofViscosity[1];
+void DevOp::controlViscosityPump(bool openFlag){
+ if(pInkJectPrinter == NULL)
+ return;
+ viscosityPumpOpenFlag = openFlag;
+ QDateTime currentDateTime = QDateTime::currentDateTime();
+ QString timeString = currentDateTime.toString("yyyy-MM-dd hh:mm:ss.zzz");
+ pumpValveCtrl();
+
+ if(openFlag){
+ dataofViscosity[0] = 0x11;
+
+ emit sendSerialDataToSTM32(2,0x13,dataofViscosity,1,2);
+ }else{
+ dataofViscosity[0] = 0x10;
+
+ emit sendSerialDataToSTM32(2,0x13,dataofViscosity,1,2);
+ }
+}
+unsigned char dataofMainInkPump[1];
+void DevOp::controlMainInkPump(bool openFlag){
+ ioctl(iocontrl, !openFlag, 3);
+ mainInkPumpOpenFlag = openFlag;
+ if(openFlag){
+ dataofMainInkPump[0]=0x11;
+ emit sendSerialDataToSTM32(2,0x14,dataofMainInkPump,1,2);
+ }else{
+ dataofMainInkPump[0]=0x10;
+ emit sendSerialDataToSTM32(2,0x14,dataofMainInkPump,1,2);
+ }
+
+}
+
+void DevOp::controlInkValvePWM(bool openFlag)
+{
+ if(openFlag){
+ // 先设置高电平,然后设置占空比和频率
+ ioctl(pwm_ink, PWM_IOCTL_HIGH, 1);
+ ioctl(pwm_ink, PWM_IOCTL_SET_WIDE, 100); // 设置为100%占空比,即全开,持续2秒
+ ioctl(pwm_ink, PWM_IOCTL_SET_FREQ, FRE_SP);
+
+ // 使用MySleep函数等待2秒,保持高电平状态
+ MySleep(100);
+
+ // 2秒后,调整为原来的占空比和频率
+ ioctl(pwm_ink, PWM_IOCTL_SET_WIDE, 70);
+ ioctl(pwm_ink, PWM_IOCTL_SET_FREQ, FRE_SP);
+
+ // 根据需要决定是否停止PWM信号,如果希望持续输出,则注释掉这一行
+ // ioctl(pwm_ink, PWM_IOCTL_STOP);
+ }
+ else{
+ // 关闭时直接停止PWM信号
+ ioctl(pwm_ink, PWM_IOCTL_STOP);
+ }
+
+ inkValveOpenFlag1 = openFlag;
+ if(!reclaimPumpOpenFlag && inkValveOpenFlag1)
+ controlReclaimPump2();
+ pumpValveCtrl();
+}
+void DevOp::controlInkValvePWM2()
+{
+
+ // 先设置高电平,然后设置占空比和频率
+ ioctl(pwm_ink, PWM_IOCTL_HIGH, 1);
+ ioctl(pwm_ink, PWM_IOCTL_SET_WIDE, 100); // 设置为100%占空比,即全开,持续2秒
+ ioctl(pwm_ink, PWM_IOCTL_SET_FREQ, FRE_SP);
+ // 使用MySleep函数等待100ms,保持高电平状态
+ MySleep(50);
+ // 100ms后,调整为原来的占空比和频率
+ ioctl(pwm_ink, PWM_IOCTL_SET_WIDE, 70);
+ ioctl(pwm_ink, PWM_IOCTL_SET_FREQ, FRE_SP);
+
+ // 关闭时直接停止PWM信号
+ ioctl(pwm_ink, PWM_IOCTL_STOP);
+
+}
+unsigned char dataofReclaimPump[1];
+void DevOp::controlReclaimPump(bool openFlag,bool fullSpeed)
+{
+ if(openFlag){
+// 如果只发送0x11则是50%占空比。其余占空比公式:发送数据=占空比+0x11
+ dataofReclaimPump[0]=fullSpeed?90:(sysPara->para.reclaimPumpPWMWidth?sysPara->para.reclaimPumpPWMWidth:90)+0x11;
+ emit sendSerialDataToSTM32(2,0x12,dataofReclaimPump,1,2);
+ }else{
+ dataofReclaimPump[0]=0x10;
+ emit sendSerialDataToSTM32(2,0x12,dataofReclaimPump,1,2);
+ }
+ reclaimPumpOpenFlag = openFlag;
+ pumpValveCtrl();
+}
+
+void DevOp::controlReclaimPump2()
+{
+ ioctl(pwm_sp, PWM_IOCTL_SET_FREQ, FRE_SP); //sysset.phaseByHandValue 总数100,设置成100好像无效
+ ioctl(pwm_sp, PWM_IOCTL_SET_WIDE, 50);
+ ioctl(pwm_sp, PWM_IOCTL_STOP); //PWM_IOCTL_STOP= 2
+}
+
+
+unsigned char dataofHeater[1];
+void DevOp::controlHeater(bool openFlag){
+ if(!openFlag)
+ dataofHeater[0] = 0x10;
+ else
+ dataofHeater[0] = 0x11;
+ emit sendSerialDataToSTM32(2,0x1A,dataofHeater,1,2);
+ heaterOnFlag = openFlag;
+ pumpValveCtrl();
+
+}
+
+unsigned char dataofBeeper[1];
+void DevOp::controlBeeper(bool openFlag){
+ if(TEST_MODE) openFlag = false;
+ if(!openFlag)
+ dataofBeeper[0] = 0x10;
+ else
+ dataofBeeper[0] = 0x11;
+ emit sendSerialDataToSTM32(2,0x19,dataofBeeper,1,2);
+ beeperOnFlag = openFlag;
+
+}
+
+unsigned char dataofLEDLight[1];
+void DevOp::controlRedLight(bool openFlag){
+ if(openFlag)
+ dataofLEDLight[0] = LED_COLOR_RED_ON;
+ else
+ dataofLEDLight[0] = LED_COLOR_RED_OFF;
+ emit sendSerialDataToSTM32(2,0x1C,dataofLEDLight,1,2);
+ RedLightOnFlag = openFlag;
+}
+
+void DevOp::controlGreenLight(bool openFlag){
+ if(openFlag)
+ dataofLEDLight[0] = LED_COLOR_GREEN_ON;
+ else
+ dataofLEDLight[0] = LED_COLOR_GREEN_OFF;
+ //LogInfo::setRunStatusText(tr("dataofLEDLight: %1").arg(*dataofLEDLight));
+ emit sendSerialDataToSTM32(2,0x1C,dataofLEDLight,1,2);
+ GreenLightOnFlag = openFlag;
+}
+
+
+void DevOp::controlYellowLight(bool openFlag){
+ if(openFlag)
+ dataofLEDLight[0] = LED_COLOR_YELLOW_ON;
+ else
+ dataofLEDLight[0] = LED_COLOR_YELLOW_OFF;
+ emit sendSerialDataToSTM32(2,0x1C,dataofLEDLight,1,2);
+ YellowLightOnFlag = openFlag;
+}
+
+void DevOp::controlFan1(bool openFlag)
+{
+ ioctl(iocontrl, openFlag, 15);
+}
+
+void DevOp::controlFan2(bool openFlag)
+{
+ ioctl(iocontrl, openFlag, 16);
+}
+
+unsigned char dataofPowerOff[1];
+void DevOp::powerOff(void){
+ dataofPowerOff[0]=0x10;
+ stm32Wr(0xFE,dataofPowerOff,1);
+ qDebug()<<"Send PowerOFF Command";
+}
+
+unsigned char dataofReclaimTank[1];
+void DevOp::controlReclaimTankOpen(bool enableFlag){
+ if(enableFlag){
+ dataofReclaimTank[0]=0x12;
+ emit sendSerialDataToSTM32(2,0x01,dataofReclaimTank,1,2);
+ }
+
+ else{
+ dataofReclaimTank[0]=0x10;
+ emit sendSerialDataToSTM32(2,0x01,dataofReclaimTank,1,2);
+ }
+
+ reclaimTankCloseEnableFlag = false;
+ reclaimTankOpenEnableFlag = enableFlag;
+}
+
+
+void DevOp::controlReclaimTankClose(bool enableFlag){
+ if(enableFlag){
+ dataofReclaimTank[0]=0x11;
+ emit sendSerialDataToSTM32(2,0x01,dataofReclaimTank,1,2);
+ }
+
+ else{
+ dataofReclaimTank[0]=0x10;
+ emit sendSerialDataToSTM32(2,0x01,dataofReclaimTank,1,2);
+ }
+ reclaimTankOpenEnableFlag = false;
+ reclaimTankCloseEnableFlag = enableFlag;
+}
+
+
+bool DevOp::isReleaseValveOpen(){
+ return releaseValveOpenFlag;
+}
+bool DevOp::isMixValveOpen(){
+ return mixValveFlag;
+}
+bool DevOp::isInkValveOpen(){
+ return inkValveOpenFlag;
+}
+bool DevOp::isInkValveOpen1(){
+ return inkValveOpenFlag1;
+}
+bool DevOp::isCycleValveOpen(){
+ return cycleValveOpenFlag;
+}
+bool DevOp::isCompressPumpOpen(){
+ return compressPumpOpenFlag;
+}
+bool DevOp::isViscosityPumpOpen(){
+
+ return viscosityPumpOpenFlag;
+}
+bool DevOp::isMainInkPumpOpen(){
+ return mainInkPumpOpenFlag;
+}
+bool DevOp::isReclaimPumpOpen(){
+ return reclaimPumpOpenFlag;
+}
+
+bool DevOp::isHighVoltageOpen(){
+ return highVoltageOpenFlag;
+}
+
+bool DevOp::isReclaimTankOpenEnable(){
+ return reclaimTankOpenEnableFlag;
+}
+bool DevOp::isReclaimTankCloseEnable(){
+ return reclaimTankCloseEnableFlag;
+}
+
+bool DevOp::isBeeperEnable(){
+ return beeperOnFlag;
+}
+bool DevOp::isRedLightEnable(){ //2013-12-11 红绿黄报警灯
+ return RedLightOnFlag;
+}
+
+bool DevOp::isGreenLightEnable(){
+ return GreenLightOnFlag;
+}
+
+bool DevOp::isYellowLightEnable(){
+ return YellowLightOnFlag;
+}
+bool DevOp::isHearterEnable(){
+ return heaterOnFlag;
+}
+
+unsigned char sendStatusToFPGA[1];
+void DevOp::readFgaStatus(){
+ fpgaRd(FPGA_STATUS_BASE_ADDR,(unsigned char *)&sysPara->status,FPGA_STATUS_BYTE_NUM);
+
+ stm32Rd(0xff,((unsigned char *)&sysPara->status)+0x44,23);
+
+ sendStatusToFPGA[0] = 0x00;
+ emit sendSerialDataToFPGA(2,0xA488,sendStatusToFPGA,1,1);
+}
+
+void DevOp::set_totalSynPulseNum(bool wren)
+{
+ short adjLen=0;
+ Adjlen_strut adjlen_strut ={0,0,0,0,0,0};
+ if(sysPara==0)return;
+ if(sysPara->para.varLenEn)
+ {
+ adjLen = sysPara->para.varLen;
+ adjlen_strut.changeHeadlen = (int )(
+ (sysPara->para.synTriggerPrintLenMm+adjLen)
+ *sysPara->para.synPulseNumPerMm);
+ //adjlen_strut.headCounter = sysPara->para.headLen?sysPara->para.headLen:0;
+ adjlen_strut.headCounter = QString::number(sysPara->para.cnt1StartValue + sysPara->para.headLen).toUInt(0,16);//vx版本
+ adjlen_strut.uint8varLenHeadEn = sysPara->para.headLen?1:0;
+ adjLen = sysPara->para.varLen1;
+ adjlen_strut.changeEndlen = (int )(
+ (sysPara->para.synTriggerPrintLenMm+adjLen)
+ *sysPara->para.synPulseNumPerMm);
+ adjlen_strut.endCounter = QString::number(sysPara->para.cnt1EndValue - sysPara->para.endLen).toUInt(0,16);
+ adjlen_strut.uint8varLenEndEn = sysPara->para.endLen?1:0;
+ }
+ if((sysPara->para.printTriggerMode == PRINT_TRIGGER_SYNCHRONIZER))
+ {
+ sysPara->para.totalSynPulseNum = (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))
+ {
+ sysPara->para.totalSynPulseNum = (int )((sysPara->para.elecEyeTriggerInterval)*sysPara->para.synPulseNumPerMm);
+ }
+ fpgaWr(PRINT_CTRL_ADDR_BASE + 0x76, (unsigned char *)&adjlen_strut, sizeof(Adjlen_strut));
+}
+
+unsigned short short2BCD(unsigned short value)
+{
+ unsigned short bcd = 0;
+ bcd = (value/1000)*4096 + ((value%1000)/100)*256 + ((value%100)/10)*16 + value%10;
+ return bcd;
+}
+
+unsigned char dataofa[1];
+unsigned int volGap;
+int DevOp::writeFpgaPrintPara(bool ignoreWarn){
+ unsigned int type = sysPara->status.fpgaVersionNum >> 12;
+
+ qDebug() << "writeFpgaPrintPara: type: " << type;
+ qDebug() << "writeFpgaPrintPara: currPrintMode: " << sysPara->para.currPrintMode;
+ qDebug() << "writeFpgaPrintPara: builTime: " << sysPara->status.build_dat.builTime;
+ qDebug() << "writeFpgaPrintPara: 0211mode: " << sysPara->para.mode0211;
+
+ if((sysPara->para.currPrintMode == FAST_PRINT) && !sysPara->para.charWidthSetEnable
+ || sysPara->status.build_dat.builTime == 73 || type == 6 || type == 8)
+ sysPara->loadVolteParaFromFile((PRINT_MODE)sysPara->para.currPrintMode);
+
+ int currPrintCol = sysPara->status.currPrintCol + BLANK_COL_NUM;
+ sysPara->para.printRowDelay = sysPara->para.currPrintMode;
+ if(sysPara->status.isPrinting == false)
+ sysPara->status.pixNumPerCol = sysPara->status.currPrintRow;
+ else
+ sysPara->status.currPrintRow = sysPara->status.pixNumPerCol;
+ sysPara->para.pixNumPerCol = sysPara->status.pixNumPerCol;
+ sysPara->para.reducedPixelNum = sysPara->para.reducedPixelNumRatio*sysPara->para.pixNumPerCol/100;
+ sysPara->para.printDirection = (sysPara->para.upDownInverse?1:0) + ((sysPara->para.leftRightInverse?1:0)<<1) + ((sysPara->para.scanInverse?1:0)<<2);
+ sysPara->para.dotNumPerCol = (sysPara->para.pixNumPerCol- sysPara->para.lineEndAdjustPointCnt)*(sysPara->para.printRowDelay + 1)
+ + (sysPara->para.lineEndAdjustPointCnt)*(sysPara->para.lineEndAdjustPointDelay + 1);
+ sysPara->para.dotNumPerCol = sysPara->para.pixNumPerCol?
+ ((sysPara->para.dotNumPerCol*(sysPara->para.pixNumPerCol - sysPara->para.reducedPixelNum))/sysPara->para.pixNumPerCol):1;
+ sysPara->para.dotNumPerCol += sysPara->para.printColDelay;
+
+ sysPara->para.dotNumPerCol =( sysPara->para.alterPrint.enable)? sysPara->para.dotNumPerCol/2:sysPara->para.dotNumPerCol;
+
+ sysPara->para.lastLineEndPointFixedDACValue = sysPara->para.lastLineEndPointFixedValue * MAX_FPGA_DAC_VALUE/ 1000;
+ sysPara->para.productNumToGenerateOutputPulse = sysPara->para.pulseOutputEnable?sysPara->para.productCntPerOutputPulse:0;
+ sysPara->para.FullColFixDacVal = sysPara->para.FullColFixVal ; // NC
+ if(sysPara->para.pixNumPerCol - sysPara->para.reducedPixelNum < 2 && sysPara->para.pixNumPerCol > 4){
+ if(!ignoreWarn){
+ QMessageBox::warning(0,tr("警告"),QString("当前行数:%1 冗点数:%2,冗点数过多,请修改您的配置!!").arg(sysPara->para.pixNumPerCol).arg(sysPara->para.reducedPixelNum));
+ }
+ }
+
+ int DACStep = (sysPara->status.currPrintRow && sysPara->status.currAlterPrintRow > 0)?
+ (sysPara->para.endVoltage - sysPara->para.startVoltage)
+ * MAX_FPGA_DAC_VALUE/(100 * ((sysPara->para.alterPrint.enable)?sysPara->status.currAlterPrintRow :sysPara->status.currPrintRow))
+ :0;
+ int steal_dac_step = sysPara->status.currPrintRow > 3?
+ (sysPara->para.endVoltage - sysPara->para.startVoltage)
+ * MAX_FPGA_DAC_VALUE/(100 * ((sysPara->para.alterPrint.enable)?sysPara->status.currAlterPrintRow-1:sysPara->status.currPrintRow-1))
+ :0;
+
+ sysPara->para.steal_dac_row = steal_dac_step;
+
+ int printVerticalButtom = sysPara->para.startVoltage * MAX_FPGA_DAC_VALUE/100;
+ int printVerticalTop = sysPara->para.endVoltage * MAX_FPGA_DAC_VALUE/100;
+ int pointAdjustVoltagePos = sysPara->para.pointVoltageAdjustPos * MAX_FPGA_DAC_VALUE/100; //点距电压调整位置
+
+ /*---------------------------------------------------------------------------------*/
+ // 将 满列/单点/两点/三点/四点表格 电压值 转换成 DAC(12位)值
+
+ //#define DAC_RADIO (((float)sysPara->para.dacScale)/100) // 1V 对应的DAC,看起来13.05比较接近
+ //整体阶梯缩放算法:比如缩放比例为80%,一列4个点最后一个点的比例为80%,阶梯为5%(100-80)/4=5,倒数第二个刚是75%,依此类推。
+ //#define DAC_RADIO2 (nCurrPrintRow > 1 ? (((float)(100-((100-sysPara->para.dacScale)/((nCurrPrintRow-1)>0?(nCurrPrintRow-1):1)*i)))/100) : 13.05)
+
+ // 将 满列/单点/两点/三点/四点表格 电压值 转换成 DAC(12位)值
+ /*---------------------------------------------------------------------------------*/
+
+
+
+ //#define DAC_RADIO (14.36) // 1V 对应的DAC,看起来13.05比较接近
+ //#define DAC_RADIO (13.05) // 1V 对应的DAC,看起来13.05比较接近
+ //#define DAC_RADIO (13.05*sysPara->para.dacScale/100) // 1V 对应的DAC,看起来13.05比较接近
+
+ if(sysPara->para.reducedPixelNumRatio >=20){
+ fast_128k_7dot_continue_default_dac_B[2] = 115;
+ fast_128k_9dot_continue_default_dac_B[2] = 115;
+ fast_128k_9dot_full_default_dac_B[8] = 202;
+ }
+
+ for(int i = 0; i < sysPara->status.currPrintRow; i++)//等差电压
+ {
+ if(!sysPara->para.scanInverse)
+ DACArray[i] = printVerticalButtom + i*DACStep;
+ else
+ DACArray[i] = printVerticalTop - i*DACStep;
+ if(DACArray[i] >= pointAdjustVoltagePos) {
+ DACArray[i] += sysPara->para.PointVoltageAdjustValue;
+ }
+ notGapDACArray[i] = DACArray[i];
+ fullColDACArray[i] = DACArray[i];
+ }
+ if(sysPara->para.FullColFixVal == 1)//勾选了调整电压
+ DACValueWithVoltageAdj();
+ if(sysPara->para.alterPrint.enable) {
+ for(int i = 0; i < sysPara->status.currPrintRow/2+1 && (i+sysPara->status.currPrintRow/2+1<40); i++)
+ {
+ DACArray[i+sysPara->status.currPrintRow/2+1] =(i < sysPara->status.currPrintRow )?DACArray[i]:0;
+ }
+ }
+ if(sysPara->para.flagOfFastMode)
+ {
+ if ((sysPara->para.currPrintMode == FAST_PRINT) && (sysPara->status.currPrintRow <= 7)){
+ sysPara->status.currVoltageVersion = VersionOf67And7SuperSpeed;
+ if(sysPara->status.currVoltageVersion != sysPara->status.lastVoltageVersion){
+ writeDataToFpga_No67HighSpeedMode(VersionOf67And7SuperSpeed,true);
+ sysPara->status.lastVoltageVersion = sysPara->status.currVoltageVersion;
+ }
+
+ }
+ else if((sysPara->para.currPrintMode == STANDARD_PRINT) && (sysPara->status.currPrintRow <= 7)){
+ sysPara->status.currVoltageVersion = VersionOf67And7HighSpeed;
+ if(sysPara->status.currVoltageVersion != sysPara->status.lastVoltageVersion){
+ writeDataToFpga_No67HighSpeedMode(VersionOf67And7HighSpeed,true);
+ sysPara->status.lastVoltageVersion = sysPara->status.currVoltageVersion;
+ }
+ }
+ else if((sysPara->para.currPrintMode == FAST_PRINT) && (sysPara->status.currPrintRow <= 9)){
+ sysPara->status.currVoltageVersion = VersionOf67And9SuperSpeed;
+ if(sysPara->status.currVoltageVersion != sysPara->status.lastVoltageVersion){
+ writeDataToFpga_No67HighSpeedMode(VersionOf67And9SuperSpeed,true);
+ sysPara->status.lastVoltageVersion = sysPara->status.currVoltageVersion;
+ }
+ }
+ else if((sysPara->para.currPrintMode == STANDARD_PRINT) && (sysPara->status.currPrintRow <= 9)){
+ sysPara->status.currVoltageVersion = VersionOf67And9HighSpeed;
+ if(sysPara->status.currVoltageVersion != sysPara->status.lastVoltageVersion){
+ writeDataToFpga_No67HighSpeedMode(VersionOf67And9HighSpeed,true);
+ sysPara->status.lastVoltageVersion = sysPara->status.currVoltageVersion;
+ }
+ }
+ }
+ else if(type == 6 || type == 8){
+ if(sysPara->status.currVoltageVersion != sysPara->status.lastVoltageVersion){
+ writeDacValue2Fpga_No72NewVoltData();
+ sysPara->status.lastVoltageVersion = sysPara->status.currVoltageVersion;
+ }
+ }
+
+ else if(sysPara->status.build_dat.builTime == 73){
+ if(sysPara->status.currVoltageVersion != sysPara->status.lastVoltageVersion){
+ writeDacValue2Fpga_No73();
+ sysPara->status.lastVoltageVersion = sysPara->status.currVoltageVersion;
+ }
+ }
+ else{
+ sysPara->status.currVoltageVersion = VersionOf67;
+ fpgaWr(DAC_TABLE_ADDR,(unsigned char *)DACArray,sizeof(DACArray)); /* DAC vol: 0xB280 */
+ fpgaWr(NOT_GAP_DAC_TABLE_ADDR,(unsigned char *)notGapDACArray,sizeof(notGapDACArray)); /* DAC vol: 0xB380 */
+ fpgaWr(FULL_COL_DAC_TABLE_ADDR,(unsigned char *)fullColDACArray,sizeof(fullColDACArray)); /* DAC vol: 0xB480 */
+ sysPara->status.lastVoltageVersion = sysPara->status.currVoltageVersion;
+ }
+ /*---------------------------------------------------------------------------------*/
+ unsigned char sequenceArray[64];
+ memset(sequenceArray,0,sizeof(sequenceArray));
+ int sequenceNum = 0;
+ int startSequencePos = 0;
+ int currSequencePos = 0;
+ int rowSequenceMode = sysPara->para.rowSequenceMode?sysPara->para.rowSequenceMode:1;
+ for(int i = 0; i < sysPara->status.currPrintRow; i++){
+ sequenceArray[i] = currSequencePos;
+ currSequencePos += rowSequenceMode;
+ if(currSequencePos >= sysPara->status.currPrintRow){
+ startSequencePos ++;
+ currSequencePos = startSequencePos;
+ }
+ sequenceNum ++;
+ if(sequenceNum >= sysPara->status.currPrintRow)
+ break;
+ }
+ if(!sysPara->para.flagOfFastMode && type!=6)
+ fpgaWr(ROW_PRINT_SEQNENCE_ADDR,(unsigned char *)sequenceArray,sizeof(sequenceArray)); /* 0xB200 */
+ /*---------------------------------------------------------------------------------*/
+
+ sysPara->para.phase_detect_high_cnt = (50*sysPara->para.divideRatio*2)/100;
+ sysPara->para.phase_detect_voltage = sysPara->para.phaseDetectVol* MAX_FPGA_DAC_VALUE/1000;
+ if(( sysPara->para.printTriggerMode == PRINT_TRIGGER_SYNCHRONIZER && (sysPara->para.eleEyeClearCntInSynMode ) )
+ || ((sysPara->para.printTriggerMode == PRINT_TRIGGER_ELEC_EYE_VOLTATE_LEVEL
+ || sysPara->para.printTriggerMode == PRINT_TRIGGER_ELEC_EYE_EDGE)
+ && sysPara->para.synClearCntInEleEyeMode))
+ sysPara->para.extClearAllCntEnable = sysPara->para.eleEyeClearCntInSynMode; // 01 10 11
+ else sysPara->para.extClearAllCntEnable = 0; // 0
+ /*-----------------------------------------------------------------------------------------------*/
+ unsigned int timeTpDly=sysPara->para.printDelayMs;
+ if(sysPara->para.printTriggerMode == PRINT_TRIGGER_TIME){
+ if((sysPara->para.timeTriggerPrintMode == TIME_TRIGGER_PRINT_MODE_END_TO_HEAD)){
+ int dotNumPerCol = sysPara->para.dotNumPerCol;
+ long printTmMs = 1.0f*dotNumPerCol*(1 + sysPara->para.charBold)*currPrintCol*(2*sysPara->para.divideRatio)/(FPGA_SYS_HZ/1000);
+ timeTpDly +=printTmMs;
+ }
+ }
+ sysPara->para.timeTriggerPrintDelayMs = timeTpDly; // 20150112
+ sysPara->para.timeTriggerPrintDelayMsH=timeTpDly>>16;
+ /*---------------------------------------线性平均拟合---------------------------------*/
+ int currHighVoltageIndex = sysPara->para.HighVoltageAmplitude/10;
+ if((unsigned int)currHighVoltageIndex >= ARRAY_SIZE(sysPara->para.highVoltageRecord)){
+ if(!ignoreWarn){
+ QMessageBox::warning(NULL,tr("警告"),tr("字高超出范围"));
+ }
+ }
+ else {
+ int expected_voltage_DAC = sysPara->para.highVoltageRecord[currHighVoltageIndex];
+ int highVoltageStep = 0;
+ if((unsigned int)currHighVoltageIndex < (ARRAY_SIZE(sysPara->para.highVoltageRecord) - 1)){
+ highVoltageStep = sysPara->para.highVoltageRecord[currHighVoltageIndex + 1] - sysPara->para.highVoltageRecord[currHighVoltageIndex];
+ }
+ else
+ highVoltageStep = sysPara->para.highVoltageRecord[currHighVoltageIndex] - sysPara->para.highVoltageRecord[currHighVoltageIndex - 1];
+
+ expected_voltage_DAC += highVoltageStep*(sysPara->para.HighVoltageAmplitude%10)/10;
+ if(!expected_voltage_DAC){
+ sysPara->para.maxHighVoltageDAC = 0; //为零时,逻辑将忽略所有高压故障
+ if(!ignoreWarn)
+ QMessageBox::warning(NULL,tr("警告"),tr("字高太小或是高压包数据未初始化,您当前错误将忽略所有高压错误"));
+ }
+ else
+ sysPara->para.maxHighVoltageDAC = expected_voltage_DAC + sysPara->para.highVoltageLevel;
+ }
+
+ if(sysPara->status.isPrinting==false){
+ sysPara->para.printTotalColNum = currPrintCol;
+ sysPara->status.printTotalColNum = currPrintCol;
+ }
+ else
+ sysPara->para.printTotalColNum = sysPara->status.printTotalColNum;
+
+ set_totalSynPulseNum(0);
+
+ if((sysPara->para.printTriggerMode == PRINT_TRIGGER_SYNCHRONIZER)
+ ||((sysPara->para.printTriggerMode == PRINT_TRIGGER_ELEC_EYE_VOLTATE_LEVEL
+ ||sysPara->para.printTriggerMode == PRINT_TRIGGER_ELEC_EYE_EDGE)
+ && sysPara->para.eleEyeTriggerSynPrintEn))
+ {
+ unsigned int displayAreaTotalSynNum;
+ if(sysPara->para.sysTriggerPrintMode == SYN_PRINT_MODE_ACCORDING_CHAR_WIDTH)
+ {
+#define MIN_CHAR_WIDTH 0.1 //0.1mm/列
+#define MAX_CHAR_WIDTH 4.0 //4.0mm/列
+ displayAreaTotalSynNum = (int )(
+ (MIN_CHAR_WIDTH +sysPara->para.printColDelay*(MAX_CHAR_WIDTH - MIN_CHAR_WIDTH) /100)
+ *currPrintCol*sysPara->para.synPulseNumPerMm
+ );
+ if(displayAreaTotalSynNum >= 99*sysPara->para.totalSynPulseNum/100){
+ displayAreaTotalSynNum = 99*sysPara->para.totalSynPulseNum/100;
+ if(!ignoreWarn && currPrintCol && type == 2)
+ QMessageBox::warning(NULL,tr("警告"),tr("喷印间隔太短,无法满足同步打印宽度设置,字宽将自动缩短!"));
+ }
+ }
+ else
+ displayAreaTotalSynNum = (int )(sysPara->para.totalSynPulseNum*sysPara->para.synTriggerPrintLenRatio/100);
+
+ if(!displayAreaTotalSynNum){
+ if(!ignoreWarn && currPrintCol)
+ 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(sysPara->para.synPulseNumPerMm<1 || sysPara->para.synPulseNumPerMm>50) {
+ }
+ sysPara->para.synPulsePerMmX8 = (unsigned short)((unsigned int)sysPara->para.synPulseNumPerMm <<8);
+ qDebug ()<<"s-"<para.synNumPerCol<<"-"<para.synPulsePerMmX8 ;
+ }
+ }
+ sysPara->para.magicNum = FPGA_MAGIC_NUM_AFTER_CONF; //用来做验证的
+ /*-----------------------------------临时处理一下------------------------------------------------*/
+ unsigned char tmpHighVoltageAmplitude = sysPara->para.HighVoltageAmplitude;
+ short phaseShift = sysPara->para.phaseShift;
+ if(phaseShift < 0){
+ sysPara->para.phaseShift += 2*sysPara->para.divideRatio;
+ }
+ if(!sysPara->status.reclainTankReachEnd){
+ sysPara->para.HighVoltageAmplitude = 0;
+ }
+
+ sysPara->para.SynCntEn1 = sysPara->para.SynCntEn;
+ if(sysPara->para.diaphramOffset == 0 || sysPara->para.diaphramOffset > 60) {
+ sysPara->para.diaphramOffset = 10;
+ }
+ fpgaWr(PRINT_CTRL_ADDR_BASE+0x72,(unsigned char *)&sysPara->para.diaphramOffset,2); //发送隔膜位置偏移量
+ fpgaWr(PRINT_CTRL_ADDR_BASE+0x74,(unsigned char *)&sysPara->para.steal_dac_row,2);
+ fpgaWr(PRINT_CTRL_ADDR_BASE,(unsigned char *)&sysPara->para,FPGA_PRINT_PARA_BYTE_NUM); //0x3C
+ fpgaWr(PRINT_CTRL_ADDR_BASE+0x3C,(unsigned char *)&sysPara->para.eleMaskTime,4); //0x3C 3D 3E 3F LockTime Alt-MirrorGap
+
+ fpgaWr(PRINT_CTRL_ADDR_BASE+0x44,(unsigned char *)&sysPara->para.alterPrint,12); // Send AltePrit and cntNatureValue option 2017-7-18
+ fpgaWr(PRINT_CTRL_ADDR_BASE+0x68,(unsigned char *)&sysPara->para.stepPrint,sizeof(sysPara->para.stepPrint)); // Send StepPring 2017-7-18
+
+ sysPara->devOp->pumpValveCtrl(); // send data to A45A~5B Ctrl Para //20140423
+ volGap = (int )(sysPara->para.outputPulseDelayMs *sysPara->para.synPulseNumPerMm);
+ fpgaWr(PRINT_CTRL_ADDR_BASE+0x64,(unsigned char *)&volGap,4);// 0x64~0x68 // 发送卷间隔
+ unsigned short pulseOutputAfterCnt1Printed = sysPara->para.pulse_sinal_value*10*sysPara->para.synPulseNumPerMm;
+ sysPara->devOp->fpgaWr(PRINT_CTRL_ADDR_BASE + 0x88, (unsigned char *)&pulseOutputAfterCnt1Printed, 2);
+ unsigned short pulseOutputAfterCnt1Print = short2BCD(sysPara->para.productNumToGenerateOutputPulse);
+ fpgaWr(PRINT_CTRL_ADDR_BASE+0x90,(unsigned char *)&pulseOutputAfterCnt1Print,2);
+
+ unsigned int v[32];
+ QString str="ADJ:";
+ str+= QString().sprintf("%d,",DACStep);
+ v[0]=0;
+ for(int i=0;i<32;i++)
+ {
+ v[0] =v[0]+(DACStep/(2+i*i));
+ str+= QString().sprintf("%d,",v[0]);
+ }
+
+ sysPara->para.HighVoltageAmplitude = tmpHighVoltageAmplitude;
+ sysPara->para.phaseShift = phaseShift;
+ if(sysPara->para.OuputPulseCol > 200)
+ sysPara->para.OuputPulseCol = 200;
+
+ /*---------------------------------------------------------------------------------------*/
+ setOscillatorVoltage(sysPara->para.oscillatorVoltage); //因为经过调整参数,所以开机也要多发送一次
+ sysPara->saveParaToFile();
+ sysPara->status.configDone = 1;
+ return 0;
+}
+void DevOp::writeDacValue2Fpga_No73()
+{
+ LogInfo::setRunStatusText(tr("No73 send DAC Data."));
+ quint16 matchFullDACArray[48];
+ quint16 matchStealDACArray[48];
+ quint16 matchContinousDACArray[48];
+
+ quint16 rowDelayArray[64];
+ quint16 head1RowDelayArray[64];
+
+ quint8 adjDACParameter[64];
+
+ quint8 matchTotalTableDACArray[15][64];
+ quint8* matchOneDACArray = &matchTotalTableDACArray[0][0];
+ quint8* matchTwoDACArray = &matchTotalTableDACArray[1][0];
+ quint8* matchThreeDACArray = &matchTotalTableDACArray[3][0];
+ quint8* matchFourDACArray = &matchTotalTableDACArray[6][0];
+ quint8* matchFiveDACArray = &matchTotalTableDACArray[10][0];
+
+ quint8 matchPrevious1DotDACArray[48];
+ quint8 matchPrevious2DotDACArray[48];
+ quint8 matchPrevious3DotDACArray[48];
+ quint8 matchPrevious4DotDACArray[48];
+ quint8 matchPrevious5DotDACArray[48];
+ quint8 matchGapDACArray[64][5];
+ quint8 matchP3dotGapDACArray[64][5];
+
+ memset(matchFullDACArray, 0, sizeof(matchFullDACArray));
+ memset(matchStealDACArray, 0, sizeof(matchStealDACArray));
+ memset(matchContinousDACArray, 0, sizeof(matchContinousDACArray));
+ memset(rowDelayArray, 0, sizeof(rowDelayArray));
+ memset(head1RowDelayArray, 0, sizeof(head1RowDelayArray));
+
+ memset(matchTotalTableDACArray, 0, sizeof(matchTotalTableDACArray));
+
+ memset(matchPrevious1DotDACArray, 0, sizeof(matchPrevious1DotDACArray));
+ memset(matchPrevious2DotDACArray, 0, sizeof(matchPrevious2DotDACArray));
+ memset(matchPrevious3DotDACArray, 0, sizeof(matchPrevious3DotDACArray));
+ memset(matchPrevious4DotDACArray, 0, sizeof(matchPrevious4DotDACArray));
+ memset(matchPrevious5DotDACArray, 0, sizeof(matchPrevious5DotDACArray));
+ memset(matchGapDACArray, 0, sizeof(matchGapDACArray));
+ memset(matchP3dotGapDACArray, 0, sizeof(matchP3dotGapDACArray));
+ memset(adjDACParameter, 0, sizeof(adjDACParameter));
+
+ QFile file("./conf/full_dac_raw.txt");
+ file.open(QIODevice::WriteOnly);
+ for (int i = 0; i < 48; i++)
+ {
+ QTextStream out(&file);
+ matchFullDACArray[i] = sysPara->voltePara_No73.pixel_full_table[i] ;
+ out << sysPara->voltePara_No73.pixel_full_table[i]<< "\n";
+ }
+ file.close();
+
+ file.setFileName("./conf/steal_dac_raw.txt");
+ file.open(QIODevice::WriteOnly);
+ for (int i = 0; i < 48; i++)
+ {
+ QTextStream out(&file);
+ matchStealDACArray[i] = sysPara->voltePara_No73.pixel_steal_table[i];
+ out << sysPara->voltePara_No73.pixel_steal_table[i]<< "\n";
+ }
+ file.close();
+
+ file.setFileName("./conf/continous_dac_raw.txt");
+ file.open(QIODevice::WriteOnly);
+ for (int i = 0; i < 48; i++)
+ {
+ QTextStream out(&file);
+ matchContinousDACArray[i] = sysPara->voltePara_No73.pixel_continous_table[i];
+ out << sysPara->voltePara_No73.pixel_continous_table[i]<< "\n";
+ }
+ file.close();
+
+ file.setFileName("./conf/row_delay.txt");
+ file.open(QIODevice::WriteOnly);
+ for (int i = 0; i < 48; i++)
+ {
+ QTextStream out(&file);
+ rowDelayArray[i] = sysPara->voltePara_No73.row_delay_table[i];
+ out << sysPara->voltePara_No73.row_delay_table[i]<< "\n";
+ }
+ file.close();
+
+ file.setFileName("./conf/head1_row_delay.txt");
+ file.open(QIODevice::WriteOnly);
+ for (int i = 0; i < 48; i++)
+ {
+ QTextStream out(&file);
+ head1RowDelayArray[i] = sysPara->voltePara_No73.head1_row_delay_table[i];
+ out << sysPara->voltePara_No73.head1_row_delay_table[i]<< "\n";
+ }
+ file.close();
+ file.setFileName("./conf/1_table_dac_raw.txt");
+ file.open(QIODevice::WriteOnly);
+ for (int i = 0; i < 48; i++)
+ {
+ QTextStream out(&file);
+ *matchOneDACArray = sysPara->voltePara_No73.pixel_1_table[i];// - head1_base_table[i];
+ out << sysPara->voltePara_No73.pixel_1_table[i] <<" "<< *matchOneDACArray << "\n";
+ ++matchOneDACArray;
+ }
+ file.close();
+
+ file.setFileName("./conf/2_table_dac_raw.txt");
+ file.open(QIODevice::WriteOnly);
+ for (int i = 0; i < 48; i++)
+ {
+ QTextStream out(&file);
+ *matchTwoDACArray = sysPara->voltePara_No73.pixel_2_table[i][0];// - head1_base_table[i];
+ ++matchTwoDACArray;
+ *matchTwoDACArray = sysPara->voltePara_No73.pixel_2_table[i][1];// - tail1_base_table[i];
+ ++matchTwoDACArray;
+ out << sysPara->voltePara_No73.pixel_2_table[i][0];
+ out << ",";
+ out << sysPara->voltePara_No73.pixel_2_table[i][1];
+ out << "\n";
+ }
+ file.close();
+
+ file.setFileName("./conf/3_table_dac_raw.txt");
+ file.open(QIODevice::WriteOnly);
+ for (int i = 0; i < 48; i++)
+ {
+ QTextStream out(&file);
+ *matchThreeDACArray = sysPara->voltePara_No73.pixel_3_table[i][0];// - head1_base_table[i];
+ ++matchThreeDACArray;
+ *matchThreeDACArray = sysPara->voltePara_No73.pixel_3_table[i][1];// - head2_base_table[i];
+ ++matchThreeDACArray;
+ *matchThreeDACArray = sysPara->voltePara_No73.pixel_3_table[i][2];// - tail1_base_table[i];
+ ++matchThreeDACArray;
+ out << sysPara->voltePara_No73.pixel_3_table[i][0];
+ out << ",";
+ out << sysPara->voltePara_No73.pixel_3_table[i][1];
+ out << ",";
+ out << sysPara->voltePara_No73.pixel_3_table[i][2];
+ out << "\n";
+ }
+ file.close();
+
+ file.setFileName("./conf/4_table_dac_raw.txt");
+ file.open(QIODevice::WriteOnly);
+ for (int i = 0; i < 48; i++)
+ {
+ QTextStream out(&file);
+ *matchFourDACArray = sysPara->voltePara_No73.pixel_4_table[i][0];// - head1_base_table[i];
+ ++matchFourDACArray;
+ *matchFourDACArray = sysPara->voltePara_No73.pixel_4_table[i][1];// - head2_base_table[i];
+ ++matchFourDACArray;
+ *matchFourDACArray = sysPara->voltePara_No73.pixel_4_table[i][2];// - head3_base_table[i];
+ ++matchFourDACArray;
+ *matchFourDACArray = sysPara->voltePara_No73.pixel_4_table[i][3];// - tail1_base_table[i];
+ ++matchFourDACArray;
+ out << sysPara->voltePara_No73.pixel_4_table[i][0];
+ out << ",";
+ out << sysPara->voltePara_No73.pixel_4_table[i][1];
+ out << ",";
+ out << sysPara->voltePara_No73.pixel_4_table[i][2];
+ out << ",";
+ out << sysPara->voltePara_No73.pixel_4_table[i][3];
+ out << "\n";
+ }
+ file.close();
+
+ file.setFileName("./conf/5_table_dac_raw.txt");
+ file.open(QIODevice::WriteOnly);
+ for (int i = 0; i < 48; i++)
+ {
+ QTextStream out(&file);
+ *matchFiveDACArray = sysPara->voltePara_No73.pixel_5_table[i][0];// - head1_base_table[i];
+ ++matchFiveDACArray;
+ *matchFiveDACArray = sysPara->voltePara_No73.pixel_5_table[i][1];// - head2_base_table[i];
+ ++matchFiveDACArray;
+ *matchFiveDACArray = sysPara->voltePara_No73.pixel_5_table[i][2];// - head3_base_table[i];
+ ++matchFiveDACArray;
+ *matchFiveDACArray = sysPara->voltePara_No73.pixel_5_table[i][3];// - tail2_base_table[i];
+ ++matchFiveDACArray;
+ *matchFiveDACArray = sysPara->voltePara_No73.pixel_5_table[i][4];// - tail1_base_table[i];
+ ++matchFiveDACArray;
+ out << sysPara->voltePara_No73.pixel_5_table[i][0];
+ out << ",";
+ out << sysPara->voltePara_No73.pixel_5_table[i][1];
+ out << ",";
+ out << sysPara->voltePara_No73.pixel_5_table[i][2];
+ out << ",";
+ out << sysPara->voltePara_No73.pixel_5_table[i][3];
+ out << ",";
+ out << sysPara->voltePara_No73.pixel_5_table[i][4];
+ out << "\n";
+ }
+ file.close();
+
+ file.setFileName("./conf/gap_dac_raw.txt");
+ file.open(QIODevice::WriteOnly);
+ for (int i = 0; i < 48; i++)
+ {
+ for (int j = 0; j < 5; j++)
+ {
+ matchGapDACArray[i][j] = sysPara->voltePara_No73.pixel_gap_table[i][j];
+ }
+ QTextStream out(&file);
+ out << sysPara->voltePara_No73.pixel_gap_table[i][0];
+ out << ",";
+ out << sysPara->voltePara_No73.pixel_gap_table[i][1];
+ out << ",";
+ out << sysPara->voltePara_No73.pixel_gap_table[i][2];
+ out << ",";
+ out << sysPara->voltePara_No73.pixel_gap_table[i][3];
+ out << ",";
+ out << sysPara->voltePara_No73.pixel_gap_table[i][4];
+ out << "\n";
+ }
+ file.close();
+
+ file.setFileName("./conf/p3dot_gap_dac_raw.txt");
+ file.open(QIODevice::WriteOnly);
+ for (int i = 0; i < 48; i++)
+ {
+ for (int j = 0; j < 5; j++)
+ {
+ matchP3dotGapDACArray[i][j] = sysPara->voltePara_No73.pixel_gap_post_3dot_table[i][j];
+ }
+ QTextStream out(&file);
+ out << sysPara->voltePara_No73.pixel_gap_post_3dot_table[i][0];
+ out << ",";
+ out << sysPara->voltePara_No73.pixel_gap_post_3dot_table[i][1];
+ out << ",";
+ out << sysPara->voltePara_No73.pixel_gap_post_3dot_table[i][2];
+ out << ",";
+ out << sysPara->voltePara_No73.pixel_gap_post_3dot_table[i][3];
+ out << ",";
+ out << sysPara->voltePara_No73.pixel_gap_post_3dot_table[i][4];
+ out << "\n";
+ }
+ file.close();
+
+ file.setFileName("./conf/general_dac_parameter.txt");
+ file.open(QIODevice::WriteOnly);
+ for (int i = 0; i < sizeof(sysPara->voltePara_No73.pixel_general_dac_parameter)/sizeof(sysPara->voltePara_No73.pixel_general_dac_parameter[0]); i++)
+ {
+ adjDACParameter[i] = sysPara->voltePara_No73.pixel_general_dac_parameter[i];
+ QTextStream out(&file);
+ out << adjDACParameter[i];
+ out << "\n";
+ }
+ file.close();
+
+ fpgaWr(0xB300, (unsigned char *)(matchFullDACArray), sizeof (matchFullDACArray));
+ fpgaWr(0xB380, (unsigned char *)(matchContinousDACArray), sizeof (matchContinousDACArray));
+
+ fpgaWr(0xB400, (unsigned char *)(&rowDelayArray[0]), sizeof (rowDelayArray));
+ fpgaWr(0xB480, (unsigned char *)(&head1RowDelayArray[0]), sizeof (head1RowDelayArray));
+
+ fpgaWr(0xB500, (unsigned char *)(matchTotalTableDACArray[0]), sizeof (matchTotalTableDACArray));
+ fpgaWr(0xBC00, (unsigned char *)(matchP3dotGapDACArray[0]), sizeof (matchP3dotGapDACArray));
+ fpgaWr(0xBE00, (unsigned char *)(matchGapDACArray[0]), sizeof (matchGapDACArray));
+ fpgaWr(0xC000, (unsigned char *)sysPara->voltePara_No73.pixel_big_table, sizeof(sysPara->voltePara_No73.pixel_big_table));// 写入8个 big data
+ fpgaWr(0xC100, (unsigned char *)adjDACParameter, sizeof(adjDACParameter));// 写入8个
+
+}
+// 齿轮泵设置
+unsigned char dataofGearPump[2];
+void DevOp::WriteMoterPump()
+{
+ dataofGearPump[0] = sysPara->para.gearPumpValue;
+ dataofGearPump[1] = sysPara->para.gearPumpValue>>8;
+ stm32Wr(0x1d,dataofGearPump,2);
+}
+void DevOp::ReadSomeDataForLostPrint(void)
+{
+ fpgaRd(FPGA_STATUS_BASE_ADDR+0x46,(unsigned char *)&sysPara->status.r_print_q, 14);
+}
+
+void DevOp::ReadCnt1GroupStatus(void)
+{
+#ifdef COUNTER1_BY_GROUP /* 分段计米 */
+ fpgaRd(READ_CNT1GROUP_CURR_LOOP,(unsigned char *)&sysPara->status.cnt1GroupCurrentLoop,sizeof(sysPara->status.cnt1GroupCurrentLoop));
+ fpgaRd(READ_CNT1GROUP_CURR_INDEX,(unsigned char *)&sysPara->status.cnt1GroupRunningIndex,sizeof(sysPara->status.cnt1GroupRunningIndex));
+#endif
+}
+
+void DevOp::ReadCnt2GroupStatus()
+{
+#ifdef COUNTER2_BY_GROUP /* 分段计米2 */
+ fpgaRd(READ_CNT2GROUP_CURR_LOOP,(unsigned char *)&sysPara->status.cnt2GroupCurrentLoop,sizeof(sysPara->status.cnt2GroupCurrentLoop));
+ fpgaRd(READ_CNT2GROUP_CURR_INDEX,(unsigned char *)&sysPara->status.cnt2GroupRunningIndex,sizeof(sysPara->status.cnt2GroupRunningIndex));
+#endif
+}
+
+unsigned char dataofcnt1GroupCntTmp[1];
+unsigned char dataofcnt1GroupNum[100][1] = {};
+unsigned char dataofcnt1GroupSettingSend[100][12] = {};
+void DevOp::writeCnt1GroupSetting(bool bCntByGroupEnable){
+#ifdef COUNTER1_BY_GROUP /* 分段计米 */
+ struct {
+ unsigned char cnt1GroupNum;
+ int StartValue;
+ int EndValue;
+ int LoopTimes;
+ }cnt1GroupSettingSend;
+ if(sysPara->para.cnt1ByGroupEnalbe)
+ {
+ 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;ipara.Cnt1ByGroup.cnt1GroupCnt;i++)
+ {
+ cnt1GroupSettingSend.cnt1GroupNum = (unsigned char)i;
+ //memcpy((unsigned char *)&cnt1GroupSettingSend.cnt1GroupSettings, &sysPara->para.Cnt1ByGroup.cnt1GroupSettings[i], sizeof(sysPara->para.Cnt1ByGroup.cnt1GroupSettings[i]));
+
+ cnt1GroupSettingSend.StartValue = QString::number(sysPara->para.Cnt1ByGroup.cnt1GroupSettings[i].StartValue).toUInt(0,16);//bcd
+ cnt1GroupSettingSend.EndValue = QString::number(sysPara->para.Cnt1ByGroup.cnt1GroupSettings[i].EndValue).toUInt(0,16);
+ cnt1GroupSettingSend.LoopTimes = sysPara->para.Cnt1ByGroup.cnt1GroupSettings[i].LoopTimes;
+ dataofcnt1GroupNum[i][0]=cnt1GroupSettingSend.cnt1GroupNum;
+ fpgaWr(WRITE_CNT1GROUP_NUM,dataofcnt1GroupNum[i],1);
+ memcpy(dataofcnt1GroupSettingSend[i],(unsigned char *)
+ &cnt1GroupSettingSend.StartValue,12);
+
+ QByteArray bytes((const uchar*)(dataofcnt1GroupSettingSend[i]), 12);
+ qDebug() << bytes.toHex(' ');
+
+ fpgaWr(WRITE_CNT1GROUP_SETTING,dataofcnt1GroupSettingSend[i],12);
+ }
+ }
+ else
+ {
+ dataofcnt1GroupCntTmp[0]=0;
+ fpgaWr(WRITE_CNT1GROUP_COUNT,(unsigned char *)&dataofcnt1GroupCntTmp,sizeof(dataofcnt1GroupCntTmp));
+ }
+#endif
+}
+
+void DevOp::writeCnt2GroupSetting(bool bCntByGroupEnable)
+{
+#ifdef COUNTER2_BY_GROUP /* 分段计米2 */
+ struct {
+ unsigned char cnt2GroupNum;
+ int StartValue;
+ int EndValue;
+ int LoopTimes;
+ }cnt2GroupSettingSend;
+
+ static unsigned char dataofcnt2GroupNumTmp[1];
+ static unsigned char dataofcnt2GroupNum[100][1] = {};
+ static unsigned char dataofcnt2GroupSettingSend[100][12] = {};
+
+ if(sysPara->para.cnt2ByGroupEnalbe)
+ {
+ 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;ipara.Cnt2ByGroup.cnt2GroupCnt;i++)
+ {
+ cnt2GroupSettingSend.cnt2GroupNum = (unsigned char)i;
+
+ cnt2GroupSettingSend.StartValue = QString::number(sysPara->para.Cnt2ByGroup.cnt2GroupSettings[i].StartValue).toUInt(0,16);//bcd
+ cnt2GroupSettingSend.EndValue = QString::number(sysPara->para.Cnt2ByGroup.cnt2GroupSettings[i].EndValue).toUInt(0,16);
+ cnt2GroupSettingSend.LoopTimes = sysPara->para.Cnt2ByGroup.cnt2GroupSettings[i].LoopTimes;
+ dataofcnt2GroupNum[i][0]=cnt2GroupSettingSend.cnt2GroupNum;
+ fpgaWr(WRITE_CNT2GROUP_NUM,dataofcnt2GroupNum[i],1);
+ memcpy(dataofcnt2GroupSettingSend[i],(unsigned char *)
+ &cnt2GroupSettingSend.StartValue,12);
+
+ fpgaWr(WRITE_CNT2GROUP_SETTING,dataofcnt2GroupSettingSend[i],12);
+ QByteArray bytes((const uchar*)(dataofcnt2GroupSettingSend[i]), 12);
+ qDebug() << bytes.toHex(' ');
+ }
+ }
+ else
+ {
+ dataofcnt2GroupNumTmp[0]=0;
+ fpgaWr(WRITE_CNT2GROUP_COUNT,(unsigned char *)dataofcnt2GroupNumTmp,sizeof(dataofcnt2GroupNumTmp));
+ }
+#endif
+}
+
+void DevOp::readCalandarDat(void){
+ fpgaRd(READ_CALENDAR_DAT_ADDR,(unsigned char *)&sysPara->status.calandar_and_dat,16);
+
+ fpgaRd((READ_CALENDAR_DAT_ADDR + 0x34) ,(unsigned char *)&sysPara->status.Status_Counter3.cnt3CurrValue,4);
+ fpgaRd((READ_CALENDAR_DAT_ADDR + 0x38) ,(unsigned char *)&sysPara->status.XXXDay,2);
+}
+
+
+void DevOp::writeFpgaCalandar(bool Enable){
+ Q_UNUSED(Enable);
+ time_t rawtime;
+ struct tm *pTm;
+ char buffer[20];
+ time( &rawtime );
+ pTm = localtime( &rawtime );
+ strftime(buffer, sizeof buffer, "%U", pTm);//%U 从星期天算,%W 从星期一算
+
+ QTime t = QTime::currentTime();
+ QDate d = QDate::currentDate();
+ int year = d.year();
+ sysPara->para.calandar_and_dat.leap_year = (year%400 == 0) || ((year%4 == 0) && (year%100 != 0));
+ //sysPara->para.calandar_and_dat.week = d.weekNumber();//
+ sysPara->para.calandar_and_dat.dayofweek = d.dayOfWeek();
+ // sysPara->para.calandar_and_dat.week = QString(buffer).toInt();
+ sysPara->para.calandar_and_dat.week = d.weekNumber();
+ sysPara->para.calandar_and_dat.year = d.year();
+ sysPara->para.calandar_and_dat.month = d.month();
+ sysPara->para.calandar_and_dat.day = d.day();
+ sysPara->para.calandar_and_dat.hour = t.hour();
+ sysPara->para.calandar_and_dat.minute = t.minute();
+ sysPara->para.calandar_and_dat.second = t.second();
+
+ //将变量初始值写入寄存器
+ sysPara->para.calandar_and_dat.cnt1InitValue = QString::number(sysPara->para.cnt1StartValue).toUInt(0,16); //bcd
+ sysPara->para.calandar_and_dat.cnt1End = QString::number(sysPara->para.cnt1EndValue).toUInt(0,16);
+ sysPara->para.calandar_and_dat.cnt1Repeat = sysPara->para.cnt1RepeateValue;
+ sysPara->para.calandar_and_dat.cnt1CurrValue = QString::number(sysPara->para.cnt1CurrValue).toUInt(0,16);
+
+ int step = sysPara->para.cnt1StepValue;
+ if (step == 0)
+ step = 1;
+ step = step < 0?(100000000 + step):step; //务必对负数的值小心处理
+ sysPara->para.calandar_and_dat.cnt1Step = QString::number(step).toUInt(0,16);
+
+ sysPara->para.calandar_and_dat.cnt2InitValue = QString::number(sysPara->para.cnt2StartValue).toUInt(0,16);
+ sysPara->para.calandar_and_dat.cnt2End = QString::number(sysPara->para.cnt2EndValue).toUInt(0,16);
+ sysPara->para.calandar_and_dat.cnt2Repeat = sysPara->para.cnt2RepeateValue;
+ sysPara->para.calandar_and_dat.cnt2CurrValue = QString::number(sysPara->para.cnt2CurrValue).toUInt(0,16);
+
+ step = sysPara->para.cnt2StepValue;
+ if (step == 0)
+ step = 1;
+ step = step < 0?(100000000 + step):step;
+ sysPara->para.calandar_and_dat.cnt2Step = QString::number(step).toUInt(0,16);
+
+ sysPara->para.calandar_and_dat.cntCurrValueInitEnable =
+ (sysPara->status.cnt3CurrentValueInitDoneFlag?0:4)+
+ (sysPara->status.cnt2CurrentValueInitDoneFlag?0:2)
+ + (sysPara->status.cnt1CurrentValueInitDoneFlag?0:1);
+
+ fpgaWr(WRITE_CALENDAR_DAT_ADDR,(unsigned char *)&sysPara->para.calandar_and_dat,sizeof(sysPara->para.calandar_and_dat));
+
+ /*write counter3*/
+ sysPara->para.Counter3.cnt3CurrValue = QString::number(sysPara->para.cnt3CurrValue).toUInt(0,16);
+ sysPara->para.Counter3.cnt3End = QString::number(sysPara->para.cnt3EndValue).toUInt(0,16);
+ sysPara->para.Counter3.cnt3InitValue = QString::number(sysPara->para.cnt3StartValue).toUInt(0,16);
+ sysPara->para.Counter3.cnt3Repeat = sysPara->para.cnt3RepeateValue;
+ step = sysPara->para.cnt3StepValue;
+ if (step == 0)
+ step = 1;
+ step = step < 0?(100000000 + step):step;
+ sysPara->para.Counter3.cnt3Step = QString::number(step).toUInt(0,16);
+ fpgaWr(WRITE_COUNTER3_ADDR,(unsigned char *)&sysPara->para.Counter3,sizeof(sysPara->para.Counter3));
+ sysPara->para.Counter4.cnt4CurrValue= QString::number(sysPara->para.cnt4CurrValue).toUInt(0,16); //计数器4当前值用于隐藏功能
+
+ #ifndef COUNTER2_BY_GROUP
+ fpgaWr(WRITE_COUNTER4_ADDR,(unsigned char *)&sysPara->para.Counter4,sizeof(sysPara->para.Counter4));
+ #endif
+
+ sysPara->status.cnt3CurrentValueInitDoneFlag = true;
+ sysPara->status.cnt2CurrentValueInitDoneFlag = true;
+ sysPara->status.cnt1CurrentValueInitDoneFlag = true;
+
+#ifdef COUNTER2_BY_GROUP /* 分段计米2 */
+ if(sysPara->para.cnt1ByGroupEnalbe && sysPara->para.cnt2ByGroupEnalbe){
+ sysPara->devOp->writeCnt1GroupSetting(1);
+ sysPara->devOp->writeCnt2GroupSetting(1);
+ }
+#endif
+}
+unsigned char dataOfvariNum[1];
+unsigned char dataOfreg_var_print_ctrl[8][8];
+void DevOp::writeFpgaVariCtrl(void){
+ writeFpgaCalandar(0);
+ dataOfvariNum[0]=sysPara->status.variNum;
+ fpgaWr(VAR_CNT_ADDR,dataOfvariNum,1); /* 0xa450 变量个数 */
+ reg_var_print_ctrl_t reg_var_print_ctrl;
+ for(int i = 0; i < sysPara->status.variNum; i++){
+ vars_t *p_var = &sysPara->status.vars[i];
+ if(p_var->original && p_var->dat){
+ fpgaWr(PRINT_DIGITAL_CHAR_BASE_ADDR + p_var->bassAddr,p_var->dat,p_var->datWidth *p_var->rowByteNum);
+ }
+ memset((char *)®_var_print_ctrl,0,sizeof(reg_var_print_ctrl));
+ reg_var_print_ctrl.charColNum = p_var->digitalNum?p_var->width/p_var->digitalNum:0;
+ reg_var_print_ctrl.charRamBaseAddr = p_var->bassAddr;
+ reg_var_print_ctrl.charRowNum = p_var->endRowPos - p_var->startRowPos;
+ reg_var_print_ctrl.horizonWidth = p_var->width;//字模的宽度
+ reg_var_print_ctrl.colOffset = p_var->startColPos+BLANK_COL_NUM;
+ reg_var_print_ctrl.verticalOffset = p_var->startRowPos;
+ reg_var_print_ctrl.varDigitalNum = p_var->digitalNum;
+ reg_var_print_ctrl.varTypeSel = Public::getType(p_var->type) %20;
+ memcpy(dataOfreg_var_print_ctrl[i],(unsigned char *)®_var_print_ctrl,8);
+
+ fpgaWr(VAR_CTRL_REG_ADDR,dataOfreg_var_print_ctrl[i],8);
+ }
+}
+unsigned char dataOfCmd[1];
+void DevOp::printCtrl(int cmd){
+ dataOfCmd[0]=cmd;
+ fpgaWr(PRINT_START_STOP_CTRL,dataOfCmd,1);
+}
+
+void DevOp::printCtrl2(int cmd){
+ if(sysPara->para.SynCntEn) sysPara->para.SynCntEn1 = sysPara->para.SynCntEn;
+ else {
+ sysPara->para.SynCntEn1 = sysPara->status.isPrinting;
+ }
+ fpgaWr(PRINT_CTRL_ADDR_BASE+0x44,(unsigned char *)&sysPara->para.alterPrint,12); // Send AltePrit and cntNatureValue option 2017-7-18
+ fpgaWr(PRINT_CTRL_ADDR_BASE+0x68,(unsigned char *)&sysPara->para.stepPrint,sizeof(sysPara->para.stepPrint)); // Send StepPring 2017-7-18
+ cmd=1;
+}
+
+unsigned int DevOp::readFpgaVersionNum(){
+ fpgaRd(0x00EC,&sysPara->status.FPGAChipType,1);
+ fpgaRd(0x00FE,(unsigned char *)&sysPara->status.fpgaVersionNum,2);
+ return 0;
+}
+
+void DevOp::readbuilDat(void){
+ fpgaRd(READ_BUILD_DAT,(unsigned char *)&sysPara->status.build_dat,sizeof(sysPara->status.build_dat));
+ fpgaRd(FPGA_STATUS_BASE_ADDR + 0xed,(unsigned char *)&sysPara->status.build_dat.year,sizeof(sysPara->status.build_dat.year));
+ fpgaRd(FPGA_STATUS_BASE_ADDR + 0xee,(unsigned char *)&sysPara->status.build_dat.month,sizeof(sysPara->status.build_dat.month));
+ fpgaRd(FPGA_STATUS_BASE_ADDR + 0xef,(unsigned char *)&sysPara->status.build_dat.day,sizeof(sysPara->status.build_dat.day));
+}
+
+void DevOp::readSTM32Version(void){
+ unsigned char stm32Verion[3];
+ stm32Rd(0xFA,(unsigned char *)&stm32Verion,3);
+}
+
+void DevOp::readSTM32Time(void){
+ static unsigned char stm32Time[8] = {};
+ stm32Rd(0xA1,(unsigned char *)&stm32Time,8);
+}
+
+void DevOp::readPrintDataXor(void){
+ fpgaRd(READ_PRINTDATA_XOR, (unsigned char *)&sysPara->status.xor_sync, 2);
+}
+
+void DevOp::readSyncCounterAtZero(void){
+ fpgaRd(READ_SYNC_COUNTER, (unsigned char *)&sysPara->status.xor_sync.sync_counter_at_zero, sizeof(sysPara->status.xor_sync.sync_counter_at_zero));
+}
+
+unsigned char dataOfMode[1];
+void DevOp::clearProductCnt(unsigned int mode){
+ dataOfMode[0]=mode;
+ fpgaWr(PRINT_RESET_PRODUCT_CNT,dataOfMode,1);
+}
+unsigned char dataOfnum[1];
+void DevOp::resumeFault(){
+ dataOfnum[0]=1;
+ fpgaWr(RESUME_FAULT_ADDR,dataOfnum,1);
+}
+
+unsigned char dataOfhighVoltage[1];
+void DevOp::highVoltageCtrl(int val){
+ dataOfhighVoltage[0]=val;
+ stm32Wr(0x20,dataOfhighVoltage,1);
+ if(val == 0){
+ highVoltageOpenFlag = false;
+ }else{
+ highVoltageOpenFlag = true;
+ }
+
+}
+unsigned char dataOfmaxHighVoltageDAC[2];
+void DevOp::maxHighVoltageDACCtrl(int val){
+ dataOfmaxHighVoltageDAC[0]=val;
+ dataOfmaxHighVoltageDAC[1]=val>>8;
+ sysPara->status.waitHightVolOn =0;
+ fpgaWr(PRINT_CTRL_ADDR_BASE + (unsigned int)(&sysPara->para.maxHighVoltageDAC) - (unsigned int)(&sysPara->para),dataOfmaxHighVoltageDAC,2);
+
+}
+unsigned char dataOfsetPhaseByHand[1];
+void DevOp::setPhaseByHand(int val){
+ dataOfsetPhaseByHand[0]=val;
+ sysPara->para.phaseByHand = val;
+ fpgaWr(PRINT_CTRL_ADDR_BASE + (unsigned int)(&sysPara->para.phaseByHand) - (unsigned int)(&sysPara->para),dataOfsetPhaseByHand,1);
+}
+
+void DevOp::readPhaseDetectHighTm(void){
+ fpgaRd(PHASE_DETECT_HIGH_VOLTAGE_TM,(unsigned char *)&sysPara->status.phaseDetectHighTm,sizeof(sysPara->status.phaseDetectHighTm));
+
+}
+unsigned char dataOfPhaseDetectVoltageDutyCycle[2];
+void DevOp::setPhaseDetectVoltageDutyCycle(int duty){
+ unsigned value = (duty * sysPara->para.divideRatio * 2) / 100;
+ dataOfPhaseDetectVoltageDutyCycle[0]=value;
+ dataOfPhaseDetectVoltageDutyCycle[1]=value>>8;
+ fpgaWr(PRINT_CTRL_ADDR_BASE + (unsigned int)(&sysPara->para.phase_detect_high_cnt) - (unsigned int)(&sysPara->para),dataOfPhaseDetectVoltageDutyCycle,2);
+}
+unsigned char dataOfBlickLightPeriod[2];
+void DevOp::setBlickLightPeriod(int value){
+ dataOfBlickLightPeriod[0]=value;
+ dataOfBlickLightPeriod[1]=value>>8;
+ fpgaWr(PRINT_CTRL_ADDR_BASE + (unsigned int)(&sysPara->para.blinkLightPeriod) - (unsigned int)(&sysPara->para),dataOfBlickLightPeriod,2);
+}
+
+void DevOp::setOscillatorVoltage(int value){
+ if(value<100)
+ fpgaWr(PRINT_CTRL_ADDR_BASE + (unsigned int)(&sysPara->para.oscillatorVoltage) - (unsigned int)(&sysPara->para),(unsigned char*)&OscillatorVoltage[value],1);
+}
+
+void DevOp::setDivideRatio(int value){
+
+ fpgaWr(PRINT_CTRL_ADDR_BASE + (unsigned int)(&sysPara->para.divideRatio) - (unsigned int)(&sysPara->para),(unsigned char*)&sysPara->para.divideRatio,2);
+
+}
+unsigned char dataOfLastLineEndPointFixedValue[2];
+void DevOp::setLastLineEndPointFixedValue(int value){
+ value=value*MAX_FPGA_DAC_VALUE/1000;
+ dataOfLastLineEndPointFixedValue[0]=value;
+ dataOfLastLineEndPointFixedValue[1]=value>>8;
+ fpgaWr(PRINT_CTRL_ADDR_BASE + (unsigned int)(&sysPara->para.lastLineEndPointFixedDACValue) - (unsigned int)(&sysPara->para),dataOfLastLineEndPointFixedValue,2);
+}
+unsigned char dataOfmainInkCtrl[1];
+void DevOp::mainInkCtrl()
+{
+ dataOfmainInkCtrl[0]=(isReleaseValveOpen()?(1<<3):0)+(isMainInkPumpOpen()?(1<<2):0) + (sysPara->status.selfCheckDone?(1<<1):0) + (sysPara->status.isPumpValveControledByHand?1:0);
+ fpgaWr(MAININKCTRL_ADDR,dataOfmainInkCtrl,1);
+}
+
+void DevOp::pumpValveCtrl(int viscosityAdjustByTemp)//20140423 OK
+{
+ char buf[20];
+ int i=0;
+ int viscostyRealValue, tempOffset;
+ static int hadGetIndoorTemperature=0;
+ memset(buf,0,sizeof(buf));
+
+ buf[i++]=(isReleaseValveOpen()?(1<<3):0)
+ +(isMainInkPumpOpen()?(1<<2):0)
+ + (sysPara->status.selfCheckDone?(1<<1):0)
+ + (sysPara->status.isPumpValveControledByHand?1:0);
+ if(!sysPara->para.gearPumpEnable) {
+ buf[i++] = (sysPara->para.pressure/5)&0xff;
+ buf[i++] = ((sysPara->para.pressure/5)>>8)&0xff;
+ }
+ else {
+ buf[i++] = (sysPara->para.pressure)&0xff;
+ buf[i++] = (sysPara->para.pressure>>8)&0xff;
+ }
+ buf[i++]=(sysPara->para.viscosityPumpInterval*100)&0xff;
+ buf[i++]=((sysPara->para.viscosityPumpInterval*100)>>8)&0xff;
+ if(!hadGetIndoorTemperature)
+ {
+ hadGetIndoorTemperature = viscosityAdjustByTemp;
+ }
+ if(!hadGetIndoorTemperature)
+ {
+ buf[i++]=(sysPara->para.viscosity)&0xff;
+ buf[i++]=((sysPara->para.viscosity)>>8)&0xff;
+ }
+ else
+ {
+ tempOffset = sysPara->status.indoorTemperature-35;
+ if(tempOffset>5)//超过40度就按照40度计算
+ {
+ tempOffset = 5;
+ }
+ if(tempOffset>0)
+ {
+ if(sysPara->para.viscosityAdjust==1)//0.6%
+ {
+ viscostyRealValue = sysPara->para.viscosity - sysPara->para.viscosity*(tempOffset*3)/500;
+ }
+ else if(sysPara->para.viscosityAdjust==2)//1.0%
+ {
+ viscostyRealValue = sysPara->para.viscosity - sysPara->para.viscosity*tempOffset/100;
+ }
+ else if(sysPara->para.viscosityAdjust==3)//1.6%
+ {
+ viscostyRealValue = sysPara->para.viscosity - sysPara->para.viscosity*tempOffset*8/500;
+ }
+ else if(sysPara->para.viscosityAdjust==3)//2.0%
+ {
+ viscostyRealValue = sysPara->para.viscosity - sysPara->para.viscosity*tempOffset*2/100;
+ }
+ else
+ {
+ viscostyRealValue = sysPara->para.viscosity;
+ }
+ }
+ else
+ {
+ viscostyRealValue = sysPara->para.viscosity;
+ }
+ buf[i++]=viscostyRealValue&0xff;
+ buf[i++]=(viscostyRealValue>>8)&0xff;
+ }
+ buf[i++]=(sysPara->para.reclaimPumpPWMWidth)&0xff;
+ buf[i++]=((sysPara->para.temperature))&0xff;
+ buf[i++]=(sysPara->devOp->isReclaimPumpOpen()?(1<<0):0)
+ | (sysPara->devOp->isCompressPumpOpen()?(1<<1):0)
+ | (sysPara->devOp->isViscosityPumpOpen()?(1<<2):0)
+ | (sysPara->devOp->isCycleValveOpen()?(1<<3):0)
+ | (sysPara->devOp->isInkValveOpen()?(1<<4):0)
+ | (sysPara->devOp->isMixValveOpen()?(1<<5):0);
+
+ fpgaWr(MAININKCTRL_ADDR,(unsigned char *)buf,i);// //20140423 5A,5B
+}
+
+void DevOp::showData( QByteArray dat)
+{
+ int i,len;
+ QString s="";
+ len = dat.length();
+ for(i=0;istatus.RandomNum>0)
+ {
+ if(sysPara->status.RandomNum>32){
+ return;
+ }
+
+ len = sysPara->status.RandomNum*8;
+
+ if(len>256)return;
+
+ fpgaRd(READ_RAND_FIFO_ADDR ,(unsigned char *)buf,len);
+ ss="";
+ n=0;
+ for(i=0;istatus.RandomDigitNum) //12
+ ; //0,1,2,3 4,5,6,7,8,9 0 1,2,3,4,5
+ else if( k >= 16-sysPara->status.RandomDigitNum)
+ {
+ if(c==0) str.append( ((buf[i]>>4)& 0x0f)|0x30);
+ else if(c==1) str.append((buf[i]& 0x0f)|0x30);
+ if(k==15)
+ {
+ str.append(" ");
+ }
+ }
+ else ;
+ n++;
+ }
+
+ }
+ QFile f1("/home/plg/Xrand2.txt");
+ f1.open(QFile::ReadWrite);
+ f1.seek(f1.size());
+ f1.write(str);
+ len = f1.size();
+ f1.close();
+
+ if(len>3500000)
+ {
+ sysPara->status.RandomBackCnt=10;
+ ss= "mv /home/plg/Xrand2.txt /home/plg/rand" + QDateTime::currentDateTime().toString("yyMMddhhmmss")+".txt";
+ system(ss.toLatin1());
+ return;
+ }
+ }
+
+}
+
+void DevOp::RandTxtBakup(char ok) // ok 0:不一定备份,1直接备份
+{
+ QFile f1("/home/plg/Xrand2.txt");
+ QString str;
+ str= "mv /home/plg/Xrand2.txt /udisk/rand" + QDateTime::currentDateTime().toString("yyMMddhhmmss")+".txt";
+ if(sysPara->status.RandomBackCnt>5){
+ system(str.toLatin1());
+ system("mv /home/plg/rand*.txt /udisk/");
+ sysPara->status.RandomBackCnt=0;
+ }
+ else
+ {
+ //f1.open(QFile::ReadWrite);
+ int len= f1.size();
+ //f1.close();
+ if(len>3500000 || ok )
+ {
+ system(str.toLatin1());
+ system("mv /home/plg/rand*.txt /udisk/");
+ }
+
+ }
+}
+
+void DevOp::writeDacValue2Fpga_No72NewVoltData()
+{
+ LogInfo::setRunStatusText("writeDacValue2Fpga_No72NewVoltData");
+ fpgaWr(0xA600, (unsigned char *)(sysPara->voltePara_25Dots.matchTotalTableDACArray1), (128));
+ fpgaWr(0xA680, (unsigned char *)(sysPara->voltePara_25Dots.matchTotalTableDACArray2[0]), (64 * 2*2));
+ fpgaWr(0xA780, (unsigned char *)(sysPara->voltePara_25Dots.matchTotalTableDACArray3[0]), (64 * 3*2));
+ fpgaWr(0xA900, (unsigned char *)(sysPara->voltePara_25Dots.matchTotalTableDACArray4[0]), (64 * 4*2));
+ fpgaWr(0xAB00, (unsigned char *)(sysPara->voltePara_25Dots.matchTotalTableDACArray5[0]), (64 * 5*2));
+ fpgaWr(0xB380, (unsigned char *)(sysPara->voltePara_25Dots.matchContinousDACArray), (64 * 2));
+ fpgaWr(0xBC00, (unsigned char *)(sysPara->voltePara_25Dots.matchTotalDiffVoltageValue[0]), (64 * 50));
+ fpgaWr(0xB400, (unsigned char *)(sysPara->voltePara_25Dots.matchExtraLineDACArray), (64));
+ fpgaWr(0xB440, (unsigned char *)(sysPara->voltePara_25Dots.matchFirstOnePointExtraLineDACArray), (64));
+ fpgaWr(0xD200, (unsigned char *)(sysPara->voltePara_25Dots.matchAdjustParaDACArray), (8)); //超10个空点巨点补偿
+ fpgaWr(0xCD00, (unsigned char *)(sysPara->voltePara_25Dots.matchGiantPointVoltageValue[0]), (64*16));
+ fpgaWr(0xB280, (unsigned char *)(sysPara->voltePara_25Dots.matchTotalTableDACArrayFirst1), (64*2)); //一列第一个点是单点
+
+ // 将matchTotalTableDACArray1打印到日志
+ // qDebug() << "Write dac value to fpga 72: " << QVector(std::begin(sysPara->voltePara_25Dots.matchTotalTableDACArray1), std::end(sysPara->voltePara_25Dots.matchTotalTableDACArray1));
+}
+
+
+
+unsigned char dataofHighVoltageAmplitude[1];
+void DevOp::setHighVoltageAmplitudetoSTM32(){
+ dataofHighVoltageAmplitude[0]=sysPara->para.HighVoltageAmplitude;
+ emit sendSerialDataToSTM32(2,0x1f,dataofHighVoltageAmplitude,1,2);
+}
+
+void DevOp::resendFPGADate(int cmd, int addr, unsigned char *dat, int len, int type){
+ emit sendSerialDataToFPGA(cmd,addr,dat,len,type);
+}
+
+void DevOp::resendSTM32Date(int cmd, int addr, unsigned char *dat, int len, int type){
+ emit sendSerialDataToSTM32(cmd,addr,dat,len,type);
+}
+
+void DevOp::DACValueWithVoltageAdj(){
+ memset(DACArray,0,sizeof(DACArray));
+ memset(notGapDACArray,0,sizeof(notGapDACArray));
+ memset(fullColDACArray,0,sizeof(fullColDACArray));
+ int nCurrPrintRow = sysPara->status.currPrintRow;
+#define DAC_RADIO (nCurrPrintRow > 1 ? (13.05*(100-((100-sysPara->para.dacScale)/((nCurrPrintRow-1)>0?(nCurrPrintRow-1):1)*i))/100) : 13.05)
+
+ if (sysPara->status.currPrintRow <= 5) {
+ for(int i = 0; i < sysPara->status.currPrintRow; i++)
+ {
+ if (sysPara->para.oscillatoFreq == 0) { // 64K
+ if (sysPara->para.printRowDelay == 0) {
+ float adj_dac_temp = fast_64k_5dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = fast_64k_5dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = fast_64k_5dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ else if (sysPara->para.printRowDelay == 1) {
+ float adj_dac_temp = normal_64k_5dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = normal_64k_5dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = normal_64k_5dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ else if (sysPara->para.printRowDelay == 2) {
+ float adj_dac_temp = slow1_64k_5dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = slow1_64k_5dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = slow1_64k_5dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ }
+ else if (sysPara->para.oscillatoFreq == 2) { // 96
+ if (sysPara->para.printRowDelay == 0) {
+ float adj_dac_temp = fast_96k_5dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = fast_96k_5dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = fast_96k_5dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ if(sysPara->para.recommendedPrintSpeed == 1){
+ adj_dac_temp = fast_96k_5dot_adj_default_dac_H[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ continue_dac_temp = fast_96k_5dot_continue_default_dac_H[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ full_dac_temp = fast_96k_5dot_full_default_dac_H[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ if(!sysPara->para.Vol1of8En && sysPara->para.FullColFixVal){
+ full_dac_temp = fast_96k_5dot_full_default_dac_F[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ }
+ else if (sysPara->para.printRowDelay == 1) {
+ float adj_dac_temp = normal_96k_5dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = normal_96k_5dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = normal_96k_5dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ if(sysPara->para.recommendedPrintSpeed == 1){
+ adj_dac_temp = normal_96k_5dot_adj_default_dac_H[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ continue_dac_temp = normal_96k_5dot_continue_default_dac_H[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ full_dac_temp = normal_96k_5dot_full_default_dac_H[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ if(!sysPara->para.Vol1of8En && sysPara->para.FullColFixVal){
+ full_dac_temp = normal_96k_5dot_full_default_dac_F[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ sysPara->voltePara.pixel_para_table[0] = 15;
+ sysPara->voltePara.pixel_para_table[1] = 15;
+ sysPara->voltePara.pixel_para_table[2] = 15;
+ sysPara->voltePara.pixel_para_table[3] = 15;
+ sysPara->voltePara.pixel_para_table[4] = 10;
+ }
+ else if (sysPara->para.printRowDelay == 2) {
+ float adj_dac_temp = slow1_96k_5dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = slow1_96k_5dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = slow1_96k_5dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ sysPara->voltePara.pixel_para_table[0] = 15;
+ sysPara->voltePara.pixel_para_table[1] = 15;
+ sysPara->voltePara.pixel_para_table[2] = 15;
+ sysPara->voltePara.pixel_para_table[3] = 15;
+ sysPara->voltePara.pixel_para_table[4] = 10;
+ }
+ }
+ else if (sysPara->para.oscillatoFreq == 3) { // 128k
+ if (sysPara->para.printRowDelay == 0) {
+ float adj_dac_temp = fast_128k_5dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = fast_128k_5dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = fast_128k_5dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ if(sysPara->para.recommendedPrintSpeed == 1){
+ adj_dac_temp = fast_128k_5dot_adj_default_dac_A[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ continue_dac_temp = fast_128k_5dot_continue_default_dac_A[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ full_dac_temp = fast_128k_5dot_full_default_dac_A[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ else if(sysPara->para.recommendedPrintSpeed == 2){
+ adj_dac_temp = fast_128k_5dot_adj_default_dac_B[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ continue_dac_temp = fast_128k_5dot_continue_default_dac_B[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ full_dac_temp = fast_128k_5dot_full_default_dac_B[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ }
+ else if (sysPara->para.printRowDelay == 1) {
+ float adj_dac_temp = normal_128k_5dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = normal_128k_5dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = normal_128k_5dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ }
+ }
+ }
+ else if (sysPara->status.currPrintRow <= 7) {
+ for(int i = 0; i < sysPara->status.currPrintRow; i++)
+ {
+ if (sysPara->para.oscillatoFreq == 0) { // 64K
+ if (sysPara->para.printRowDelay == 0) {
+ float adj_dac_temp = fast_64k_7dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = fast_64k_7dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = fast_64k_7dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ else if (sysPara->para.printRowDelay == 1) {
+ float adj_dac_temp = normal_64k_7dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = normal_64k_7dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = normal_64k_7dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ else if (sysPara->para.printRowDelay == 2) {
+ float adj_dac_temp = slow1_64k_7dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = slow1_64k_7dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = slow1_64k_7dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ }
+ else if (sysPara->para.oscillatoFreq == 2) { // 96K
+ if (sysPara->para.printRowDelay == 0) {
+ float adj_dac_temp = fast_96k_7dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = fast_96k_7dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = fast_96k_7dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ if(sysPara->para.recommendedPrintSpeed == 1){
+ adj_dac_temp = fast_96k_7dot_adj_default_dac_H[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ continue_dac_temp = fast_96k_7dot_continue_default_dac_H[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ full_dac_temp = fast_96k_7dot_full_default_dac_H[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ if(sysPara->para.recommendedPrintSpeed == 2){
+ adj_dac_temp = fast_96k_7dot_adj_default_dac_S[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ continue_dac_temp = fast_96k_7dot_continue_default_dac_S[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ full_dac_temp = fast_96k_7dot_full_default_dac_S[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ if(!sysPara->para.Vol1of8En && sysPara->para.FullColFixVal){
+ full_dac_temp = fast_96k_7dot_full_default_dac_F[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ }
+ else if (sysPara->para.printRowDelay == 1) {
+ float adj_dac_temp = normal_96k_7dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = normal_96k_7dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = normal_96k_7dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ if(sysPara->para.recommendedPrintSpeed == 1){
+ adj_dac_temp = normal_96k_7dot_adj_default_dac_H[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ continue_dac_temp = normal_96k_7dot_continue_default_dac_H[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ full_dac_temp = normal_96k_7dot_full_default_dac_H[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ if(!sysPara->para.Vol1of8En && sysPara->para.FullColFixVal){
+ full_dac_temp = normal_96k_7dot_full_default_dac_F[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ sysPara->voltePara.pixel_para_table[0] = 15;
+ sysPara->voltePara.pixel_para_table[1] = 15;
+ sysPara->voltePara.pixel_para_table[2] = 15;
+ sysPara->voltePara.pixel_para_table[3] = 15;
+ sysPara->voltePara.pixel_para_table[4] = 10;
+ }
+ else if (sysPara->para.printRowDelay == 2) {
+ float adj_dac_temp = slow1_96k_7dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = slow1_96k_7dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = slow1_96k_7dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ sysPara->voltePara.pixel_para_table[0] = 15;
+ sysPara->voltePara.pixel_para_table[1] = 15;
+ sysPara->voltePara.pixel_para_table[2] = 15;
+ sysPara->voltePara.pixel_para_table[3] = 15;
+ sysPara->voltePara.pixel_para_table[4] = 10;
+ }
+ }
+ else if (sysPara->para.oscillatoFreq == 3) { // 128K
+ if (sysPara->para.printRowDelay == 0) {
+ float adj_dac_temp = fast_128k_7dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = fast_128k_7dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = fast_128k_7dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ if(sysPara->para.recommendedPrintSpeed == 2){
+ adj_dac_temp = fast_128k_7dot_adj_default_dac_A[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ continue_dac_temp = fast_128k_7dot_continue_default_dac_A[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ full_dac_temp = fast_128k_7dot_full_default_dac_A[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ else if(sysPara->para.recommendedPrintSpeed == 1){
+ adj_dac_temp = fast_128k_7dot_adj_default_dac_B[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ continue_dac_temp = fast_128k_7dot_continue_default_dac_B[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ full_dac_temp = fast_128k_7dot_full_default_dac_B[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ else if(sysPara->para.recommendedPrintSpeed == 3){
+ adj_dac_temp = fast_128k_7dot_adj_default_dac_C[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ continue_dac_temp = fast_128k_7dot_continue_default_dac_C[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ full_dac_temp = fast_128k_7dot_full_default_dac_C[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ sysPara->voltePara.pixel_para_table[0] = 15;
+ sysPara->voltePara.pixel_para_table[1] = 15;
+ sysPara->voltePara.pixel_para_table[2] = 15;
+ sysPara->voltePara.pixel_para_table[3] = 25;
+ sysPara->voltePara.pixel_para_table[4] = 10;
+ }
+ else if (sysPara->para.printRowDelay == 1) {
+ float adj_dac_temp = normal_128k_7dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = normal_128k_7dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = normal_128k_7dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ sysPara->voltePara.pixel_para_table[0] = 15;
+ sysPara->voltePara.pixel_para_table[1] = 15;
+ sysPara->voltePara.pixel_para_table[2] = 15;
+ sysPara->voltePara.pixel_para_table[3] = 15;
+ sysPara->voltePara.pixel_para_table[4] = 10;
+ }
+ }
+ }
+ }
+ else if (sysPara->status.currPrintRow <= 9) {
+ for(int i = 0; i < sysPara->status.currPrintRow; i++)
+ {
+ if (sysPara->para.oscillatoFreq == 0) { // 64K
+ if (sysPara->para.printRowDelay == 0) {
+ float adj_dac_temp = fast_64k_9dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = fast_64k_9dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = fast_64k_9dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ else if (sysPara->para.printRowDelay == 1) {
+ float adj_dac_temp = normal_64k_9dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = normal_64k_9dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = normal_64k_9dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ else if (sysPara->para.printRowDelay == 2) {
+ float adj_dac_temp = slow1_64k_9dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = slow1_64k_9dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = slow1_64k_9dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ }
+ else if (sysPara->para.oscillatoFreq == 2) { // 96K
+ if (sysPara->para.printRowDelay == 0) {
+ float adj_dac_temp = fast_96k_9dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = fast_96k_9dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = fast_96k_9dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ if(sysPara->para.recommendedPrintSpeed == 1){
+ adj_dac_temp = fast_96k_9dot_adj_default_dac_S[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ continue_dac_temp = fast_96k_9dot_continue_default_dac_S[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ full_dac_temp = fast_96k_9dot_full_default_dac_S[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ sysPara->voltePara.pixel_para_table[0] = 15;
+ sysPara->voltePara.pixel_para_table[1] = 15;
+ sysPara->voltePara.pixel_para_table[2] = 15;
+ sysPara->voltePara.pixel_para_table[3] = 15;
+ sysPara->voltePara.pixel_para_table[4] = 25;
+ sysPara->voltePara.pixel_para_table[5] = 15;
+ }
+ }
+ else if (sysPara->para.printRowDelay == 1) {
+ float adj_dac_temp = normal_96k_9dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = normal_96k_9dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = normal_96k_9dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ if(sysPara->para.recommendedPrintSpeed == 1){
+ adj_dac_temp = normal_96k_9dot_adj_default_dac_H[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ continue_dac_temp = normal_96k_9dot_continue_default_dac_H[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ full_dac_temp = normal_96k_9dot_full_default_dac_H[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ }
+ else if (sysPara->para.printRowDelay == 2) {
+ float adj_dac_temp = slow1_96k_9dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = slow1_96k_9dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = slow1_96k_9dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ }
+ if (sysPara->para.oscillatoFreq == 3) { // 128K
+ if (sysPara->para.printRowDelay == 0) {
+ float adj_dac_temp = fast_128k_9dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = fast_128k_9dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = fast_128k_9dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ if(sysPara->para.recommendedPrintSpeed == 1){
+ adj_dac_temp = fast_128k_9dot_adj_default_dac_A[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ continue_dac_temp = fast_128k_9dot_continue_default_dac_A[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ full_dac_temp = fast_128k_9dot_full_default_dac_A[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ else if(sysPara->para.recommendedPrintSpeed == 2){
+ adj_dac_temp = fast_128k_9dot_adj_default_dac_B[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ continue_dac_temp = fast_128k_9dot_continue_default_dac_B[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ full_dac_temp = fast_128k_9dot_full_default_dac_B[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ else if(sysPara->para.recommendedPrintSpeed == 3){
+ adj_dac_temp = fast_128k_9dot_adj_default_dac_C[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ continue_dac_temp = fast_128k_9dot_continue_default_dac_C[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ full_dac_temp = fast_128k_9dot_full_default_dac_C[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ sysPara->voltePara.pixel_para_table[0] = 15;
+ sysPara->voltePara.pixel_para_table[1] = 15;
+ sysPara->voltePara.pixel_para_table[2] = 15;
+ sysPara->voltePara.pixel_para_table[3] = 25;
+ sysPara->voltePara.pixel_para_table[4] = 10;
+ }
+ else if (sysPara->para.printRowDelay == 1) {
+ float adj_dac_temp = normal_128k_9dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = normal_128k_9dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = normal_128k_9dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ sysPara->voltePara.pixel_para_table[0] = 15;
+ sysPara->voltePara.pixel_para_table[1] = 15;
+ sysPara->voltePara.pixel_para_table[2] = 15;
+ sysPara->voltePara.pixel_para_table[3] = 15;
+ sysPara->voltePara.pixel_para_table[4] = 10;
+ }
+ }
+ }
+ }
+ else if (sysPara->status.currPrintRow <= 12) {
+ for(int i = 0; i < sysPara->status.currPrintRow; i++)
+ {
+ if (sysPara->para.oscillatoFreq == 0) { // 64K
+ if ((sysPara->para.printRowDelay == 0) && (i < 5)) {//交替
+ float adj_dac_temp = fast_64k_5dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = fast_64k_5dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = fast_64k_5dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ else if (sysPara->para.printRowDelay == 1) {
+ float adj_dac_temp = normal_64k_12dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = normal_64k_12dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = normal_64k_12dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ if(sysPara->para.alterPrint.enable){
+ adj_dac_temp = normal_64k_5dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ continue_dac_temp = normal_64k_5dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ full_dac_temp = normal_64k_5dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ }
+ else if (sysPara->para.printRowDelay == 2) {
+ float adj_dac_temp = slow1_64k_12dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = slow1_64k_12dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = slow1_64k_12dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ if(sysPara->para.alterPrint.enable){
+ adj_dac_temp = slow1_64k_5dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ continue_dac_temp = slow1_64k_5dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ full_dac_temp = slow1_64k_5dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ }
+ }
+ else if (sysPara->para.oscillatoFreq == 2) { // 96K
+ if (sysPara->para.printRowDelay == 0) {
+ float adj_dac_temp = fast_96k_12dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = fast_96k_12dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = fast_96k_12dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ if(sysPara->para.upDownInverse){
+ adj_dac_temp = fast_96k_12dot_adj_default_dac_U[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ continue_dac_temp = fast_96k_12dot_continue_default_dac_U[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ full_dac_temp = fast_96k_12dot_full_default_dac_U[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ sysPara->voltePara.pixel_para_table[0] = 30;
+ sysPara->voltePara.pixel_para_table[1] = 15;
+ sysPara->voltePara.pixel_para_table[2] = 15;
+ sysPara->voltePara.pixel_para_table[3] = 15;
+ sysPara->voltePara.pixel_para_table[4] = 25;
+
+ if((i < 5) && sysPara->para.alterPrint.enable) {//交替
+ float adj_dac_temp = fast_96k_5dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = fast_96k_5dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = fast_96k_5dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+
+ }
+ else if (sysPara->para.printRowDelay == 1) {
+ float adj_dac_temp = normal_96k_12dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = normal_96k_12dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = normal_96k_12dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+
+ if((i < 5) && sysPara->para.alterPrint.enable) {//交替
+ float adj_dac_temp = normal_96k_5dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = normal_96k_5dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = normal_96k_5dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ }
+ else if (sysPara->para.printRowDelay == 2) {
+ float adj_dac_temp = slow1_96k_12dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = slow1_96k_12dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = slow1_96k_12dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+
+ if((i < 5) && sysPara->para.alterPrint.enable) {//交替
+ float adj_dac_temp = slow1_96k_5dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = slow1_96k_5dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = slow1_96k_5dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ }
+ }
+
+ else if(sysPara->para.oscillatoFreq == 3){// 128K
+ if( (i < 5) && sysPara->para.alterPrint.enable) {//交替
+ if (sysPara->para.printRowDelay == 0) {
+ float adj_dac_temp = fast_128k_5dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = fast_128k_5dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = fast_128k_5dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ else if (sysPara->para.printRowDelay == 1) {
+ float adj_dac_temp = normal_128k_5dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = normal_128k_5dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = normal_128k_5dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ }
+ }
+ }
+ }
+ else if (sysPara->status.currPrintRow <= 16) {
+ for(int i = 0; i < sysPara->status.currPrintRow; i++)
+ {
+ if (sysPara->para.oscillatoFreq == 0) { // 64K
+ if (sysPara->para.printRowDelay == 0){
+ if((i < 7) && sysPara->para.alterPrint.enable) {//交替
+ float adj_dac_temp = fast_64k_7dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = fast_64k_7dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = fast_64k_7dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ }
+ else if (sysPara->para.printRowDelay == 1) {
+ float adj_dac_temp = normal_64k_16dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = normal_64k_16dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = normal_64k_16dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ sysPara->voltePara.pixel_para_table[0] = 20;
+ sysPara->voltePara.pixel_para_table[1] = 20;
+ sysPara->voltePara.pixel_para_table[2] = 30;
+ sysPara->voltePara.pixel_para_table[3] = 30;
+ sysPara->voltePara.pixel_para_table[4] = 10;
+ if((i < 7) && sysPara->para.alterPrint.enable){
+ adj_dac_temp = normal_64k_7dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ continue_dac_temp = normal_64k_7dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ full_dac_temp = normal_64k_7dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ }
+ else if (sysPara->para.printRowDelay == 2) {
+ float adj_dac_temp = slow1_64k_16dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = slow1_64k_16dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = slow1_64k_16dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ if((i < 7) && sysPara->para.alterPrint.enable){
+ adj_dac_temp = slow1_64k_7dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ continue_dac_temp = slow1_64k_7dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ full_dac_temp = slow1_64k_7dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ }
+ }
+ else if (sysPara->para.oscillatoFreq == 2) { // 96K
+ if (sysPara->para.printRowDelay == 0){
+ if((i < 7) && sysPara->para.alterPrint.enable) {//交替
+ float adj_dac_temp = fast_96k_7dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = fast_96k_7dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = fast_96k_7dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ }
+ else if (sysPara->para.printRowDelay == 1){
+ float adj_dac_temp = normal_96k_16dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = normal_96k_16dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = normal_96k_16dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ if((i < 7) && sysPara->para.alterPrint.enable) {//交替
+ float adj_dac_temp = normal_96k_7dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = normal_96k_7dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = normal_96k_7dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ }
+ else if (sysPara->para.printRowDelay == 2) {
+ float adj_dac_temp = slow1_96k_16dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = slow1_96k_16dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = slow1_96k_16dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ if((i < 7) && sysPara->para.alterPrint.enable) {//交替
+ float adj_dac_temp = slow1_96k_7dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = slow1_96k_7dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = slow1_96k_7dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ }
+ }
+ else if ((sysPara->para.oscillatoFreq == 3) && (i < 7) && sysPara->para.alterPrint.enable) { // 128K
+ if (sysPara->para.printRowDelay == 0) {
+ float adj_dac_temp = fast_128k_7dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = fast_128k_7dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = fast_128k_7dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ sysPara->voltePara.pixel_para_table[0] = 15;
+ sysPara->voltePara.pixel_para_table[1] = 15;
+ sysPara->voltePara.pixel_para_table[2] = 15;
+ sysPara->voltePara.pixel_para_table[3] = 15;
+ sysPara->voltePara.pixel_para_table[4] = 10;
+ }
+ else if (sysPara->para.printRowDelay == 1) {
+ float adj_dac_temp = normal_128k_7dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = normal_128k_7dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = normal_128k_7dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ sysPara->voltePara.pixel_para_table[0] = 15;
+ sysPara->voltePara.pixel_para_table[1] = 15;
+ sysPara->voltePara.pixel_para_table[2] = 15;
+ sysPara->voltePara.pixel_para_table[3] = 15;
+ sysPara->voltePara.pixel_para_table[4] = 10;
+ }
+ }
+ }
+ }
+ else if (sysPara->status.currPrintRow <= 24) {
+ for(int i = 0; i < sysPara->status.currPrintRow; i++)
+ {
+ if (sysPara->para.oscillatoFreq == 0) { // 64K
+ if (sysPara->para.printRowDelay == 0){
+ if((i < 9) && sysPara->para.alterPrint.enable) {//交替
+ float adj_dac_temp = fast_64k_9dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = fast_64k_9dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = fast_64k_9dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ }
+ else if (sysPara->para.printRowDelay == 1) {
+ float adj_dac_temp = normal_64k_24dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = normal_64k_24dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = normal_64k_24dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ if((i < 9) && sysPara->para.alterPrint.enable){
+ adj_dac_temp = normal_64k_9dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ continue_dac_temp = normal_64k_9dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ full_dac_temp = normal_64k_9dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ }
+ else if (sysPara->para.printRowDelay == 2) {
+ float adj_dac_temp = slow1_64k_24dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = slow1_64k_24dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = slow1_64k_24dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ if((i < 9) && sysPara->para.alterPrint.enable){
+ adj_dac_temp = slow1_64k_9dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ continue_dac_temp = slow1_64k_9dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ full_dac_temp = slow1_64k_9dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ }
+ }
+ else if (sysPara->para.oscillatoFreq == 2) { // 96K
+ if (sysPara->para.printRowDelay == 0){
+ if((i < 9) && sysPara->para.alterPrint.enable) {//交替
+ float adj_dac_temp = fast_96k_9dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = fast_96k_9dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = fast_96k_9dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ }
+ else if (sysPara->para.printRowDelay == 1){
+ if((i < 9) && sysPara->para.alterPrint.enable) {//交替
+ float adj_dac_temp = normal_96k_9dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = normal_96k_9dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = normal_96k_9dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ }
+ else if (sysPara->para.printRowDelay == 2){
+ float adj_dac_temp = slow1_96k_24dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = slow1_96k_24dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = slow1_96k_24dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ if((i < 9) && sysPara->para.alterPrint.enable) {//交替
+ float adj_dac_temp = slow1_96k_9dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = slow1_96k_9dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = slow1_96k_9dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ }
+ }
+ else if ((sysPara->para.oscillatoFreq == 3) && (i < 9) && sysPara->para.alterPrint.enable) { // 128K
+ if (sysPara->para.printRowDelay == 0) {
+ float adj_dac_temp = fast_128k_9dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = fast_128k_9dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = fast_128k_9dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ sysPara->voltePara.pixel_para_table[0] = 15;
+ sysPara->voltePara.pixel_para_table[1] = 15;
+ sysPara->voltePara.pixel_para_table[2] = 15;
+ sysPara->voltePara.pixel_para_table[3] = 15;
+ sysPara->voltePara.pixel_para_table[4] = 10;
+ }
+ else if (sysPara->para.printRowDelay == 1) {
+ float adj_dac_temp = normal_128k_9dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = normal_128k_9dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = normal_128k_9dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ sysPara->voltePara.pixel_para_table[0] = 15;
+ sysPara->voltePara.pixel_para_table[1] = 15;
+ sysPara->voltePara.pixel_para_table[2] = 15;
+ sysPara->voltePara.pixel_para_table[3] = 15;
+ sysPara->voltePara.pixel_para_table[4] = 10;
+ }
+ }
+ }
+ }
+ else if (sysPara->status.currPrintRow <= 32) {
+ for(int i = 0; i < sysPara->status.currPrintRow; i++){
+ if (sysPara->para.oscillatoFreq == 0) {
+ if((sysPara->para.printRowDelay == 1) && (sysPara->para.alterPrint.enable)){
+ float adj_dac_temp = normal_64k_12dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = normal_64k_12dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = normal_64k_12dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ else if((sysPara->para.printRowDelay == 2) && (sysPara->para.alterPrint.enable)){
+ float adj_dac_temp = slow1_64k_12dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = slow1_64k_12dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = slow1_64k_12dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ }
+ else if (sysPara->para.oscillatoFreq == 2) {
+ if ((sysPara->para.printRowDelay == 0) && (i <= 12) && sysPara->para.alterPrint.enable) {//交替
+ float adj_dac_temp = fast_96k_12dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = fast_96k_12dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = fast_96k_12dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ if(sysPara->para.upDownInverse){
+ adj_dac_temp = fast_96k_12dot_adj_default_dac_U[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ continue_dac_temp = fast_96k_12dot_continue_default_dac_U[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ full_dac_temp = fast_96k_12dot_full_default_dac_U[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ }
+ else if ((sysPara->para.printRowDelay == 1) && (i <= 12) && sysPara->para.alterPrint.enable) {//交替
+ float adj_dac_temp = normal_96k_12dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = normal_96k_12dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = normal_96k_12dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ else if ((sysPara->para.printRowDelay == 2) && (i <= 12) && sysPara->para.alterPrint.enable) {//交替
+ float adj_dac_temp = slow1_96k_12dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = slow1_96k_12dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = slow1_96k_12dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ sysPara->voltePara.pixel_para_table[0] = 30;
+ sysPara->voltePara.pixel_para_table[1] = 15;
+ sysPara->voltePara.pixel_para_table[2] = 15;
+ sysPara->voltePara.pixel_para_table[3] = 15;
+ sysPara->voltePara.pixel_para_table[4] = 25;
+ }
+ }
+ }
+ else{
+ for(int i = 0; i < sysPara->status.currPrintRow; i++){
+ if (sysPara->para.oscillatoFreq == 0) {
+ if((sysPara->para.printRowDelay == 1) && (sysPara->para.alterPrint.enable)){
+ float adj_dac_temp = normal_64k_16dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = normal_64k_16dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = normal_64k_12dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ else if((sysPara->para.printRowDelay == 2) && (sysPara->para.alterPrint.enable)){
+ float adj_dac_temp = slow1_64k_16dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = slow1_64k_16dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = slow1_64k_16dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ }
+ else if (sysPara->para.oscillatoFreq == 2) {
+ if((sysPara->para.printRowDelay == 1) && (sysPara->para.alterPrint.enable)){
+ float adj_dac_temp = normal_96k_16dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = normal_96k_16dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = normal_96k_12dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ else if((sysPara->para.printRowDelay == 2) && (sysPara->para.alterPrint.enable)){
+ float adj_dac_temp = slow1_96k_16dot_adj_default_dac[i] * DAC_RADIO;
+ DACArray[i] = adj_dac_temp;
+ float continue_dac_temp = slow1_96k_16dot_continue_default_dac[i] * DAC_RADIO;
+ notGapDACArray[i] = continue_dac_temp;
+ float full_dac_temp = slow1_96k_16dot_full_default_dac[i] * DAC_RADIO;
+ fullColDACArray[i] = full_dac_temp;
+ }
+ }
+ }
+ }
+ }
+
+
+static unsigned short * voltArray = NULL;
+static unsigned short highspeedmode_7dot_dac[1152]; //128*9=1152
+static unsigned short highspeedmode_9dot_dac[4608]; //512*9 = 4608
+void DevOp::writeDataToFpga_No67HighSpeedMode(Voltage_Version version,bool flag){
+
+ LogInfo::setRunStatusText("writeDataToFpga_No67HighSpeedMode");
+ memset(highspeedmode_7dot_dac, 0, sizeof(highspeedmode_7dot_dac));
+ memset(highspeedmode_9dot_dac, 0, sizeof(highspeedmode_9dot_dac));
+
+ QString volParaFilePath;
+ if(version == VersionOf67And7HighSpeed){
+ volParaFilePath = ":/conf/normal_128k_7dot_dac.txt";
+ }
+ else if(version == VersionOf67And7SuperSpeed){
+ volParaFilePath = ":/conf/fast_128k_7dot_dac.txt";
+ }
+ else if(version == VersionOf67And9HighSpeed){
+ volParaFilePath = ":/conf/normal_128k_9dot_dac.txt";
+ }
+ else if(version == VersionOf67And9SuperSpeed){
+ volParaFilePath = ":/conf/normal_128k_9dot_dac.txt";
+ }
+ int max_size = 0;
+ if(sysPara->status.currPrintRow <= 7){
+ voltArray = (unsigned short *)highspeedmode_7dot_dac;
+ max_size = 1152;
+ }else if(sysPara->status.currPrintRow <= 9){
+ voltArray = (unsigned short *)highspeedmode_9dot_dac;
+ max_size = 4608;
+ }
+
+ QFile file(volParaFilePath);
+ if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
+ qDebug() << "open failed normal_128k_7dot_dac.txt!";
+ return;
+ }
+
+ QTextStream in(&file);
+ int i = 0;
+ while (!in.atEnd()) {
+ QString str = in.readLine();
+ QStringList list = str.split(","); // 确保文件中的分隔符是逗号
+ for (int j = 0; j < 9 && j < list.size(); j++) {
+ if (!list[j].isEmpty() && (voltArray != NULL) && istatus.currPrintRow <= 7){
+ if(flag)
+ fpgaWr(0xB500,(unsigned char *)voltArray,2304); //128*9=1152 1152*2 = 2304
+ else
+ fpgaWr(0xB200,(unsigned char *)voltArray,2304);
+ }
+ else if(sysPara->status.currPrintRow <= 9){
+ if(flag)
+ fpgaWr(0xB500,(unsigned char *)voltArray,9216); //512*9 = 4608 4608*2=9216
+ else
+ fpgaWr(0xB200,(unsigned char *)voltArray,9216);
+ }
+}
diff --git a/oldProject/DevOp.h b/oldProject/DevOp.h
new file mode 100644
index 0000000..038c9ed
--- /dev/null
+++ b/oldProject/DevOp.h
@@ -0,0 +1,381 @@
+/*
+ * DevOp.h
+ *
+ * Created on: Jun 25, 2013
+ * Author: yiyu
+ * QQ:1036184468
+ * Descriptoin:
+
+ */
+
+#ifndef DEVOP_H_
+#define DEVOP_H_
+
+/************以前的硬件版本,跟VX5版本号冲突,取消
+#define JETV1 1
+#define JETV2 2
+#define JETV3 3 // EP3C10F144
+#define JETV23 4 // V5,V4主板编号均为4; V6没有正式投入使用
+#define JETV7 7 // EP4CE15F144, ARM 335X
+#define PRODUCT_VERSION(ver) ((ver>>13) & 0x7)
+**********************/
+class SysPara;
+
+#include
+#include
+#include "myinclude.h"
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#define DisTraceMsg() printf("###############TRACE,Line:%d File:%s Fun:%s\n",__LINE__,__FILE__,__FUNCTION__);
+#define DisWarnmsg() printf("~~~~~~~~~~~~~~~WARN,Line:%d File:%s Fun:%s\n",__LINE__,__FILE__,__FUNCTION__);
+#define DisErrorMsg() printf("!!!!!!!!!!!!!!!ERROR! ,Line:%d File:%s Fun:%s\n",__LINE__,__FILE__,__FUNCTION__);
+
+#define PRINT_CTRL_STOP 0
+#define PRINT_CTRL_START 1
+#define PRINT_CTRL_PAUSE 2
+#define PRINT_CTRL_DAC_DISABLE 3
+#define PRINT_CTRL_DAC_ENABLE 4
+#define PRINT_CTRL_STOPSYNCNT 5
+
+
+#define MAX_FPGA_DAC_VALUE_FOR_NEW ((1<<12)*95/100) //由于硬件原因,当DAC大于一定值后,电压不再变化,所以做一下限制
+#define MAX_FPGA_DAC_VALUE_FOR_V1 (255) //老板子的最大值到256
+//#define MAX_FPGA_DAC_VALUE ((PRODUCT_VERSION(sysPara->status.fpgaVersionNum) == JETV1)?MAX_FPGA_DAC_VALUE_FOR_V1:MAX_FPGA_DAC_VALUE_FOR_NEW)
+#define MAX_FPGA_DAC_VALUE MAX_FPGA_DAC_VALUE_FOR_NEW
+
+#define MAX_POINT_DISTANCE_ADJUST_VAL (1<<10) //点距微调的最大值
+
+#define MAX_MOTOR_RUN_CURRENT 600
+#define MIN_MOTOR_RUN_CURRENT 80
+
+#define MAX_RECLAIM_BLOCK_CNT 5 //500ms
+
+#define MAX_RELEASE_VALVE_DELAY_CNT 4
+/*所有警告都是高电平警告*/
+#define WARN_STATUS_INK_SWINT (1<<7) /*墨线开头,来自喷头,必须开的时候才能打印,关的时候为1,开的时候为0*/
+#define WARN_STATUS_POWER_MON (1<<6) //高压报警
+#define WARN_STATUS_RECYCLE_FAULT (1<<5) //高电平表示有故障
+#define WARN_STATUS_INK_WARN (1<<4)
+#define WARN_STATUS_SOLV_WARN (1<<3)
+#define WARN_STATUS_SUMP_WARN (1<<2) //墨水渗漏
+#define WARN_STATUS_HDINT (1<<1) /*喷头盖,盖上为0,否则为1,必须盖上才能打印,电磁铁有正反面*/
+#define WARN_STATUS_VISCOTITY_MEASURE_READY (1<<0) // 球已经到上位等灯
+
+
+#define FPGA_SYS_HZ 100000000
+
+#define MAX_WR_MEM_SIZE (1<<16) //写空间最大地址范围
+#define MAX_WR_MEM_SIZE_MASK (MAX_WR_MEM_SIZE - 1)
+#define MAX_RD_MEM_SIZE (1<<9) //读空间最大地址范围
+#define MAX_RD_MEM_SIZE_MASK (MAX_RD_MEM_SIZE - 1)
+
+/* am335x core board control pwm output */
+#define VISCO_PUMP_REQUEST "echo 1 > /sys/class/pwm/ecap.2/request"
+#define VISCO_PUMP_RELEASE "echo 0 > /sys/class/pwm/ecap.2/request"
+#define VISCO_PUMP_RUN "echo 1 > /sys/class/pwm/ecap.2/run"
+#define VISCO_PUMP_STOP "echo 0 > /sys/class/pwm/ecap.2/run"
+#define VISCO_PUMP_50Hz "echo 50 > /sys/class/pwm/ecap.2/period_freq"
+#define VISCO_PUMP_50P "echo 50 > /sys/class/pwm/ecap.2/duty_percent"
+#define VISCO_PUMP_HIGH "echo 1 > /sys/class/pwm/ecap.2/polarity"
+#define VISCO_PUMP_LOW "echo 0 > /sys/class/pwm/ecap.2/polarity"
+
+#define SUCTION_PUMP_REQUEST "echo 1 > /sys/class/pwm/ehrpwm.0:1/request"
+#define SUCTION_PUMP_RELEASE "echo 0 > /sys/class/pwm/ehrpwm.0:1/request"
+#define SUCTION_PUMP_RUN "echo 1 > /sys/class/pwm/ehrpwm.0:1/run"
+#define SUCTION_PUMP_STOP "echo 0 > /sys/class/pwm/ehrpwm.0:1/run"
+#define SUCTION_PUMP_HIGH "echo 1 > /sys/class/pwm/ehrpwm.0:1/polarity"
+#define SUCTION_PUMP_LOW "echo 0 > /sys/class/pwm/ehrpwm.0:1/polarity"
+#define SUCTION_PUMP_90P "echo 90 > /sys/class/pwm/ehrpwm.0:1/duty_percent"
+#define SUCTION_PUMP_12000Hz "echo 12000 > /sys/class/pwm/ehrpwm.0:1/period_freq"
+
+#define PRINT_CTRL_ADDR_BASE 0xa400
+
+#define PRINT_DIGITAL_CHAR_BASE_ADDR (0xe000)
+
+#define WRITE_CALENDAR_DAT_ADDR (0xb100)
+
+#define RECYCLE_SLOT_STOP 0x1
+#define RECYCLE_SLOT_CLOSE 0x2
+#define RECYCLE_SLOT_OPEN 0x0
+#define PRINT_START_STOP_CTRL (PRINT_CTRL_ADDR_BASE + 0x40)
+#define PRINT_RESET_PRODUCT_CNT (PRINT_CTRL_ADDR_BASE + 0x41)
+#define RECYCLE_SLOT_CTRL_ADDR (PRINT_CTRL_ADDR_BASE + 0x42)
+#define RESUME_FAULT_ADDR (PRINT_CTRL_ADDR_BASE + 0x43)
+
+#define VAR_CNT_ADDR (PRINT_CTRL_ADDR_BASE + 0x50)
+#define VAR_CTRL_REG_ADDR (PRINT_CTRL_ADDR_BASE + 0x51)
+#define MAININKCTRL_ADDR (PRINT_CTRL_ADDR_BASE + 0x59)
+//#define MAININKCTRL_ADDR (PRINT_CTRL_ADDR_BASE + 0x5a)
+#define WRITE_CNT1GROUP_COUNT 0xB13E
+#define WRITE_CNT1GROUP_NUM 0xB13F
+#define WRITE_CNT1GROUP_SETTING 0xB140
+#define READ_CNT1GROUP_CURR_LOOP 0x0190
+#define READ_CNT1GROUP_CURR_INDEX 0x0194
+
+#define WRITE_CNT2GROUP_COUNT 0xB16E
+#define WRITE_CNT2GROUP_NUM 0xB16F
+#define WRITE_CNT2GROUP_SETTING 0xB170
+#define READ_CNT2GROUP_CURR_LOOP 0x0195
+#define READ_CNT2GROUP_CURR_INDEX 0x0199
+
+#define FPGA_STATUS_BASE_ADDR 0x0000
+#define FPGA_VERSOIN_NUM (FPGA_STATUS_BASE_ADDR + 0xfe)
+
+
+#define READ_BUILD_DAT (FPGA_STATUS_BASE_ADDR + 0xf0)
+
+#define READ_PRINTDATA_XOR (FPGA_STATUS_BASE_ADDR + 0xf2)
+#define READ_SYNC_COUNTER (FPGA_STATUS_BASE_ADDR + 0xf4)
+
+#define PHASE_DETECT_HIGH_VOLTAGE_TM 0x100
+#define READ_CALENDAR_DAT_ADDR 0x180
+
+#define READ_RAND_FIFO_ADDR 0x200 // 读FPGA的随机码FIFO
+
+#define ROW_PRINT_SEQNENCE_ADDR 0xb200 //行扫描顺序
+#define DAC_TABLE_ADDR 0xb280 //每一个行点对应的DAC值
+#define NOT_GAP_DAC_TABLE_ADDR 0xb380 //每一个不隔点对应的DAC值
+#define FULL_COL_DAC_TABLE_ADDR 0xb480 //每一个不隔点对应的DAC值
+
+#define MATCH_FULL_DAC_TABLE_ADDR 0xB500 // 匹配满列 DAC表 起始地址
+#define MATCH_1_DAC_TABLE_ADDR 0xB600 // 匹配单点 DAC表 起始地址
+#define MATCH_2_DAC_TABLE_ADDR 0xB700 // 匹配两点 DAC表 起始地址
+#define MATCH_3_DAC_TABLE_ADDR 0xB800 // 匹配三点 DAC表 起始地址
+#define MATCH_4_DAC_TABLE_ADDR 0xB900 // 匹配四点 DAC表 起始地址
+#define MATCH_5_DAC_TABLE_ADDR 0xBA00 // 匹配五点 DAC表 起始地址
+#define MATCH_G1_DAC_TABLE_ADDR 0xBC00 // 匹配空一点 DAC表 起始地址
+#define MATCH_G2_DAC_TABLE_ADDR 0xBC80 // 匹配空两点 DAC表 起始地址
+#define MATCH_G3_DAC_TABLE_ADDR 0xBD00 // 匹配空三点 DAC表 起始地址
+#define MATCH_G4_DAC_TABLE_ADDR 0xBD80 // 匹配空四点 DAC表 起始地址
+#define MATCH_G5_DAC_TABLE_ADDR 0xBE00 // 匹配空五点 DAC表 起始地址
+#define MATCH_G6_DAC_TABLE_ADDR 0xBE80 // 匹配空六点 DAC表 起始地址
+#define MATCH_P1_DAC_TABLE_ADDR 0xBF00 // 匹配预备一 DAC表 起始地址
+#define MATCH_P2_DAC_TABLE_ADDR 0xBF80 // 匹配预备二 DAC表 起始地址
+#define MATCH_C_DAC_TABLE_ADDR 0xC000 // 匹配复杂 DAC表 起始地址
+
+#define WRITE_COUNTER3_ADDR (0xb150)
+#define WRITE_COUNTER4_ADDR (0xb164)
+//#define READ_CNT3_CURVALUE_ADDR 0x01b4
+#define READ_CNT3_CURVALUE_ADDR 0x1834
+
+#define LOCADDR '1'
+
+//#define NOLEDLIGHT 0x10
+//#define REDLIGHTCODE 0X11
+//#define YELLOWLIGHTCODE 0X13
+//#define GREENLIGHTCODE 0X12
+// 高四位:颜色
+#define LED_COLOR_NONE 0x00 // 0000 0000
+#define LED_COLOR_YELLOW 0x10 // 0001 0000
+#define LED_COLOR_GREEN 0x20 // 0010 0000
+#define LED_COLOR_RED 0x30 // 0011 0000
+// 低四位:操作
+#define LED_OP_OFF 0x00 // 灭
+#define LED_OP_ON 0x01 // 亮
+#define LED_OP_FLASH 0x02 // 闪烁
+
+//绿灯
+#define LED_COLOR_GREEN_ON LED_COLOR_GREEN|LED_OP_ON //绿灯亮
+#define LED_COLOR_GREEN_OFF LED_COLOR_GREEN|LED_OP_OFF //绿灯灭
+#define LED_COLOR_GREEN_FLASH LED_COLOR_GREEN|LED_OP_FLASH //绿灯闪烁
+//红灯
+#define LED_COLOR_RED_ON LED_COLOR_RED|LED_OP_ON //红灯亮
+#define LED_COLOR_RED_OFF LED_COLOR_RED|LED_OP_OFF //红灯灭
+#define LED_COLOR_RED_FLASH LED_COLOR_RED|LED_OP_FLASH //红灯闪烁
+//黄灯
+#define LED_COLOR_YELLOW_ON LED_COLOR_YELLOW|LED_OP_ON //黄灯亮
+#define LED_COLOR_YELLOW_OFF LED_COLOR_YELLOW|LED_OP_OFF //黄灯灭
+#define LED_COLOR_YELLOW_FLASH LED_COLOR_YELLOW|LED_OP_FLASH //黄灯闪烁
+
+#define LED_ALL_OFF 0x00 //关闭所有灯
+
+/*
+ * 请不要直接初始化此函数,如果需要,请通过SysPara的devOP来访问此类
+ * */
+class DevOp : public QObject
+{
+ Q_OBJECT
+public :
+ DevOp(SysPara * sysPara);
+ ~DevOp();
+
+ void set_totalSynPulseNum(bool wren);// 设置可变长度
+ void WriteMoterPump();
+ void controlReleaseValve(bool openFlag);
+ void controlMixValve(bool openFlag);
+ void controlInkValve(bool openFlag); //控制墨线,即供墨阀
+ void controlInkValvePWMSTM32(int PWMPulse);
+ void controlCycleValve(bool openFlag);
+ void controlCompressPump(bool openFlag);
+ void controlViscosityPump(bool openFlag);
+ void controlMainInkPump(bool openFlag);
+ void setHighVoltageAmplitudetoSTM32();
+ void controlReclaimPump(bool openFlag,bool fullSpeed);
+ void controlReclaimPump2();
+ void controlInkValvePWM(bool openFlag);
+ void controlInkValvePWM2();
+ void controlHeater(bool openFlag);
+ void controlBeeper(bool openFlag);
+
+ void controlReclaimTankOpen(bool enableFlag);
+ void controlReclaimTankClose(bool enableFlag);
+
+ void powerOff(void);
+
+ bool isReleaseValveOpen();
+ bool isMixValveOpen();
+ bool isInkValveOpen();
+ bool isInkValveOpen1();
+ bool isCycleValveOpen();
+ bool isCompressPumpOpen();
+ bool isViscosityPumpOpen();
+ bool isMainInkPumpOpen();
+ bool isReclaimPumpOpen();
+ bool isHighVoltageOpen();
+
+ bool isReclaimTankOpenEnable();
+ bool isReclaimTankCloseEnable();
+ bool isBeeperEnable();
+ bool isHearterEnable();
+
+ int writeFpgaPrintPara(bool ignoreWarn = false);
+ void readFgaStatus(void);
+ void writeDacValue2Fpga_No73();
+
+ void printCtrl(int cmd);
+ void ReadCnt1GroupStatus(void);
+ void ReadCnt2GroupStatus(void);
+ void writeCnt1GroupSetting(bool bCntByGroupEnable);
+ void writeCnt2GroupSetting(bool bCntByGroupEnable);
+ void writeFpgaCalandar(bool Enable);
+ void writeFpgaVariCtrl();
+ void readCalandarDat();
+ void resumeFault();
+ void highVoltageCtrl(int val);
+ void maxHighVoltageDACCtrl(int val);
+ void setPhaseByHand(int val);
+ void readPhaseDetectHighTm();
+ void setPhaseDetectVoltageDutyCycle(int duty);
+ void setBlickLightPeriod(int value);
+ void setOscillatorVoltage(int value);
+ void setDivideRatio(int value);
+ void setLastLineEndPointFixedValue(int value);
+
+ void mainInkCtrl();
+ void pumpValveCtrl(int viscosityAdjustByTemp=0);
+ void clearProductCnt(unsigned int mode);
+ unsigned int readFpgaVersionNum(void);
+ void fpgaWr(int addr,unsigned char*dat,int len);
+ void fpgaRd(int addr,unsigned char*dat,int len);
+ void fpgaWrD(int addr,unsigned int dat,int len);
+ void fpgaWrD2(int addr,unsigned char*dat,int len);
+ void fpgaResetWarning(char mode);
+ void sendSTM32SetPowerOnTimer(quint16);
+ void DACValueWithVoltageAdj();
+ void writeDataToFpga_No67HighSpeedMode(Voltage_Version version,bool flag);
+ bool fpgaDevOpenFlag;
+
+ void stm32Rd(int addr,unsigned char*dat,int len);
+ void stm32Wr(int addr,unsigned char*dat,int len);
+
+ unsigned char memWrMap[MAX_WR_MEM_SIZE];
+ unsigned char memRdMap[MAX_RD_MEM_SIZE];
+ unsigned char color_flag;
+ void controlRedLight(bool openFlag);
+ void controlGreenLight(bool openFlag);
+ void controlYellowLight(bool openFlag);
+ void controlFan1(bool openFlag);
+ void controlFan2(bool openFlag);
+
+ bool isGreenLightEnable();
+ bool isYellowLightEnable();
+ bool isRedLightEnable();
+ void readbuilDat();
+ void readPrintDataXor();
+ void readSyncCounterAtZero();
+ void printCtrl2(int cmd);
+ void ReadSomeDataForLostPrint(void);
+ void readSTM32Version(void);
+ void readSTM32Time(void);
+ bool stopSendDataFPGA;
+ bool stopSendDataSTM32;
+
+ void Read_RanddomFromFpga(); // 读FPGARANDFIFO
+ void RandTxtBakup(char ok);
+ void showData(QByteArray dat);
+ void writeDacValue2Fpga_No72NewVoltData();
+
+
+public slots:
+ void resendFPGADate(int,int,unsigned char *,int,int);
+ void resendSTM32Date(int,int,unsigned char *,int,int);
+
+signals:
+ void dataReceived(char,const QByteArray &dataReceived,int);
+ /***cmd:1--读 2--写*********************************************/
+ /***addr:地址***************************************************/
+ /***dat:数据指针*************************************************/
+ /***len:数据长度*************************************************/
+ /***type:1--FPGA 2--STM32***************************************/
+ void sendSerialDataToSTM32(int cmd,int addr,unsigned char *dat,int len,int type);
+ void sendSerialDataToFPGA(int cmd,int addr,unsigned char *dat,int len,int type);
+
+
+private:
+ int WdgttyUsb0Cnt;
+ bool releaseValveOpenFlag;
+ bool mixValveFlag;
+ bool inkValveOpenFlag;
+ bool inkValveOpenFlag1;
+ bool cycleValveOpenFlag;
+ bool compressPumpOpenFlag;
+ bool viscosityPumpOpenFlag;
+ bool mainInkPumpOpenFlag;
+ bool reclaimPumpOpenFlag;
+ bool highVoltageOpenFlag;
+
+ bool reclaimTankOpenEnableFlag;
+ bool reclaimTankCloseEnableFlag;
+ bool beeperOnFlag;
+
+ bool RedLightOnFlag;
+ bool GreenLightOnFlag;
+ bool YellowLightOnFlag;
+
+ bool heaterOnFlag;
+ int com2;
+ int pwm_sp;
+ int pwm_fd;
+ int Interrupt_fd;
+ int iocontrl;
+ int DAdataout;
+int pwm_ink;
+ int adc_fd;
+ qint8 OscillatorVoltage[100];//VX 电路不一样,所以需要重新调整
+ SysPara *sysPara;
+
+
+ unsigned int fpgaRdD(int addr,int len);
+
+// 0xA451--- 为什么ARM的顺序相反呢?
+ typedef struct {
+ unsigned int varDigitalNum:4; // 数字的个数
+ unsigned int charRamBaseAddr:12; // 基址
+ unsigned int colOffset:16; // 列偏移
+ unsigned int horizonWidth:9;//字模宽度
+ unsigned int verticalOffset:6; // 行偏移
+ unsigned int charRowNum:6; // 每个字符占行个数
+ unsigned int charColNum:6; // 每个字符占列个数
+ unsigned int varTypeSel:4;
+ unsigned int dummy:1;
+ }reg_var_print_ctrl_t;
+
+};
+
+#endif /* DEVOP_H_ */
diff --git a/oldProject/DevOp.h.autosave b/oldProject/DevOp.h.autosave
new file mode 100644
index 0000000..ec77b6c
--- /dev/null
+++ b/oldProject/DevOp.h.autosave
@@ -0,0 +1,380 @@
+/*
+ * DevOp.h
+ *
+ * Created on: Jun 25, 2013
+ * Author: yiyu
+ * QQ:1036184468
+ * Descriptoin:
+
+ */
+
+#ifndef DEVOP_H_
+#define DEVOP_H_
+
+#define JETV1 1
+#define JETV2 2
+#define JETV3 3 // EP3C10F144
+#define JETV23 4 // V5,V4主板编号均为4; V6没有正式投入使用
+#define JETV7 7 // EP4CE15F144, ARM 335X
+#define PRODUCT_VERSION(ver) ((ver>>13) & 0x7)
+
+class SysPara;
+
+#include
+#include
+#include "myinclude.h"
+#include
+#include
+#include
+#include
+#include
+#include
+
+#ifdef UART2
+#include "posix_qextserialport.h"
+#endif
+
+#define DisTraceMsg() printf("###############TRACE,Line:%d File:%s Fun:%s\n",__LINE__,__FILE__,__FUNCTION__);
+#define DisWarnmsg() printf("~~~~~~~~~~~~~~~WARN,Line:%d File:%s Fun:%s\n",__LINE__,__FILE__,__FUNCTION__);
+#define DisErrorMsg() printf("!!!!!!!!!!!!!!!ERROR! ,Line:%d File:%s Fun:%s\n",__LINE__,__FILE__,__FUNCTION__);
+
+#define PRINT_CTRL_STOP 0
+#define PRINT_CTRL_START 1
+#define PRINT_CTRL_PAUSE 2
+#define PRINT_CTRL_DAC_DISABLE 3
+#define PRINT_CTRL_DAC_ENABLE 4
+#define PRINT_CTRL_STOPSYNCNT 5
+
+
+#define MAX_FPGA_DAC_VALUE_FOR_NEW ((1<<12)*95/100) //由于硬件原因,当DAC大于一定值后,电压不再变化,所以做一下限制
+#define MAX_FPGA_DAC_VALUE_FOR_V1 (255) //老板子的最大值到256
+#define MAX_FPGA_DAC_VALUE ((PRODUCT_VERSION(sysPara->status.fpgaVersionNum) == JETV1)?MAX_FPGA_DAC_VALUE_FOR_V1:MAX_FPGA_DAC_VALUE_FOR_NEW)
+
+#define MAX_POINT_DISTANCE_ADJUST_VAL (1<<10) //点距微调的最大值
+
+#define MAX_MOTOR_RUN_CURRENT 600
+#define MIN_MOTOR_RUN_CURRENT 80
+
+#define MAX_RECLAIM_BLOCK_CNT 5 //500ms
+
+#define MAX_RELEASE_VALVE_DELAY_CNT 4
+/*所有警告都是高电平警告*/
+#define WARN_STATUS_INK_SWINT (1<<7) /*墨线开头,来自喷头,必须开的时候才能打印,关的时候为1,开的时候为0*/
+#define WARN_STATUS_POWER_MON (1<<6) //高压报警
+#define WARN_STATUS_RECYCLE_FAULT (1<<5) //高电平表示有故障
+#define WARN_STATUS_INK_WARN (1<<4)
+#define WARN_STATUS_SOLV_WARN (1<<3)
+#define WARN_STATUS_SUMP_WARN (1<<2) //墨水渗漏
+#define WARN_STATUS_HDINT (1<<1) /*喷头盖,盖上为0,否则为1,必须盖上才能打印,电磁铁有正反面*/
+#define WARN_STATUS_VISCOTITY_MEASURE_READY (1<<0) // 球已经到上位等灯
+
+
+#define FPGA_SYS_HZ 100000000
+
+#define MAX_WR_MEM_SIZE (1<<16) //写空间最大地址范围
+#define MAX_WR_MEM_SIZE_MASK (MAX_WR_MEM_SIZE - 1)
+#define MAX_RD_MEM_SIZE (1<<9) //读空间最大地址范围
+#define MAX_RD_MEM_SIZE_MASK (MAX_RD_MEM_SIZE - 1)
+
+/* am335x core board control pwm output */
+#define VISCO_PUMP_REQUEST "echo 1 > /sys/class/pwm/ecap.2/request"
+#define VISCO_PUMP_RELEASE "echo 0 > /sys/class/pwm/ecap.2/request"
+#define VISCO_PUMP_RUN "echo 1 > /sys/class/pwm/ecap.2/run"
+#define VISCO_PUMP_STOP "echo 0 > /sys/class/pwm/ecap.2/run"
+#define VISCO_PUMP_50Hz "echo 50 > /sys/class/pwm/ecap.2/period_freq"
+#define VISCO_PUMP_50P "echo 50 > /sys/class/pwm/ecap.2/duty_percent"
+#define VISCO_PUMP_HIGH "echo 1 > /sys/class/pwm/ecap.2/polarity"
+#define VISCO_PUMP_LOW "echo 0 > /sys/class/pwm/ecap.2/polarity"
+
+#define SUCTION_PUMP_REQUEST "echo 1 > /sys/class/pwm/ehrpwm.0:1/request"
+#define SUCTION_PUMP_RELEASE "echo 0 > /sys/class/pwm/ehrpwm.0:1/request"
+#define SUCTION_PUMP_RUN "echo 1 > /sys/class/pwm/ehrpwm.0:1/run"
+#define SUCTION_PUMP_STOP "echo 0 > /sys/class/pwm/ehrpwm.0:1/run"
+#define SUCTION_PUMP_HIGH "echo 1 > /sys/class/pwm/ehrpwm.0:1/polarity"
+#define SUCTION_PUMP_LOW "echo 0 > /sys/class/pwm/ehrpwm.0:1/polarity"
+#define SUCTION_PUMP_90P "echo 90 > /sys/class/pwm/ehrpwm.0:1/duty_percent"
+#define SUCTION_PUMP_12000Hz "echo 12000 > /sys/class/pwm/ehrpwm.0:1/period_freq"
+
+#ifdef __ADC_INPUT__
+#define BOART_TEMP_DEVICE "/sys/bus/iio/devices/iio:device0/in_voltage4_raw"
+#define INK_TEMP_DEVICE "/sys/bus/iio/devices/iio:device0/in_voltage5_raw"
+#define REVERSE_TEMP_DEVICE "/sys/bus/iio/devices/iio:device0/in_voltage6_raw"
+#endif
+
+#ifdef UART2
+class UartThread;
+typedef struct {
+ char mode;
+ int addr;
+ int len;
+ char flag_m;
+ QByteArray Buf;
+}rec_cmd_t;
+
+#endif
+
+/*
+ * 请不要直接初始化此函数,如果需要,请通过SysPara的devOP来访问此类
+ * */
+class DevOp : public QObject
+{
+ Q_OBJECT
+public :
+ DevOp(SysPara * sysPara);
+ ~DevOp();
+
+ void set_totalSynPulseNum(bool wren);// 设置可变长度
+ void TTYS0ToConsole();
+ void WriteMoterPump(int);
+ void controlReleaseValve(bool openFlag);
+ void controlMixValve(bool openFlag);
+ void controlInkValve(bool openFlag); //控制墨线,即供墨阀
+ void controlInkValvePWMSTM32(int PWMPulse);
+ void controlCycleValve(bool openFlag);
+ void controlCompressPump(bool openFlag);
+ void controlViscosityPump(bool openFlag);
+ void controlMainInkPump(bool openFlag);
+ void setHighVoltageAmplitudetoSTM32();
+ void controlReclaimPump(bool openFlag,bool fullSpeed);
+ void controlReclaimPump2();
+ void controlInkValvePWM(bool openFlag);
+ void controlInkValvePWM2();
+ void controlHeater(bool openFlag);
+ void controlBeeper(bool openFlag);
+
+ void controlReclaimTankOpen(bool enableFlag);
+ void controlReclaimTankClose(bool enableFlag);
+
+ void powerOff(void);
+
+ bool isReleaseValveOpen();
+ bool isMixValveOpen();
+ bool isInkValveOpen();
+ bool isInkValveOpen1();
+ bool isCycleValveOpen();
+ bool isCompressPumpOpen();
+ bool isViscosityPumpOpen();
+ bool isMainInkPumpOpen();
+ bool isReclaimPumpOpen();
+
+ bool isReclaimTankOpenEnable();
+ bool isReclaimTankCloseEnable();
+ bool isBeeperEnable();
+ bool isHearterEnable();
+
+ int writeFpgaPrintPara(bool ignoreWarn = false);
+ void readFgaStatus(void);
+ void writeDacValue2Fpga_No73();
+
+ void printCtrl(int cmd);
+ void ReadCnt1GroupStatus(void);
+ void writeCnt1GroupSetting(bool bCntByGroupEnable);
+ void writeFpgaCalandar(bool Enable);
+ void writeFpgaVariCtrl();
+ void readCalandarDat();
+ void resumeFault();
+ void highVoltageCtrl(int val);
+ void maxHighVoltageDACCtrl(int val);
+ void setPhaseByHand(int val);
+ void readPhaseDetectHighTm();
+ void setPhaseDetectVoltageDutyCycle(int duty);
+ void setBlickLightPeriod(int value);
+ void setOscillatorVoltage(int value);
+ void setDivideRatio(int value);
+ void setLastLineEndPointFixedValue(int value);
+// void checkAuthorization(QString str);
+
+ void mainInkCtrl();
+ void pumpValveCtrl(int viscosityAdjustByTemp=0);
+ void clearProductCnt(unsigned int mode);
+ unsigned int readFpgaVersionNum(void);
+ void fpgaWr(int addr,unsigned char*dat,int len);
+ void fpgaRd(int addr,unsigned char*dat,int len);
+ void fpgaWrD(int addr,unsigned int dat,int len);
+ void fpgaResetWarning(char mode);
+ bool fpgaDevOpenFlag;
+
+ void stm32Rd(int addr,unsigned char*dat,int len);
+ void stm32Wr(int addr,unsigned char*dat,int len);
+
+ unsigned char memWrMap[MAX_WR_MEM_SIZE];
+ unsigned char memRdMap[MAX_RD_MEM_SIZE];
+ unsigned char color_flag;
+ void controlRedLight(bool openFlag);
+ void controlGreenLight(bool openFlag);
+ void controlYellowLight(bool openFlag);
+ void controlFan1(bool openFlag);
+ void controlFan2(bool openFlag);
+
+ bool isGreenLightEnable();
+ bool isYellowLightEnable();
+ bool isRedLightEnable();
+ void readbuilDat();
+ void readPrintDataXor();
+ void readSyncCounterAtZero();
+ void printCtrl2(int cmd);
+ void ReadSomeDataForLostPrint(void);
+
+ bool stopSendDataFPGA;
+ bool stopSendDataSTM32;
+// unsigned char *dataOfViscosity;
+
+#ifdef __STC_POWER__
+ int Heartbeat(char bPowerOn);
+ int setWakeUpTimer(char wakeUpTime_day);
+ int getPowerSource(void);
+ Posix_QextSerialPort *comForPower;
+ void comForPower_init();
+#endif
+#ifdef __RFID_CARD
+ Posix_QextSerialPort *comForRFID;
+ void comForRFID_init();
+ int comReadRFID_data();
+ int comWriteRFID_data();
+ int setRFIDCarKey(void);
+ int setRFIDReaderKey(void);
+ int setRFIDReaderOriginalKey(void);
+ int setRFIDReaderWorkMode(void);
+ int receiveReadRFID_data(void);
+ int queryReadRFID_address(void);
+ QString strRevdata;
+ bool noticeICReaderError;
+ bool setICReaderModeFlag;
+ uint checkCardIntervalTime;
+ QReadWriteLock CardDataRwLock;
+#endif
+
+#ifdef __ADC_INPUT__
+ qint8 GetTemp(QString ainFile, quint8 *pTemp);
+#endif
+ void Read_RanddomFromFpga(); // 读FPGARANDFIFO
+ void RandTxtBakup(char ok);
+ // 上海外接屏功能
+ int BigDisp(unsigned char Module[], unsigned char Wirediameter[]);
+ int RecDim();//unsigned char buf[], unsigned char Dim[]);
+ int SmallDisp(unsigned char Module[], unsigned char Wirediameter[]);
+ void DatToDisp(char FileName[], bool big);
+ void DatToDisp2();
+ void showData(QByteArray dat);
+ void uart2Init();
+ void writeDacValue2Fpga_No72NewVoltData();
+
+#ifdef UART2
+ Posix_QextSerialPort *myCom;
+ // MySerialPort * myserialport;
+ QByteArray recData;
+ QQueue recQueue;
+ int recLen;
+ void stopReceiving();
+ bool isReceivingEnable() const;
+ void disableReceiving();
+ void enableReceiving();
+
+ uchar sendData(const QByteArray &data);
+
+ void stopSending();
+ bool isSendingEnable() const;
+ void disableSending();
+ void enableSending();
+ uchar uartThreadStart();
+
+ //void printCtrl2(int cmd);
+ int recUart2();
+
+public slots:
+ void readCom(char mode,QByteArray recData,int addr);
+ void sendCom(QString s);
+ void sendCom(char *buf, int len);
+ void resendFPGADate(int,int,unsigned char *,int,int);
+ void resendSTM32Date(int,int,unsigned char *,int,int);
+
+signals:
+ void dataReceived(char,const QByteArray &dataReceived,int);
+ void sendSerialDataToSTM32(int,int,unsigned char *,int,int);
+ void sendSerialDataToFPGA(int,int,unsigned char *,int,int);
+#endif
+
+private:
+ int WdgttyUsb0Cnt;
+ bool releaseValveOpenFlag;
+ bool mixValveFlag;
+ bool inkValveOpenFlag;
+ bool inkValveOpenFlag1;
+ bool cycleValveOpenFlag;
+ bool compressPumpOpenFlag;
+ bool viscosityPumpOpenFlag;
+ bool mainInkPumpOpenFlag;
+ bool reclaimPumpOpenFlag;
+
+ bool reclaimTankOpenEnableFlag;
+ bool reclaimTankCloseEnableFlag;
+ bool beeperOnFlag;
+
+ bool RedLightOnFlag;
+ bool GreenLightOnFlag;
+ bool YellowLightOnFlag;
+
+ bool heaterOnFlag;
+ int com2;
+ int pwm_sp;
+ int pwm_fd;
+ int Interrupt_fd;
+ int iocontrl;
+ int DAdataout;
+int pwm_ink;
+ int adc_fd;
+#ifdef __VX_OSC_VOL__
+ qint8 OscillatorVoltage[100];//VX 电路不一样,所以需要重新调整
+#endif
+ SysPara *sysPara;
+
+
+ unsigned int fpgaRdD(int addr,int len);
+
+// 0xA451--- 为什么ARM的顺序相反呢?
+ typedef struct {
+ unsigned int varDigitalNum:4; // 数字的个数
+ unsigned int charRamBaseAddr:12; // 基址
+ unsigned int colOffset:16; // 列偏移
+ unsigned int horizonWidth:9;//字模宽度
+ unsigned int verticalOffset:6; // 行偏移
+ unsigned int charRowNum:6; // 每个字符占行个数
+ unsigned int charColNum:6; // 每个字符占列个数
+ unsigned int varTypeSel:4;
+ unsigned int dummy:1;
+ }reg_var_print_ctrl_t;
+
+#ifdef UART2
+ UartThread *uartThread;
+ bool sendingEnable;
+ bool receivingEnable;
+ bool saveStateReceiveData;
+#endif
+
+};
+
+
+#ifdef UART2
+class UartThread : public QThread
+{
+ Q_OBJECT
+public:
+ UartThread(Posix_QextSerialPort &adrPort);
+ ~UartThread();
+ void stopReceiving();
+ QQueue dataToSend;
+ QMutex mutexSend;
+ void stopSending();
+ void addDataToSend(const QByteArray &dataToAdd);
+protected:
+ void run();
+signals:
+ void dataReceived(char,const QByteArray &dataReceived,int);
+private :
+ Posix_QextSerialPort &port;
+ QMutex mutexReceive;
+ bool stopped;
+ rec_cmd_t rec_cmd;
+};
+#endif
+#endif /* DEVOP_H_ */
diff --git a/oldProject/DialogAuthorization.cpp b/oldProject/DialogAuthorization.cpp
new file mode 100644
index 0000000..4a80065
--- /dev/null
+++ b/oldProject/DialogAuthorization.cpp
@@ -0,0 +1,28 @@
+#include "DialogAuthorization.h"
+#include "ui_dialogauthorization.h"
+
+DialogAuthorization::DialogAuthorization(QWidget *parent) :
+ QDialog(parent),
+ ui(new Ui::DialogAuthorization)
+{
+ ui->setupUi(this);
+ this->setWindowTitle(tr("输入密码"));
+ this->setFixedSize(this->geometry().width(),this->geometry().height());
+ ui->lineEditAuth->setEchoMode(QLineEdit::Password); // 密码不回显
+
+}
+
+DialogAuthorization::~DialogAuthorization()
+{
+ delete ui;
+}
+
+
+QString DialogAuthorization::getAuth(){
+ return ui->lineEditAuth->text();
+}
+
+void DialogAuthorization::clearAuth(){
+ ui->lineEditAuth->setText(tr(""));
+
+}
diff --git a/oldProject/DialogAuthorization.h b/oldProject/DialogAuthorization.h
new file mode 100644
index 0000000..8185651
--- /dev/null
+++ b/oldProject/DialogAuthorization.h
@@ -0,0 +1,25 @@
+#ifndef DIALOGAUTHORIZATION_H
+#define DIALOGAUTHORIZATION_H
+
+#include
+
+namespace Ui {
+class DialogAuthorization;
+}
+
+class DialogAuthorization : public QDialog
+{
+ Q_OBJECT
+
+public:
+ explicit DialogAuthorization(QWidget *parent = 0);
+ ~DialogAuthorization();
+
+ QString getAuth();
+ void clearAuth();
+private:
+ Ui::DialogAuthorization *ui;
+ //QTimer time1;
+};
+
+#endif // DIALOGAUTHORIZATION_H
diff --git a/oldProject/DialogAuthorizationPrint.cpp b/oldProject/DialogAuthorizationPrint.cpp
new file mode 100644
index 0000000..73f79c3
--- /dev/null
+++ b/oldProject/DialogAuthorizationPrint.cpp
@@ -0,0 +1,28 @@
+#include "DialogAuthorizationPrint.h"
+#include "ui_dialogAuthorizationPrint.h"
+
+DialogAuthorizationPrint::DialogAuthorizationPrint(QWidget *parent) :
+ QDialog(parent),
+ ui(new Ui::DialogAuthorizationPrint)
+{
+ ui->setupUi(this);
+ this->setWindowTitle(tr("请输入打印密码"));
+ this->setFixedSize(this->geometry().width(),this->geometry().height());
+ ui->lineEditAuth->setEchoMode(QLineEdit::Password); // 密码不回显
+
+}
+
+DialogAuthorizationPrint::~DialogAuthorizationPrint()
+{
+ delete ui;
+}
+
+
+QString DialogAuthorizationPrint::getAuth(){
+ return ui->lineEditAuth->text();
+}
+
+void DialogAuthorizationPrint::clearAuth(){
+ ui->lineEditAuth->setText(tr(""));
+
+}
diff --git a/oldProject/DialogAuthorizationPrint.h b/oldProject/DialogAuthorizationPrint.h
new file mode 100644
index 0000000..3205746
--- /dev/null
+++ b/oldProject/DialogAuthorizationPrint.h
@@ -0,0 +1,25 @@
+#ifndef DIALOGAUTHORIZATIONPRINT_H
+#define DIALOGAUTHORIZATIONPRINT_H
+
+#include
+
+namespace Ui {
+class DialogAuthorizationPrint;
+}
+
+class DialogAuthorizationPrint : public QDialog
+{
+ Q_OBJECT
+
+public:
+ explicit DialogAuthorizationPrint(QWidget *parent = 0);
+ ~DialogAuthorizationPrint();
+
+ QString getAuth();
+ void clearAuth();
+private:
+ Ui::DialogAuthorizationPrint *ui;
+ //QTimer time1;
+};
+
+#endif // DIALOGAUTHORIZATIONPRINT_H
diff --git a/oldProject/DialogFileOperation.cpp b/oldProject/DialogFileOperation.cpp
new file mode 100644
index 0000000..680ccb8
--- /dev/null
+++ b/oldProject/DialogFileOperation.cpp
@@ -0,0 +1,354 @@
+#include "DialogFileOperation.h"
+#include "ui_dialogfileoperation.h"
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include"HtmlDelegate.h"
+#include"myinclude.h"
+#include
+#include
+
+DialogFileOperation::DialogFileOperation(QWidget *parent) :
+ QDialog(parent),
+ ui(new Ui::DialogFileOperation)
+{
+ ui->setupUi(this);
+ this->setWindowTitle(tr("文件操作"));
+ ui->textEditView->setReadOnly(true);
+ ui->textEditView->setLineWrapMode(QTextEdit::NoWrap);
+ ui->textEditView->document()->setDocumentMargin(0);
+ this->setFixedSize(this->geometry().width(),this->geometry().height());
+ EditMode=4;
+}
+
+void DialogFileOperation::refreshListView(int mode){
+
+ QString dirPath = ui->radioButtonLocal->isChecked()?DOC_ROOT_DIR:UDISK_DOC_ROOT_DIR;
+ QDir dir(dirPath);
+ QStringList filters;
+ EditMode = mode;
+ if(mode==TXTFILE) filters << "*.html" << "*.txt" << "*.TXT" << "*.jpeg" << "*.gif" << "*.jpg" << "*.bmp"<< "*.BMP"<< "*.bin"; // txtmode
+// else if(mode==PICFILE) filters << "*.png";// <<"*.jpg" ; // picmode
+ else if(mode==PICFILE) filters << "*.png" << "*.jpeg" << "*.gif" << "*.jpg" << "*.bmp"<< "*.BMP";
+ else if(mode==SCENE) filters << "*.xml";
+ else filters << "*.html" << "*.bmp" << "*.BMP"<<"*.jpg"<<"*.gif";
+ dir.setNameFilters(filters);
+ dir.setFilter(QDir::Files);
+#ifndef EnableArabic
+ QStringListModel *model = new QStringListModel(dir.entryList());
+#else
+ QStringList entries=dir.entryList();
+ QStandardItemModel *model = new QStandardItemModel();
+ for(int i=0;i%1%2").arg(subname).arg(subsuffix2);
+ QStandardItem *item2 = new QStandardItem(stringhtml);
+ model->appendRow(item2);
+ }
+ }else{
+ model->appendRow(item1);
+ }
+ }
+ }
+ ui->listViewFile->setItemDelegate(new HtmlDelegate);
+#endif
+
+ ui->listViewFile->setEditTriggers(QAbstractItemView::NoEditTriggers);
+ ui->listViewFile->setModel(model); //useList是个QListView
+ int count = ui->listViewFile->model()->rowCount();
+ if(count){
+ QModelIndex index = ui->listViewFile->model()->index(0 , 0);
+ ui->listViewFile->setCurrentIndex(index);
+ on_listViewFile_entered(index);
+ }
+}
+
+
+DialogFileOperation::~DialogFileOperation()
+{
+ delete ui;
+}
+
+void DialogFileOperation::on_listViewFile_entered(const QModelIndex &index)
+{
+#ifdef EnableArabic
+ QString fileName=index.data().toString();
+ if(fileName.endsWith("")){
+ QTextDocument doc;
+ doc.setHtml(fileName);
+ fileName= doc.toPlainText();
+ int position = fileName.lastIndexOf(".");
+ fileName.insert(position,".a");
+ }
+#endif
+ QString dirPath = ui->radioButtonLocal->isChecked()?DOC_ROOT_DIR:UDISK_DOC_ROOT_DIR;
+#ifndef EnableArabic
+ QString filePath = dirPath + index.data().toString();
+#else
+ QString filePath = dirPath + fileName;
+#endif
+ if(filePath.endsWith(".gif") || filePath.endsWith(".jpeg") || filePath.endsWith(".jpg") ||
+ filePath.endsWith(".png") || filePath.endsWith(".bmp")|| filePath.endsWith(".BMP")|| filePath.endsWith(".nda")){
+ ui->textEditView->clear();
+ ui->textEditView->setHtml(QString("
").arg(filePath));
+ }
+ else if(filePath.endsWith(".xml"))
+ {
+ emit createSceneImage(filePath);
+ ui->textEditView->setHtml(QString("
").arg("./printSceneView.png"));
+ }
+ else {
+ QFile file(filePath);
+ if (!file.open(QFile::ReadOnly))
+ return ;
+ if (filePath.endsWith(".txt") || filePath.endsWith(".TXT"))
+ {
+ qint64 size = file.size();
+ if(size/1024 > 10)
+ {
+ return;
+ }
+ }
+ QByteArray data = file.readAll();
+ QTextCodec *codec = Qt::codecForHtml(data);
+ QString str = codec->toUnicode(data);
+ if (Qt::mightBeRichText(str)) {
+ if(!ui->radioButtonLocal->isChecked())
+ str.replace(DOC_ROOT_DIR,UDISK_DOC_ROOT_DIR); //必须替换相应的路径
+ ui->textEditView->setHtml(str);
+ } else {
+ str = QString::fromLocal8Bit(data);
+ ui->textEditView->setPlainText(str);
+ }
+ }
+}
+void DialogFileOperation::on_listViewFile_clicked(const QModelIndex &index)
+{
+ on_listViewFile_entered(index);
+}
+
+void DialogFileOperation::on_pushButtonNext_pressed()
+{
+ QModelIndex currIndex = ui->listViewFile->currentIndex();
+ int count = ui->listViewFile->model()->rowCount();
+ if(count){
+ QModelIndex index = ui->listViewFile->model()->index((currIndex.row() + 1)%count, 0);
+ ui->listViewFile->setCurrentIndex(index);
+ on_listViewFile_entered(index);
+ }
+}
+
+
+void DialogFileOperation::on_pushButtonLast_pressed()
+{
+ QModelIndex currIndex = ui->listViewFile->currentIndex();
+ int count = ui->listViewFile->model()->rowCount();
+ if(count){
+ QModelIndex index = ui->listViewFile->model()->index(currIndex.row() == 0?(count - 1):(currIndex.row() - 1), 0);
+ ui->listViewFile->setCurrentIndex(index);
+ on_listViewFile_entered(index);
+ }
+}
+
+void DialogFileOperation::on_pushButtonExit_pressed()
+{
+ hide();
+}
+
+void DialogFileOperation::on_pushButtonDelFile_pressed()
+{
+ QMessageBox::StandardButton ret;
+ ret = QMessageBox::warning(this, tr("警告"),
+ tr("是否确认删除当前文件?"),
+ QMessageBox::Ok | QMessageBox::Cancel);
+ if (ret == QMessageBox::Ok){
+ QModelIndex index = ui->listViewFile->currentIndex();
+ int currRow = index.row();
+ QString dirPath = ui->radioButtonLocal->isChecked()?DOC_ROOT_DIR:UDISK_DOC_ROOT_DIR;
+#ifndef EnableArabic
+ QString filePath = dirPath + index.data().toString();
+#else
+ QString fileName=index.data().toString();
+ if(fileName.endsWith("")){
+ QTextDocument doc;
+ doc.setHtml(fileName);
+ fileName= doc.toPlainText();
+ int position = fileName.lastIndexOf(".");
+ fileName.insert(position,".a");
+ }
+ QString filePath=dirPath+fileName;
+#endif
+ QFile file(filePath);
+ if(!QFileInfo(filePath).baseName().startsWith("UP")){
+ if(file.exists())file.remove();
+ file.setFileName(PARA_ROOT_DIR + QFileInfo(filePath).baseName()+".dpn" );
+ //file.setFileName( PARA_ROOT_DIR + QFileInfo(filePath).baseName()+".dpn" );
+ if(file.exists())file.remove();
+ }
+
+ //Public::resetPara(); // 20140923 这个BUG导致系统参数被恢复
+ refreshListView(EditMode);
+ int count = ui->listViewFile->model()->rowCount();
+ if(count){
+ index = ui->listViewFile->model()->index((currRow > (count - 1))?(count - 1):currRow , 0);
+ ui->listViewFile->setCurrentIndex(index);
+ on_listViewFile_entered(index);
+ }
+ }
+
+}
+
+void DialogFileOperation::on_pushButtonDelAll_pressed()
+{
+ QMessageBox::StandardButton ret;
+ ret = QMessageBox::warning(this, tr("警告"),
+ tr("是否确认删除所有文件?"),
+ QMessageBox::Ok | QMessageBox::Cancel);
+ if (ret == QMessageBox::Ok){
+ QString dirPath = ui->radioButtonLocal->isChecked()?DOC_ROOT_DIR:UDISK_DOC_ROOT_DIR;
+ // 删除所有文件的方法要改进
+
+ system((char *)((QString("mkdir %1").arg(TESTDIR)).toLatin1().data()));
+ system((char *)((QString("cp %1/UP* %2/. ").arg(DOC_ROOT_DIR).arg(TESTDIR)).toLatin1().data())); //先备份UP*
+
+ system((char *)((QString("rm %1/*.*").arg(dirPath)).toLatin1().data()));// 删除所有打印文件
+
+ system((char *)((QString("rm %1*.ini").arg(PARA_ROOT_DIR)).toLatin1().data())); // 删除所有参数文件
+ system((char *)((QString("rm %1*.dpn").arg(PARA_ROOT_DIR)).toLatin1().data()));
+
+ system((char *)((QString("cp %1/UP.* %1/UP1.* %2/. ").arg(TESTDIR).arg(DOC_ROOT_DIR)).toLatin1().data()));
+ //system((char *)((QString("cp %1* %2/. ").arg(TESTDIR).arg(PARA_ROOT_DIR)).toLatin1().data()));
+ refreshListView(EditMode);
+ }
+}
+
+void DialogFileOperation::on_pushButtonImport_pressed()
+{
+ QMessageBox::StandardButton ret;
+ ret = QMessageBox::information(this, tr("提示"),
+ tr("是否确认从U盘导入所有文件?"),
+ QMessageBox::Ok | QMessageBox::Cancel);
+ if (ret == QMessageBox::Ok){
+ system((char *)((tr("mv %1/VoltParaHi.bin %1/VoltParaStd.bin %2/").arg(UDISK_DOC_ROOT_DIR).arg(PARA_ROOT_DIR)).toLatin1().data()));//把参数文件移动到参数目录下
+ system((char *)((tr("cp %1/* %2/").arg(UDISK_DOC_ROOT_DIR).arg(DOC_ROOT_DIR)).toLatin1().data()));
+ refreshListView(EditMode);
+ QMessageBox::information(this, tr("提示"),
+ tr("成功从U盘导入?"));
+ }
+}
+
+void DialogFileOperation::on_pushButtonExport_pressed()
+{
+ QMessageBox::StandardButton ret;
+ ret = QMessageBox::information(this, tr("提示"),
+ tr("是否确认将所有文件导出到U盘?"),
+ QMessageBox::Ok | QMessageBox::Cancel);
+ if (ret == QMessageBox::Ok){
+ QString dirPath = ui->radioButtonLocal->isChecked()?DOC_ROOT_DIR:UDISK_DOC_ROOT_DIR;
+ QDir dir(UDISK_DOC_ROOT_DIR);
+ if(!dir.exists()){
+ // system((char *)((QString("mkdir -p %1").arg(UDISK_DOC_ROOT_DIR)).toLatin1().data()));
+ system((char *)((QString("mkdir -p %1").arg(UDISK_DOC_ROOT_DIR)).toLocal8Bit().data()));
+ }
+
+ if(!dir.exists()){
+ QMessageBox::warning(this,tr("警告"),tr("U盘doc目录创建失败"));
+ return;
+ }
+
+// QDir dirCONF(UDISK_CONF_ROOT_DIR);
+// if(!dirCONF.exists()){
+// system((char *)((QString("mkdir -p %1").arg(UDISK_CONF_ROOT_DIR)).toLatin1().data()));
+// }
+// system((char *)((QString("cp %1/* %2/").arg(DOC_ROOT_DIR).arg(UDISK_DOC_ROOT_DIR)).toLatin1().data()));
+ system((char *)((QString("cp %1/* %2/").arg(DOC_ROOT_DIR).arg(UDISK_DOC_ROOT_DIR)).toLocal8Bit().data()));
+// system((char *)((QString("cp %1/* %2/").arg("/home/plg/conf/").arg(UDISK_CONF_ROOT_DIR)).toLatin1().data()));
+ system("sync");
+
+ refreshListView(EditMode);
+ QMessageBox::information(this, tr("提示"),
+ tr("成功导出到U盘?"));
+ }
+}
+
+void DialogFileOperation::on_pushButtonInsert_clicked()
+{
+ QModelIndex index = ui->listViewFile->currentIndex();
+ QString dirPath = ui->radioButtonLocal->isChecked()?DOC_ROOT_DIR:UDISK_DOC_ROOT_DIR;
+#ifndef EnableArabic
+ QString filePath = dirPath + index.data().toString();
+#else
+ QString fileName=index.data().toString();
+ if(fileName.endsWith("")){
+ QTextDocument doc;
+ doc.setHtml(fileName);
+ fileName= doc.toPlainText();
+ int position = fileName.lastIndexOf(".");
+ fileName.insert(position,".a");
+ }
+ QString filePath = dirPath + fileName;
+#endif
+ emit openFile(filePath,true);
+ hide();
+}
+
+void DialogFileOperation::on_pushButtonOpen_clicked()
+{
+ QModelIndex index = ui->listViewFile->currentIndex();
+ QString dirPath = ui->radioButtonLocal->isChecked()?DOC_ROOT_DIR:UDISK_DOC_ROOT_DIR;
+#ifndef EnableArabic
+ QString filePath = dirPath + index.data().toString();
+#else
+ QString fileName=index.data().toString();
+ if(fileName.endsWith("")){
+ QTextDocument doc;
+ doc.setHtml(fileName);
+ fileName= doc.toPlainText();
+ int position = fileName.lastIndexOf(".");
+ fileName.insert(position,".a");
+ }
+ QString filePath = dirPath + fileName;
+#endif
+ emit openFile(filePath,false);
+ hide();
+}
+
+void DialogFileOperation::on_radioButtonLocal_released()
+{
+ refreshListView(EditMode);
+}
+
+void DialogFileOperation::on_radioButtonUdisk_released()
+{
+
+ QDir dir(UDISK_DOC_ROOT_DIR);
+ if(!dir.exists()){
+ dir.mkdir("/udisk/doc");
+ QMessageBox::warning(0,tr("警告"),tr("U盘未插入或U盘根目录下的doc文件夹不存在!"));
+ }
+ refreshListView(EditMode);
+}
+
+void DialogFileOperation::modbus_openfile(QString filename)
+{
+ emit openFile(filename,true);
+}
diff --git a/oldProject/DialogFileOperation.h b/oldProject/DialogFileOperation.h
new file mode 100644
index 0000000..1ab92ce
--- /dev/null
+++ b/oldProject/DialogFileOperation.h
@@ -0,0 +1,68 @@
+#ifndef DIALOGFILEOPERATION_H
+#define DIALOGFILEOPERATION_H
+
+#include
+#include "DialogFileOperation.h"
+#include
+namespace Ui {
+class DialogFileOperation;
+}
+
+class DialogFileOperation : public QDialog
+{
+ Q_OBJECT
+
+public:
+ explicit DialogFileOperation(QWidget *parent = 0);
+ ~DialogFileOperation();
+ void refreshListView(int mode);
+ void modbus_openfile(QString filename);
+ int EditMode;
+private slots:
+
+
+ void on_pushButtonNext_pressed();
+
+ void on_pushButtonLast_pressed();
+
+ void on_pushButtonExit_pressed();
+
+ void on_pushButtonDelFile_pressed();
+
+ void on_pushButtonDelAll_pressed();
+
+ void on_pushButtonImport_pressed();
+
+ void on_pushButtonExport_pressed();
+
+ void on_pushButtonInsert_clicked();
+
+ void on_pushButtonOpen_clicked();
+
+ void on_radioButtonLocal_released();
+
+ void on_radioButtonUdisk_released();
+
+
+
+ void on_listViewFile_entered(const QModelIndex &index);
+
+ void on_listViewFile_clicked(const QModelIndex &index);
+
+Q_SIGNALS:
+ void openFile(QString filePath,bool insertFlag);
+ void createSceneImage(QString filePath);
+
+private:
+ Ui::DialogFileOperation *ui;
+};
+
+#endif // DIALOGFILEOPERATION_H
+
+
+
+
+
+
+
+
diff --git a/oldProject/DialogFontSize.cpp b/oldProject/DialogFontSize.cpp
new file mode 100644
index 0000000..32f9eec
--- /dev/null
+++ b/oldProject/DialogFontSize.cpp
@@ -0,0 +1,461 @@
+#include "DialogFontSize.h"
+#include "ui_dialogfontsize.h"
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include "myinclude.h"
+#include "Public.h"
+
+DialogFontSize::DialogFontSize(QWidget *parent) :
+ QDialog(parent),
+ ui(new Ui::DialogFontSize)
+{
+ ui->setupUi(this);
+ this->setFixedSize(this->geometry().width(),this->geometry().height());
+ this->setWindowTitle(tr("选择字体大小"));
+
+ font.setFamily("WenQuanYi12");
+ QString langurageType = Public::ReadLanguageName();
+ if(langurageType != "English" && langurageType != "Chinese")
+ font.setFamily("Yanglabeldot12");
+ font.setPixelSize(12);
+ ui->lineEdit->setFont(font);
+
+ connect(ui->radioButton7Bangla,SIGNAL(clicked(bool)),this,SLOT(Button7HoriR(bool)));
+ connect(ui->radioButton7PointNum,SIGNAL(clicked(bool)),this,SLOT(Button7HoriR(bool)));
+
+ connect(ui->radioButton5Point,SIGNAL(clicked(bool)),this,SLOT(Button7HoriL(bool)));
+ connect(ui->radioButton7Point,SIGNAL(clicked(bool)),this,SLOT(Button7HoriR(bool)));
+
+ connect(ui->radioButton9Point,SIGNAL(clicked(bool)),this,SLOT(Button7HoriL(bool)));
+ connect(ui->radioButton12Point,SIGNAL(clicked(bool)),this,SLOT(Button7HoriR(bool)));
+
+ connect(ui->radioButton16Point,SIGNAL(clicked(bool)),this,SLOT(Button7HoriL(bool)));
+ connect(ui->radioButton24Point,SIGNAL(clicked(bool)),this,SLOT(Button7HoriR(bool)));
+ connect(ui->radioButton21PointNum,SIGNAL(clicked(bool)),this,SLOT(Button7HoriR(bool)));
+ connect(ui->radioButton32Point,SIGNAL(clicked(bool)),this,SLOT(Button7HoriR(bool)));
+
+#ifdef VNLGXX
+ ui->checkBoxBold->hide();
+ ui->radioButton5Point->hide();
+ ui->radioButton7Point->hide();
+ ui->radioButton9Point->hide();
+ ui->radioButton12Point->hide();
+ ui->radioButton16Point->hide();
+ ui->radioButton24Point->hide();
+#else
+// ui->checkBoxBold->hide();
+// ui->labelFont->hide();
+// ui->fontComboBox->hide();
+// ui->comboBoxFontSize->hide();
+#endif
+ GetFileInfo();
+ flagOfLeft = false;
+ flagOfRight = false;
+
+#ifdef EnableBangla
+ ui->radioButton7Bangla->setEnabled(1);
+#else
+ ui->radioButton7Bangla->setEnabled(0);
+#endif
+ //ui->checkBox_Left->setStyleSheet("QCheckBox { font-size: 24pt; }");
+
+}
+
+DialogFontSize::~DialogFontSize()
+{
+ delete ui;
+}
+
+void DialogFontSize::Button7HoriL(bool ok){
+ int pixsize;
+ getValue(&pixsize);
+
+
+ //qDebug()<lineEdit->font().family()<lineEdit->font().pixelSize();
+
+
+}
+
+void DialogFontSize::Button7HoriR(bool ok){
+ int pixsize;
+ getValue(&pixsize);
+
+ //qDebug()<lineEdit->font().family()<lineEdit->font().pixelSize();
+}
+
+void DialogFontSize::ChangeFont(QString fontFamily){
+
+ font.setFamily(fontFamily);
+
+ //font.setPixelSize(pixelSize);
+ ui->lineEdit->setFont(font); // 设置预览字体
+
+// if(fontFamily=="wenquanyi" ){
+// ui->comboBoxFontSize->clear();
+// ui->comboBoxFontSize->addItem("12");
+// ui->comboBoxFontSize->addItem("16");
+// //ui->comboBoxFontSize->addItem("12");
+
+
+// }
+// else if(fontFamily=="biyang"){
+// ui->comboBoxFontSize->clear();
+// ui->comboBoxFontSize->addItem("5");
+// ui->comboBoxFontSize->addItem("7");
+// ui->comboBoxFontSize->addItem("9");
+// //ui->comboBoxFontSize->addItem("10");
+
+// }
+// else {
+// ui->comboBoxFontSize->clear();
+// ui->comboBoxFontSize->addItem("14");
+// ui->comboBoxFontSize->addItem("16");
+// ui->comboBoxFontSize->addItem("18");
+// ui->comboBoxFontSize->addItem("20");
+// ui->comboBoxFontSize->addItem("24");
+// ui->comboBoxFontSize->addItem("28");
+// ui->comboBoxFontSize->addItem("32");
+// ui->comboBoxFontSize->addItem("36");
+// }
+
+}
+
+void DialogFontSize::GetFileInfo(){
+ QString fileName;
+ QString fileDate="";
+ QString fontPath="/usr/local/Trolltech/QtEmbedded-4.6.3-arm/lib/fonts/";
+ QDir FontsFile("/usr/local/Trolltech/QtEmbedded-4.6.3-arm/lib/fonts/");
+ if(FontsFile.exists("/usr/local/Trolltech/QtEmbedded-4.6.3-arm/lib/fonts/"))//2451
+ {
+ fontPath = "/usr/local/Trolltech/QtEmbedded-4.6.3-arm/lib/fonts/";
+ }
+ if(FontsFile.exists("/usr/lib/fonts/"))//am335x
+ {
+ fontPath = "/usr/lib/fonts/";
+ }
+ fileName.sprintf("_%d_50.qpf2",font.pixelSize());
+ QFileInfo fileInfo;
+
+ if(font.family()=="SerifL")
+ fileName = fontPath +"serifl_7_50.qpf2";
+ else if(font.family()=="SerifR")
+ fileName = fontPath +"serifr_7_50.qpf2";
+ else if(font.family()=="SerifL9")
+ fileName = fontPath +"serifl_9_50.qpf2";
+ else if(font.family()=="SerifR9")
+ fileName = fontPath +"serifr_9_50.qpf2";
+ else fileName = fontPath +font.family()+fileName;
+ fileInfo.setFile(fileName);
+ QDateTime dt= fileInfo.created();
+ //fileInfo.lastModified();
+ QString s = dt.toString("yyyy-MM-dd hh:mm:ss");
+ //qDebug()<<"GetFileInfo"<labFontInfo->setText(fileInfo.fileName()+" "+s+"");
+ ui->labFontInfo->setText( QString("%1").arg(chsum));
+}
+/*
+void DialogFontSize::getValue(int *size){
+ int pixelSize = 12;
+ bool ok;
+ font.setFamily("wenquanyi");
+#ifdef VNLGXX
+
+ int n = ui->comboBoxFontSize->currentText().toInt(&ok,10);
+ if(ok) pixelSize = n;
+
+#else
+ if(ui->radioButton5Point->isChecked()){
+ pixelSize = 5;
+ font.setFamily("biyang");
+ }
+ else if(ui->radioButton7Point->isChecked()){
+ pixelSize = 7;
+ font.setFamily("biyang");
+ }
+ else if(ui->radioButton9Point->isChecked()){
+ pixelSize = 9;
+ font.setFamily("biyang");
+ }
+ else if(ui->radioButton12Point->isChecked()){
+ pixelSize = 12;
+
+ }
+ else if(ui->radioButton16Point->isChecked()){
+ pixelSize = 16;
+ }
+ else if(ui->radioButton24Point->isChecked()){
+ pixelSize = 24;
+ }
+ else if(ui->radioButton7HoriL->isChecked()){
+ pixelSize = 5;
+ font.setFamily("SerifL");
+
+ }
+ else if(ui->radioButton7HoriR->isChecked()){
+ pixelSize = 5;
+ font.setFamily("SerifR");
+ }
+ else if(ui->radioButton9HoriL->isChecked()){
+ pixelSize = 7;
+ font.setFamily("SerifL9");
+
+ }
+ else if(ui->radioButton9HoriR->isChecked()){
+ pixelSize = 7;
+ font.setFamily("SerifR9");
+ }
+ else if(ui->radioButton7Bangla->isChecked()){
+ pixelSize = 7;
+ font.setFamily("bangla");
+ }
+ else if(ui->radioButton7PointNum->isChecked()){
+ pixelSize = 7;
+ font.setFamily("biyangF");
+ }
+ else if(ui->radioButton21PointNum->isChecked()){
+ pixelSize = 24;
+ font.setFamily("biyangF");
+ }
+ else if(ui->radioButton12NewRoman->isChecked()){
+ pixelSize = 12;
+ font.setFamily("Roman");
+ }
+ else if(ui->radioButton32Point->isChecked()){
+ pixelSize = 32;
+ }
+
+// radioButton7Hori
+// else if(ui->radioButton28Point->isChecked()){
+// pixelSize = 28;
+// }
+// else if(ui->radioButton32Point->isChecked()){
+// pixelSize = 32;
+// }
+
+#endif
+
+ font.setPixelSize(pixelSize);
+ ui->lineEdit->setFont(font); // 设置预览字体
+
+ *size = pixelSize;
+
+
+}
+*/
+
+void DialogFontSize::getValue(int *size){
+ int pixelSize = 12;
+ bool ok;
+ font.setFamily("WenQuanYi12");
+
+ if(ui->radioButton5Point->isChecked()){
+ pixelSize = 5;
+ if(flagOfLeft){
+ font.setFamily("biyangL");
+ }
+ else if(flagOfRight){
+ font.setFamily("biyangR");
+ }else{
+ font.setFamily("WenQuanYi5");
+ }
+ }
+ else if(ui->radioButton7Point->isChecked()){
+ pixelSize = 7;
+ if(flagOfLeft){
+ font.setFamily("biyangL");
+ }
+ else if(flagOfRight){
+ font.setFamily("biyangR");
+ }else{
+ font.setFamily("WenQuanYi7");
+ }
+ }
+ else if(ui->radioButton9Point->isChecked()){
+ pixelSize = 9;
+ if(flagOfLeft){
+ font.setFamily("biyangL");
+ }
+ else if(flagOfRight){
+ font.setFamily("biyangR");
+ }else{
+ font.setFamily("Dinkie9");
+ }
+ }
+ else if(ui->radioButton12Point->isChecked()){
+ pixelSize = 12;
+ if(flagOfLeft){
+ font.setFamily("wenquanyiL");
+ }
+ if(flagOfRight){
+ font.setFamily("wenquanyiR");
+ }
+ else{
+ font.setFamily("WenQuanYi12");
+ }
+ }
+ else if(ui->radioButton16Point->isChecked()){
+ pixelSize = 16;
+ if(flagOfLeft){
+ font.setFamily("wenquanyiL");
+ }
+ else if(flagOfRight){
+ font.setFamily("wenquanyiR");
+ }
+ else{
+ font.setFamily("WenQuanYi16");
+ }
+ }
+ else if(ui->radioButton24Point->isChecked()){
+ pixelSize = 24;
+ if(flagOfLeft){
+ font.setFamily("wenquanyiL");
+ }
+ if(flagOfRight){
+ font.setFamily("wenquanyiR");
+ }
+ else{
+ font.setFamily("WenQuanYi24");
+ }
+ }
+
+ else if(ui->radioButton7Bangla->isChecked()){
+ pixelSize = 7;
+ font.setFamily("bangla");
+ }
+ else if(ui->radioButton7PointNum->isChecked()){
+ pixelSize = 7;
+ font.setFamily("biyangF");
+ }
+ else if(ui->radioButton21PointNum->isChecked()){
+ pixelSize = 24;
+ font.setFamily("biyangF");
+ }
+ else if(ui->radioButton12NewRoman->isChecked()){
+ pixelSize = 12;
+ font.setFamily("Roman");
+ }
+ else if(ui->radioButton32Point->isChecked()){
+ pixelSize = 32;
+ font.setFamily("WenQuanYi32");
+ }
+
+ font.setPixelSize(pixelSize);
+ ui->lineEdit->setFont(font); // 设置预览字体
+ *size = pixelSize;
+}
+
+void DialogFontSize::setValue(int value){
+
+#ifdef VNLGXX
+ //QString s;
+ //s.sprintf("%d",value);
+ //ui->comboBoxFontSize->setEditText(s);
+ //if(value<12) ui->fontComboBox->setCurrentIndex(0);
+
+#else
+ if(value == 5 && font.family()=="biyang"){
+ ui->radioButton5Point->setChecked(true);
+ }
+// else if(value == 5 && font.family()=="SerifL"){
+// ui->radioButton7HoriL->setChecked(true);
+// }
+// else if(value == 5 && font.family()=="SerifR" ){
+// ui->radioButton7HoriR->setChecked(true);
+
+// }
+// else if(value == 7 && font.family()=="SerifL9"){
+// ui->radioButton9HoriL->setChecked(true);
+
+// }
+// else if(value == 7 && font.family()=="SerifR9"){
+// ui->radioButton9HoriR->setChecked(true);
+
+// }
+ else if(value == 7 && font.family()=="bangla"){
+ ui->radioButton7Bangla->setChecked(true);
+ }
+ else if(value == 7 && font.family()=="biyangF"){
+ ui->radioButton7PointNum->setChecked(true);
+ }
+ else if(value == 21 && font.family()=="biyangF"){
+ ui->radioButton21PointNum->setChecked(true);
+ }
+ else if(value == 12 && font.family()=="Roman"){
+ ui->radioButton12NewRoman->setChecked(true);
+ }
+ else if(value == 7){
+ ui->radioButton7Point->setChecked(true);
+ }
+ else if(value == 9){
+ ui->radioButton9Point->setChecked(true);
+ }
+ else if(value == 12){
+ ui->radioButton12Point->setChecked(true);
+ }
+ else if(value == 16){
+ ui->radioButton16Point->setChecked(true);
+ }
+
+ else if(value == 24){
+ ui->radioButton24Point->setChecked(true);
+ }
+ else if(value == 32){
+ ui->radioButton32Point->setChecked(true);
+ }
+ /*
+ else if(value == 28){
+ ui->radioButton28Point->setChecked(true);
+ }
+ else if(value == 32){
+ ui->radioButton32Point->setChecked(true);
+ }
+ */
+
+#endif
+
+}
+
+QString DialogFontSize::getFontFamily(){
+
+ return ui->lineEdit->font().family();
+}
+
+QFont DialogFontSize::getFont(){
+
+ return ui->lineEdit->font();
+}
+
+void DialogFontSize::on_pushButton_pressed()
+{
+ GetFileInfo();// 显示字库校验码
+}
+
+void DialogFontSize::on_checkBox_Left_clicked()
+{
+ ui->checkBox_Right->setChecked(false);
+ flagOfRight = false;
+ flagOfLeft = !flagOfLeft;
+ int pixsize;
+ getValue(&pixsize);
+}
+
+void DialogFontSize::on_checkBox_Right_clicked()
+{
+ ui->checkBox_Left->setChecked(false);
+ flagOfLeft = false;
+ flagOfRight = !flagOfRight;
+ int pixsize;
+ getValue(&pixsize);
+}
diff --git a/oldProject/DialogFontSize.h b/oldProject/DialogFontSize.h
new file mode 100644
index 0000000..99c74ce
--- /dev/null
+++ b/oldProject/DialogFontSize.h
@@ -0,0 +1,43 @@
+#ifndef DIALOGFONTSIZE_H
+#define DIALOGFONTSIZE_H
+
+#include
+
+namespace Ui {
+class DialogFontSize;
+}
+
+class DialogFontSize : public QDialog
+{
+ Q_OBJECT
+
+public:
+ explicit DialogFontSize(QWidget *parent = 0);
+ ~DialogFontSize();
+ void getValue(int *size);
+ void setValue(int value);
+ QFont font;
+ QString getFontFamily();
+ QFont getFont();
+
+ void GetFileInfo();//String fileName, String fileDate
+
+public slots:
+ void ChangeFont(QString fontFamily);
+ void Button7HoriL(bool ok);
+ void Button7HoriR(bool ok);
+
+private slots:
+ void on_pushButton_pressed();
+
+ void on_checkBox_Left_clicked();
+
+ void on_checkBox_Right_clicked();
+
+private:
+ Ui::DialogFontSize *ui;
+ bool flagOfLeft;
+ bool flagOfRight;
+};
+
+#endif // DIALOGFONTSIZE_H
diff --git a/oldProject/DialogInputTxt.cpp b/oldProject/DialogInputTxt.cpp
new file mode 100644
index 0000000..0906cdb
--- /dev/null
+++ b/oldProject/DialogInputTxt.cpp
@@ -0,0 +1,14 @@
+#include "DialogInputTxt.h"
+#include "ui_DialogInputTxt.h"
+
+DialogInputTxt::DialogInputTxt(QWidget *parent) :
+ QDialog(parent),
+ ui(new Ui::DialogInputTxt)
+{
+ ui->setupUi(this);
+}
+
+DialogInputTxt::~DialogInputTxt()
+{
+ delete ui;
+}
diff --git a/oldProject/DialogInputTxt.h b/oldProject/DialogInputTxt.h
new file mode 100644
index 0000000..bd0e63b
--- /dev/null
+++ b/oldProject/DialogInputTxt.h
@@ -0,0 +1,22 @@
+#ifndef DIALOGINPUTTXT_H
+#define DIALOGINPUTTXT_H
+
+#include
+
+namespace Ui {
+ class DialogInputTxt;
+}
+
+class DialogInputTxt : public QDialog
+{
+ Q_OBJECT
+
+public:
+ explicit DialogInputTxt(QWidget *parent = 0);
+ ~DialogInputTxt();
+
+private:
+ Ui::DialogInputTxt *ui;
+};
+
+#endif // DIALOGINPUTTXT_H
diff --git a/oldProject/DialogInputTxt.ui b/oldProject/DialogInputTxt.ui
new file mode 100644
index 0000000..8287858
--- /dev/null
+++ b/oldProject/DialogInputTxt.ui
@@ -0,0 +1,78 @@
+
+
+ DialogInputTxt
+
+
+
+ 0
+ 0
+ 400
+ 117
+
+
+
+ Dialog
+
+
+
+
+ 20
+ 80
+ 341
+ 32
+
+
+
+ Qt::Horizontal
+
+
+ QDialogButtonBox::Cancel|QDialogButtonBox::Ok
+
+
+
+
+
+ 20
+ 30
+ 361
+ 27
+
+
+
+
+
+
+
+ buttonBox
+ accepted()
+ DialogInputTxt
+ accept()
+
+
+ 248
+ 254
+
+
+ 157
+ 274
+
+
+
+
+ buttonBox
+ rejected()
+ DialogInputTxt
+ reject()
+
+
+ 316
+ 260
+
+
+ 286
+ 274
+
+
+
+
+
diff --git a/oldProject/DialogInsertVari.cpp b/oldProject/DialogInsertVari.cpp
new file mode 100644
index 0000000..326c6fd
--- /dev/null
+++ b/oldProject/DialogInsertVari.cpp
@@ -0,0 +1,227 @@
+#include "DialogInsertVari.h"
+#include "ui_dialoginsertvari.h"
+#include "myinclude.h"
+//#include "SysPara.h"
+
+DialogInsertVari::DialogInsertVari(QWidget *parent) :
+ QDialog(parent),
+ ui(new Ui::DialogInsertVari)
+{
+
+ ui->setupUi(this);
+ this->setWindowTitle(tr("变量插入"));
+ //this->setWindowFlags(Qt::CustomizeWindowHint | Qt::WindowContextHelpButtonHint | Qt::WindowMaximizeButtonHint);
+ //this->setWindowFlags(windowFlags()&~Qt::WindowCloseButtonHint);
+ //setWindowFlags(Qt::WindowTitleHint | Qt::WindowContextHelpButtonHint);
+ //setWindowFlags(Qt::CustomizeWindowHint);
+ this->setFixedSize(this->geometry().width(),this->geometry().height());
+
+
+ bool Flag=0;
+ digitWidth = 4;
+ ui->radioButtonDigital9->setDisabled(!Flag);
+ ui->radioButtonDigitalA->setDisabled(!Flag);
+ ui->radioButtonDigitalB->setDisabled(!Flag);
+ ui->radioButtonDigitalC->setDisabled(!Flag);
+ ui->radioButtonDigitalD->setDisabled(!Flag);
+ ui->radioButtonDigitalE->setDisabled(!Flag);
+ ui->radioButtonDigitalF->setDisabled(!Flag);
+ //ui->radioButtonDigitalH->setDisabled(!Flag);
+
+ connect(ui->radioButtonVarRandom,SIGNAL(toggled(bool)),this,SLOT(onRanDomPressed(bool)));
+
+ connect(ui->radioButtonHour,SIGNAL(toggled(bool)),this,SLOT( onDigitTwoBit(bool)));
+ connect(ui->radioButtonMinute,SIGNAL(toggled(bool)),this,SLOT( onDigitTwoBit(bool)));
+ connect(ui->radioButtonWeek,SIGNAL(toggled(bool)),this,SLOT( onDigitTwoBit(bool)));
+ connect(ui->radioButtonMonth,SIGNAL(toggled(bool)),this,SLOT( onDigitTwoBit(bool)));
+ connect(ui->radioButtonSecond,SIGNAL(toggled(bool)),this,SLOT( onDigitTwoBit(bool)));
+ connect(ui->radioButtonDay,SIGNAL(toggled(bool)),this,SLOT( onDigitTwoBit(bool)));
+connect(ui->radioButtonXDay,SIGNAL(toggled(bool)),this,SLOT( onDigitTwoBit(bool)));
+ connect(ui->radioButtonYear,SIGNAL(toggled(bool)),this,SLOT( onDigitFourBit(bool)));
+ connect(ui->radioButtonVar1,SIGNAL(toggled(bool)),this,SLOT( onDigitFourBit(bool)));
+ connect(ui->radioButtonVar2,SIGNAL(toggled(bool)),this,SLOT( onDigitFourBit(bool)));
+ connect(ui->radioButtonCNT3,SIGNAL(toggled(bool)),this,SLOT( onDigitFourBit(bool)));
+#ifdef _2DCODE_
+ connect(ui->radioButtonBarCode,SIGNAL(toggled(bool)),this,SLOT( onDigitOtherBit(bool)));
+ connect(ui->radioButtonQRCode,SIGNAL(toggled(bool)),this,SLOT( onDigitOtherBit(bool)));
+ connect(ui->radioButtonDataMatrix,SIGNAL(toggled(bool)),this,SLOT( onDigitOtherBit(bool)));
+#else
+ delete ui->radioButtonBarCode;
+ delete ui->radioButtonQRCode;
+ delete ui->radioButtonDataMatrix;
+#endif
+ui->radioButtonXDay->hide();
+
+}
+
+DialogInsertVari::~DialogInsertVari()
+{
+ delete ui;
+}
+void DialogInsertVari::setValue(QString txt){
+ //ui->label_2->setText(txt);
+}
+void DialogInsertVari::onRanDomPressed(bool Flag){
+ if(Flag) ui->radioButtonDigitalD->setChecked(Flag);
+ else ui->radioButtonDigital4->setChecked(1);
+ ui->radioButtonDigital9->setDisabled(!Flag);
+ ui->radioButtonDigitalA->setDisabled(!Flag);
+ ui->radioButtonDigitalB->setDisabled(!Flag);
+ ui->radioButtonDigitalC->setDisabled(!Flag);
+ ui->radioButtonDigitalD->setDisabled(!Flag);
+ ui->radioButtonDigitalE->setDisabled(!Flag);
+ ui->radioButtonDigitalF->setDisabled(!Flag);
+ //ui->radioButtonDigitalH->setDisabled(!Flag);
+}
+
+void DialogInsertVari::onDigitOtherBit(bool Flag){
+
+ if(digitWidth>8)
+ ui->radioButtonDigital4->setChecked(1);
+
+ ui->radioButtonDigital9->setDisabled(Flag);
+ ui->radioButtonDigitalA->setDisabled(Flag);
+ ui->radioButtonDigitalB->setDisabled(Flag);
+ ui->radioButtonDigitalC->setDisabled(Flag);
+ ui->radioButtonDigitalD->setDisabled(Flag);
+ ui->radioButtonDigitalE->setDisabled(Flag);
+ ui->radioButtonDigitalF->setDisabled(Flag);
+ //ui->radioButtonDigitalH->setDisabled(Flag);
+}
+
+void DialogInsertVari::onDigitTwoBit(bool Flag){
+ if(ui->radioButtonXDay->isChecked())ui->radioButtonDigital3->setChecked(Flag);
+ else if(Flag)ui->radioButtonDigital2->setChecked(Flag);
+ else ui->radioButtonDigital4->setChecked(1);
+
+ ui->radioButtonDigital9->setDisabled(Flag);
+ ui->radioButtonDigitalA->setDisabled(Flag);
+ ui->radioButtonDigitalB->setDisabled(Flag);
+ ui->radioButtonDigitalC->setDisabled(Flag);
+ ui->radioButtonDigitalD->setDisabled(Flag);
+ ui->radioButtonDigitalE->setDisabled(Flag);
+ ui->radioButtonDigitalF->setDisabled(Flag);
+ //ui->radioButtonDigitalH->setDisabled(Flag);
+}
+
+void DialogInsertVari::onDigitFourBit(bool Flag){
+ if(Flag)ui->radioButtonDigital4->setChecked(Flag);
+ else ui->radioButtonDigital2->setChecked(1);
+ ui->radioButtonDigital9->setDisabled(Flag);
+ ui->radioButtonDigitalA->setDisabled(Flag);
+ ui->radioButtonDigitalB->setDisabled(Flag);
+ ui->radioButtonDigitalC->setDisabled(Flag);
+ ui->radioButtonDigitalD->setDisabled(Flag);
+ ui->radioButtonDigitalE->setDisabled(Flag);
+ ui->radioButtonDigitalF->setDisabled(Flag);
+ //ui->radioButtonDigitalH->setDisabled(Flag);
+}
+
+
+void DialogInsertVari::getValue(int *varType,int *digitalWidth,unsigned char *splitMode){
+ int type = 0,width = 0;
+ if(ui->radioButtonYear->isChecked())
+ type = 0;
+ else if(ui->radioButtonMonth->isChecked())
+ type = 1;
+ else if(ui->radioButtonDay->isChecked())
+ type = 2;
+ else if(ui->radioButtonWeek->isChecked())
+ type = 3;
+ else if(ui->radioButtonHour->isChecked())
+ type = 4;
+ else if(ui->radioButtonMinute->isChecked())
+ type = 5;
+ else if(ui->radioButtonSecond->isChecked())
+ type = 6;
+ else if(ui->radioButtonVar1->isChecked())
+ type = 7;
+ else if(ui->radioButtonVar2->isChecked())
+ type = 8;
+#ifdef _2DCODE_
+ else if(ui->radioButtonDataMatrix->isChecked())
+ type = 9;
+ else if(ui->radioButtonQRCode->isChecked())
+ type = 10;
+ else if(ui->radioButtonBarCode->isChecked())
+ type = 11;
+#endif
+ else if(ui->radioButtonVarRandom->isChecked())
+ type = 12;
+ else if(ui->radioButtonCNT3->isChecked())
+ type = 13;
+ else if(ui->radioButtonXDay->isChecked())
+ type = 14;
+ else if(ui->radioButtonCNT4->isChecked())
+ type = 15;
+ else if(ui->radioButtonExpiry->isChecked())
+ {
+ type = 80;
+
+ }
+ else if(ui->radioButtonCurDate->isChecked())
+ {
+ type = 81;
+ }
+// else if(ui->radioButtonClass->isChecked())
+// {
+// type = 82;
+// }
+
+
+
+ if(ui->radioButtonDigital1->isChecked())
+ width = 1;
+ else if(ui->radioButtonDigital2->isChecked())
+ width = 2;
+ else if(ui->radioButtonDigital3->isChecked())
+ width = 3;
+ else if(ui->radioButtonDigital4->isChecked())
+ width = 4;
+ else if(ui->radioButtonDigital5->isChecked())
+ width = 5;
+ else if(ui->radioButtonDigital6->isChecked())
+ width = 6;
+ else if(ui->radioButtonDigital7->isChecked())
+ width = 7;
+ else if(ui->radioButtonDigital8->isChecked())
+ width = 8;
+ else if(ui->radioButtonDigital9->isChecked())
+ width = 9;
+ else if(ui->radioButtonDigitalA->isChecked())
+ width = 10;
+ else if(ui->radioButtonDigitalB->isChecked())
+ width = 11;
+ else if(ui->radioButtonDigitalC->isChecked())
+ width = 12;
+ else if(ui->radioButtonDigitalD->isChecked())
+ width = 13;
+ else if(ui->radioButtonDigitalE->isChecked())
+ width = 14;
+ else if(ui->radioButtonDigitalF->isChecked())
+ width = 15;
+ //else if(ui->radioButtonDigitalH->isChecked())
+ // width = 16;
+ if(varType && digitalWidth){
+ *varType = type;
+ *digitalWidth = width;
+ digitWidth = width;
+ }
+ if (type == 82) { // class
+ *digitalWidth = 1;
+ digitWidth = 1;
+
+ }
+
+}
+
+void DialogInsertVari::on_buttonBox_accepted()
+{
+
+}
+void DialogInsertVari::EnableHiddenValue(bool select)
+{
+ if(!select)
+ ui->radioButtonVar1->setChecked(true);
+ ui->radioButtonCNT4->setEnabled(select);
+}
diff --git a/oldProject/DialogInsertVari.h b/oldProject/DialogInsertVari.h
new file mode 100644
index 0000000..83ccb5f
--- /dev/null
+++ b/oldProject/DialogInsertVari.h
@@ -0,0 +1,33 @@
+#ifndef DIALOGINSERTVARI_H
+#define DIALOGINSERTVARI_H
+
+#include
+
+namespace Ui {
+class DialogInsertVari;
+}
+
+class DialogInsertVari : public QDialog
+{
+ Q_OBJECT
+
+public:
+ explicit DialogInsertVari(QWidget *parent = 0);
+ ~DialogInsertVari();
+ void getValue(int *varType,int *digitalWidth,unsigned char *splitMode);
+ void setValue(QString txt);
+ void EnableHiddenValue(bool select);
+protected slots:
+ void onRanDomPressed(bool Flag);
+ void onDigitOtherBit(bool Flag);
+ void onDigitTwoBit(bool Flag);
+ void onDigitFourBit(bool Flag);
+private slots:
+ void on_buttonBox_accepted();
+
+private:
+ Ui::DialogInsertVari *ui;
+ int digitWidth;
+};
+
+#endif // DIALOGINSERTVARI_H
diff --git a/oldProject/DialogLineSpace.cpp b/oldProject/DialogLineSpace.cpp
new file mode 100644
index 0000000..c487a77
--- /dev/null
+++ b/oldProject/DialogLineSpace.cpp
@@ -0,0 +1,75 @@
+#include "DialogLineSpace.h"
+#include "ui_dialoglinespace.h"
+
+DialogLineSpace::DialogLineSpace(QWidget *parent) :
+ QDialog(parent),
+ ui(new Ui::DialogLineSpace)
+{
+ ui->setupUi(this);
+ this->setFixedSize(this->geometry().width(),this->geometry().height());
+ this->setWindowTitle(tr("选择行间距和字符间距"));
+}
+
+DialogLineSpace::~DialogLineSpace()
+{
+ delete ui;
+}
+
+void DialogLineSpace::getValue(int *lineSpace,int *charSpace){
+ *lineSpace = 0;
+
+ if(ui->radioButton0Pixel->isChecked())
+ *lineSpace = 0;
+ else if(ui->radioButton1Pixel->isChecked())
+ *lineSpace = 1;
+ else if(ui->radioButton2Pixel->isChecked())
+ *lineSpace = 2;
+ else if(ui->radioButton3Pixel->isChecked())
+ *lineSpace = 3;
+ else if(ui->radioButton4Pixel->isChecked())
+ *lineSpace = 4;
+ else if(ui->radioButton5Pixel->isChecked())
+ *lineSpace = 5;
+ else if(ui->radioButton6Pixel->isChecked())
+ *lineSpace = 6;
+ else if(ui->radioButton7Pixel->isChecked())
+ *lineSpace = 7;
+
+ *charSpace = 0;
+ if(ui->radioButtonCharSpace0Pixel->isChecked())
+ *charSpace = 0;
+ else if(ui->radioButtonCharSpace1Pixel->isChecked())
+ *charSpace = 1;
+ else if(ui->radioButtonCharSpace2Pixel->isChecked())
+ *charSpace = 2;
+ else if(ui->radioButtonCharSpace3Pixel->isChecked())
+ *charSpace = 3;
+ else if(ui->radioButtonCharSpace4Pixel->isChecked())
+ *charSpace = 4;
+ else if(ui->radioButtonCharSpace5Pixel->isChecked())
+ *charSpace = 5;
+}
+
+void DialogLineSpace::setValue(int lineSpace,int charSpace){
+ if(lineSpace>0)
+ lineSpace = lineSpace-1; //新系统行间距需要加1
+ if(lineSpace > 7 || lineSpace < 0)
+ lineSpace = 0;
+ ui->radioButton0Pixel->setChecked(lineSpace == 0);
+ ui->radioButton1Pixel->setChecked(lineSpace == 1);
+ ui->radioButton2Pixel->setChecked(lineSpace == 2);
+ ui->radioButton3Pixel->setChecked(lineSpace == 3);
+ ui->radioButton4Pixel->setChecked(lineSpace == 4);
+ ui->radioButton5Pixel->setChecked(lineSpace == 5);
+ ui->radioButton6Pixel->setChecked(lineSpace == 6);
+ ui->radioButton7Pixel->setChecked(lineSpace == 7);
+
+ if(charSpace > 5 || charSpace < 0)
+ charSpace = 0;
+ ui->radioButtonCharSpace0Pixel->setChecked(charSpace == 0);
+ ui->radioButtonCharSpace1Pixel->setChecked(charSpace == 1);
+ ui->radioButtonCharSpace2Pixel->setChecked(charSpace == 2);
+ ui->radioButtonCharSpace3Pixel->setChecked(charSpace == 3);
+ ui->radioButtonCharSpace4Pixel->setChecked(charSpace == 4);
+ ui->radioButtonCharSpace5Pixel->setChecked(charSpace == 5);
+}
diff --git a/oldProject/DialogLineSpace.h b/oldProject/DialogLineSpace.h
new file mode 100644
index 0000000..5dc72aa
--- /dev/null
+++ b/oldProject/DialogLineSpace.h
@@ -0,0 +1,24 @@
+#ifndef DIALOGLINESPACE_H
+#define DIALOGLINESPACE_H
+
+#include
+
+namespace Ui {
+class DialogLineSpace;
+}
+
+class DialogLineSpace : public QDialog
+{
+ Q_OBJECT
+
+public:
+ explicit DialogLineSpace(QWidget *parent = 0);
+ ~DialogLineSpace();
+ void getValue(int *lineSpace,int *charSpace);
+ void setValue(int lineSpace,int charSpace);
+
+private:
+ Ui::DialogLineSpace *ui;
+};
+
+#endif // DIALOGLINESPACE_H
diff --git a/oldProject/DialogSaveFile.cpp b/oldProject/DialogSaveFile.cpp
new file mode 100644
index 0000000..cf94d06
--- /dev/null
+++ b/oldProject/DialogSaveFile.cpp
@@ -0,0 +1,239 @@
+#include "DialogSaveFile.h"
+#include "ui_dialogsavefile.h"
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include"HtmlDelegate.h"
+#include
+#include
+#include
+
+DialogSaveFile::DialogSaveFile(QWidget *parent) :
+ QDialog(parent),
+ ui(new Ui::DialogSaveFile)
+{
+ ui->setupUi(this);
+ this->setWindowTitle(tr("保存"));
+ ui->textEditView->setReadOnly(true);
+ ui->textEditView->setLineWrapMode(QTextEdit::NoWrap);
+ ui->textEditView->document()->setDocumentMargin(0);
+ this->setFixedSize(this->geometry().width(),this->geometry().height());
+ EditMode=4;
+#ifdef EnableArabic
+ setFileNameFlag=false;
+#endif
+}
+
+void DialogSaveFile::refreshListView(int mode){
+
+ QString dirPath = ui->radioButtonLocal->isChecked()?DOC_ROOT_DIR:UDISK_DOC_ROOT_DIR;
+ QDir dir(dirPath);
+ QStringList filters;
+ EditMode = mode;
+ if(mode == TXTFILE) filters << "*.html" << "*.txt" << "*.TXT" << "*.jpeg" << "*.gif" << "*.jpg" << "*.bmp"<< "*.BMP"; // txtmode
+ else if(mode == PICFILE) filters << "*.png";// <<"*.jpg" ; // picmode
+ else if(mode == SCENE) filters << "*.xml";// scene mode
+ else filters << "*.html" << "*.bmp" << "*.BMP" <<"*.jpg"<<"*.gif";
+ dir.setNameFilters(filters);
+ dir.setFilter(QDir::Files);
+#ifndef EnableArabic
+ QStringListModel *model = new QStringListModel(dir.entryList());
+#else
+ QStringList entries=dir.entryList();
+ QStandardItemModel *model = new QStandardItemModel();
+ for(int i=0;i%1%2").arg(subname).arg(subsuffix2);
+ QStandardItem *item2 = new QStandardItem(stringhtml);
+ model->appendRow(item2);
+ }
+ }else{
+ model->appendRow(item1);
+ }
+ }
+ }
+ ui->listViewFile->setItemDelegate(new HtmlDelegate);
+#endif
+
+ ui->listViewFile->setEditTriggers(QAbstractItemView::NoEditTriggers);
+ ui->listViewFile->setModel(model); //useList是个QListView
+ int count = ui->listViewFile->model()->rowCount();
+ if(count){
+ QModelIndex index = ui->listViewFile->model()->index(0 , 0);
+ ui->listViewFile->setCurrentIndex(index);
+ on_listViewFile_entered(index);
+ }
+
+#ifdef EnableArabic
+ QFont font;
+ if(!setFileNameFlag){
+ font.setFamily("biyang");
+ ui->lineEdit->setFont(font);
+ }else {
+ font.setFamily("biyangarabic");
+ ui->lineEdit->setFont(font);
+ }
+#endif
+}
+
+
+DialogSaveFile::~DialogSaveFile()
+{
+ delete ui;
+}
+
+void DialogSaveFile::on_listViewFile_entered(const QModelIndex &index)
+{
+#ifdef EnableArabic
+ QFont font;
+ QString fileName=index.data().toString();
+ if(fileName.endsWith("")){
+ QTextDocument doc;
+ doc.setHtml(fileName);
+ fileName= doc.toPlainText();
+ font.setFamily("biyangarabic");
+ ui->lineEdit->setFont(font);
+ ui->lineEdit->setText(QString(QFileInfo(fileName).baseName()));
+ int position = fileName.lastIndexOf(".");
+ fileName.insert(position,".a");
+ }else{
+ font.setFamily("biyang");
+ ui->lineEdit->setFont(font);
+ ui->lineEdit->setText( QFileInfo(fileName).baseName() );
+ }
+#endif
+
+ QString dirPath = ui->radioButtonLocal->isChecked()?DOC_ROOT_DIR:UDISK_DOC_ROOT_DIR;
+#ifndef EnableArabic
+ QString filePath = dirPath + index.data().toString();
+#else
+ QString filePath = dirPath + fileName;
+#endif
+ if(filePath.endsWith(".gif") || filePath.endsWith(".jpeg") || filePath.endsWith(".jpg") ||
+ filePath.endsWith(".png") || filePath.endsWith(".bmp")|| filePath.endsWith(".BMP")|| filePath.endsWith(".nda")){
+ ui->textEditView->clear();
+ ui->textEditView->setHtml(QString("
").arg(filePath));
+ }
+ else {
+ QFile file(filePath);
+ if (!file.open(QFile::ReadOnly))
+ return ;
+ QByteArray data = file.readAll();
+ QTextCodec *codec = Qt::codecForHtml(data);
+ QString str = codec->toUnicode(data);
+ if (Qt::mightBeRichText(str)) {
+ if(!ui->radioButtonLocal->isChecked())
+ str.replace(DOC_ROOT_DIR,UDISK_DOC_ROOT_DIR); //必须替换相应的路径
+ ui->textEditView->setHtml(str);
+ } else {
+ str = QString::fromLocal8Bit(data);
+ ui->textEditView->setPlainText(str);
+ }
+ }
+#ifndef EnableArabic
+ ui->lineEdit->setText( QFileInfo(ui->listViewFile->currentIndex().data().toString()).baseName() );
+#endif
+}
+void DialogSaveFile::on_listViewFile_clicked(const QModelIndex &index)
+{
+ on_listViewFile_entered(index);
+}
+
+void DialogSaveFile::on_pushButtonNext_pressed()
+{
+ QModelIndex currIndex = ui->listViewFile->currentIndex();
+ int count = ui->listViewFile->model()->rowCount();
+ if(count){
+ QModelIndex index = ui->listViewFile->model()->index((currIndex.row() + 1)%count, 0);
+ ui->listViewFile->setCurrentIndex(index);
+ on_listViewFile_entered(index);
+ }
+ ui->lineEdit->setText(QFileInfo(ui->listViewFile->currentIndex().data().toString()).baseName());
+}
+
+void DialogSaveFile::on_pushButtonLast_pressed()
+{
+ QModelIndex currIndex = ui->listViewFile->currentIndex();
+ int count = ui->listViewFile->model()->rowCount();
+ if(count){
+ QModelIndex index = ui->listViewFile->model()->index(currIndex.row() == 0?(count - 1):(currIndex.row() - 1), 0);
+ ui->listViewFile->setCurrentIndex(index);
+ on_listViewFile_entered(index);
+ }
+ ui->lineEdit->setText(QFileInfo(ui->listViewFile->currentIndex().data().toString()).baseName());
+}
+
+void DialogSaveFile::on_pushButtonExit_pressed()
+{
+ hide();
+}
+//void DialogSaveFile::on_lostfocuse_pressed()
+//{
+// hide();
+//}
+void DialogSaveFile::on_pushButtonSave_clicked()
+{
+ QModelIndex index = ui->listViewFile->currentIndex();
+ QString dirPath = ui->radioButtonLocal->isChecked()?DOC_ROOT_DIR:UDISK_DOC_ROOT_DIR;
+ //QString filePath = dirPath + index.data().toString();
+ QString filePath = dirPath + ui->lineEdit->text();// index.data().toString();
+#ifdef EnableArabic
+ if(setFileNameFlag){
+ filePath = dirPath + ui->lineEdit->text()+".a";
+ }
+#endif
+ emit saveFile(filePath,false);
+ hide();
+}
+
+void DialogSaveFile::on_radioButtonLocal_released()
+{
+ refreshListView(EditMode);
+}
+
+void DialogSaveFile::on_radioButtonUdisk_released()
+{
+
+ QDir dir(UDISK_DOC_ROOT_DIR);
+ if(!dir.exists()){
+ QMessageBox::warning(0,tr("警告"),tr("U盘未插入或U盘根目录下的doc文件夹不存在!"));
+ }
+ refreshListView(EditMode);
+}
+void DialogSaveFile::setEnterFileName(QString strFile)
+{
+ ui->lineEdit->setText(strFile);
+ //ui->lineEdit->setFocus();
+}
+void DialogSaveFile::setTitleTxt(QString str)
+{
+ setWindowTitle(str);
+}
+
+#ifdef EnableArabic
+void DialogSaveFile::setFileNameEnglishOrArabic(bool flag){
+ QFont font;
+ setFileNameFlag=flag;
+ //qDebug()<<"setFileNameFlag :"<lineEdit->setFont(font);
+}
+#endif
diff --git a/oldProject/DialogSaveFile.h b/oldProject/DialogSaveFile.h
new file mode 100644
index 0000000..da2399a
--- /dev/null
+++ b/oldProject/DialogSaveFile.h
@@ -0,0 +1,54 @@
+#ifndef DialogSaveFile_H
+#define DialogSaveFile_H
+
+#include
+#include "DialogSaveFile.h"
+#include
+#include "myinclude.h"
+namespace Ui {
+class DialogSaveFile;
+}
+
+class DialogSaveFile : public QDialog
+{
+ Q_OBJECT
+
+public:
+ explicit DialogSaveFile(QWidget *parent = 0);
+ ~DialogSaveFile();
+ void refreshListView(int mode);
+ int EditMode;
+ void setEnterFileName(QString strFile);
+ void setTitleTxt(QString str);
+#ifdef EnableArabic
+ void setFileNameEnglishOrArabic(bool flag);
+#endif
+private slots:
+
+
+ void on_pushButtonNext_pressed();
+ void on_pushButtonLast_pressed();
+ void on_pushButtonExit_pressed();
+ void on_pushButtonSave_clicked();
+ void on_radioButtonLocal_released();
+ void on_radioButtonUdisk_released();
+ void on_listViewFile_entered(const QModelIndex &index);
+ void on_listViewFile_clicked(const QModelIndex &index);
+Q_SIGNALS:
+ void saveFile(QString filePath,bool Flag);
+private:
+ Ui::DialogSaveFile *ui;
+#ifdef EnableArabic
+ bool setFileNameFlag;
+#endif
+};
+
+#endif // DialogSaveFile_H
+
+
+
+
+
+
+
+
diff --git a/oldProject/DigitalInput.cpp b/oldProject/DigitalInput.cpp
new file mode 100644
index 0000000..3dfc3f2
--- /dev/null
+++ b/oldProject/DigitalInput.cpp
@@ -0,0 +1,76 @@
+#include "DigitalInput.h"
+#include "ui_digitalinput.h"
+#include "MyInputMethod.h"
+#include
+#include
+DigitalInput::DigitalInput(MyInputMethod *myInputMethod,QWidget *parent) :
+ QWidget(parent,(Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint | Qt::Tool|Qt::WindowDoesNotAcceptFocus|Qt::BypassWindowManagerHint)),
+ ui(new Ui::DigitalInput)
+{
+ ui->setupUi(this);
+ this->myInputMethod = myInputMethod;
+
+ connect(ui->Key_0,SIGNAL(pressed()),this,SLOT(onCharPressed()));
+ connect(ui->Key_1,SIGNAL(pressed()),this,SLOT(onCharPressed()));
+ connect(ui->Key_2,SIGNAL(pressed()),this,SLOT(onCharPressed()));
+ connect(ui->Key_3,SIGNAL(pressed()),this,SLOT(onCharPressed()));
+ connect(ui->Key_4,SIGNAL(pressed()),this,SLOT(onCharPressed()));
+ connect(ui->Key_5,SIGNAL(pressed()),this,SLOT(onCharPressed()));
+ connect(ui->Key_6,SIGNAL(pressed()),this,SLOT(onCharPressed()));
+ connect(ui->Key_7,SIGNAL(pressed()),this,SLOT(onCharPressed()));
+ connect(ui->Key_8,SIGNAL(pressed()),this,SLOT(onCharPressed()));
+ connect(ui->Key_9,SIGNAL(pressed()),this,SLOT(onCharPressed()));
+ connect(ui->Key_pluse,SIGNAL(pressed()),this,SLOT(onCharPressed()));
+ connect(ui->Key_backspace,SIGNAL(pressed()),this,SLOT(onKeyBackspacePressed()));
+ connect(ui->Key_selectAll,SIGNAL(pressed()),this,SLOT(onKeySelectAllPressed()));
+ connect(ui->Key_up,SIGNAL(pressed()),this,SLOT(onKeyUpPressed()));
+ connect(ui->Key_down,SIGNAL(pressed()),this,SLOT(onKeyDownPressed()));
+}
+
+DigitalInput::~DigitalInput()
+{
+ delete ui;
+}
+
+
+void DigitalInput::onCharPressed(){
+ QPushButton * button = qobject_cast(sender());
+ QString text = button->text();
+ myInputMethod->sendString (text);
+}
+
+void DigitalInput::onKeyBackspacePressed(){
+#ifndef Q_OS_WIN32
+//QWSServer::sendKeyEvent(0,Qt::Key_Backspace,Qt::NoModifier,true,false); //Ïòϵͳ·¢ËͼüÅÌʼþ
+ MyInputMethod::sendEvent(Qt::Key_Backspace,Qt::NoModifier);
+#endif
+
+}
+
+void DigitalInput::onKeySelectAllPressed(){
+ //static int init = 0;
+#ifndef Q_OS_WIN32
+ //QWSServer::sendKeyEvent(0,Qt::Key_A,Qt::ControlModifier,true,false); //Ïòϵͳ·¢ËͼüÅÌʼþ
+ //if(!init)
+ // QWSServer::sendKeyEvent(0,Qt::Key_A,Qt::ControlModifier,true,false); //Ïòϵͳ·¢ËͼüÅÌʼþ
+ //init = 1;
+
+MyInputMethod::sendEvent(Qt::Key_A, Qt::ControlModifier);
+#endif
+
+
+}
+void DigitalInput::onKeyUpPressed(){
+#ifndef Q_OS_WIN32
+//QWSServer::sendKeyEvent(0,Qt::Key_Up,Qt::NoModifier,true,false); //Ïòϵͳ·¢ËͼüÅÌʼþ
+ MyInputMethod::sendEvent(Qt::Key_Up,Qt::NoModifier);
+#endif
+}
+void DigitalInput::onKeyDownPressed(){
+#ifndef Q_OS_WIN32
+//QWSServer::sendKeyEvent(0,Qt::Key_Down,Qt::NoModifier,true,false); //Ïòϵͳ·¢ËͼüÅÌʼþ
+ MyInputMethod::sendEvent(Qt::Key_Down,Qt::NoModifier);
+#endif
+}
+
+
diff --git a/oldProject/DigitalInput.h b/oldProject/DigitalInput.h
new file mode 100644
index 0000000..12e8264
--- /dev/null
+++ b/oldProject/DigitalInput.h
@@ -0,0 +1,33 @@
+#ifndef DIGITALINPUT_H
+#define DIGITALINPUT_H
+
+#include
+class MyInputMethod;
+namespace Ui {
+class DigitalInput;
+}
+
+class DigitalInput : public QWidget
+{
+ Q_OBJECT
+
+public:
+ explicit DigitalInput(MyInputMethod *myInputMethod,QWidget *parent = 0);
+ ~DigitalInput();
+
+
+private slots:
+ void onCharPressed();
+ void onKeyBackspacePressed();
+ void onKeySelectAllPressed();
+ void onKeyUpPressed();
+ void onKeyDownPressed();
+
+
+private:
+ Ui::DigitalInput *ui;
+
+ MyInputMethod *myInputMethod;
+};
+
+#endif // DIGITALINPUT_H
diff --git a/oldProject/EN/mainwindow.ui b/oldProject/EN/mainwindow.ui
new file mode 100644
index 0000000..0324a47
--- /dev/null
+++ b/oldProject/EN/mainwindow.ui
@@ -0,0 +1,3873 @@
+
+
+ MainWindow
+
+
+ true
+
+
+
+ 0
+ 0
+ 638
+ 458
+
+
+
+
+ 0
+ 0
+
+
+
+
+ 0
+ 0
+
+
+
+
+ 5
+ 5
+
+
+
+ Qt::StrongFocus
+
+
+ InkJet
+
+
+
+
+ 9
+ 9
+ 620
+ 440
+
+
+
+
+ 0
+
+ -
+
+
+
+ 0
+ 50
+
+
+
+
+ 16777215
+ 50
+
+
+
+ 1
+
+
+
+
+ 0
+ 50
+
+
+
+
+ 16777215
+ 50
+
+
+
+
+
+
+ 0
+ 50
+
+
+
+
+
+ 0
+ 0
+ 686
+ 47
+
+
+
+
-
+
+
+
+ 0
+ 45
+
+
+
+ 编辑
+
+
+
+ :/icon/edit.png:/icon/edit.png
+
+
+
+ -
+
+
+
+ 0
+ 45
+
+
+
+ 打开文件
+
+
+
+ :/icon/fileopen.png:/icon/fileopen.png
+
+
+
+ -
+
+
+
+ 0
+ 45
+
+
+
+ 二维码
+
+
+
+ :/icon/bypm.png:/icon/bypm.png
+
+
+
+ -
+
+
+
+ 0
+ 45
+
+
+
+ 条形码
+
+
+
+ :/icon/BarCode1.png:/icon/BarCode1.png
+
+
+
+ -
+
+
+
+ 0
+ 45
+
+
+
+ 缩小
+
+
+
+ :/icon/zoomout.png:/icon/zoomout.png
+
+
+
+ -
+
+
+
+ 0
+ 45
+
+
+
+ 放大
+
+
+
+ :/icon/zoomin.png:/icon/zoomin.png
+
+
+
+ -
+
+
+ 交替打印文件名
+
+
+
+
+
+
+
+
+ -
+
+
+ 0
+
+
-
+
+
+
+ 0
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+ 最大:[40行x 2048列]
+
+
+ QFrame::NoFrame
+
+
+ QFrame::Sunken
+
+
+
+
+
+
+ -
+
+
+
+ 140
+ 25
+
+
+
+
+ 140
+ 25
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+
+ QFrame::NoFrame
+
+
+ QFrame::Sunken
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+
+ QFrame::NoFrame
+
+
+ QFrame::Sunken
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+ 同步器速度
+
+
+ QFrame::NoFrame
+
+
+ QFrame::Sunken
+
+
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ -
+
+
+
+ 0
+ 25
+
+
+
+
+ 100
+ 25
+
+
+
+ 当前时间
+
+
+
+
+
+
+
+
+ -
+
+
+
+ 640
+ 107
+
+
+
+ 1
+
+
+
+
-
+
+
+
+ 610
+ 95
+
+
+
+
+ 620
+ 96
+
+
+
+ BlankCursor
+
+
+ 0
+
+
+ false
+
+
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
+<html><head><meta name="qrichtext" content="1" /><style type="text/css">
+p, li { white-space: pre-wrap; }
+</style></head><body style=" font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;">
+<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'wenquanyi';"></p></body></html>
+
+
+
+
+
+
+
+
+
+ 5
+ 5
+ 620
+ 100
+
+
+
+
+ 0
+ 0
+
+
+
+
+ 620
+ 100
+
+
+
+
+ 16777215
+ 80
+
+
+
+ false
+
+
+
+
+ 0
+ 0
+ 500
+ 53
+
+
+
+
+ 0
+ 0
+
+
+
+
+ 0
+ 0
+
+
+
+
+
+
+
+
+ -
+
+
+ 0
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+ :/image/ALARMGreen.PNG
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+ :/image/ALARMGreen.PNG
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+ :/image/ALARMGreen.PNG
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+ :/image/ALARMGreen.PNG
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+ :/image/ALARMGreen.PNG
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+ :/image/ALARMGreen.PNG
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+ :/image/ALARMGreen.PNG
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+ :/image/ALARMGreen.PNG
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+ :/image/ALARMGreen.PNG
+
+
+
+ -
+
+
+
+ 0
+ 60
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+ :/image/reset.png
+
+
+
+
+
+ -
+
+
+ 0
+
+
-
+
+
+
+ 60
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+
+ 墨线开关
+
+
+
+ -
+
+
+
+ 60
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+
+ 喷头盖开
+
+
+
+ -
+
+
+
+ 60
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+
+ 墨水缸满
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 60
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+
+ 墨水液位
+
+
+
+ -
+
+
+
+ 60
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+
+ 溶剂液位
+
+
+
+ -
+
+
+
+ 60
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+
+ 回收故障
+
+
+
+ -
+
+
+
+ 60
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+
+ 粘度故障
+
+
+
+ -
+
+
+
+ 60
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+
+ 相位故障
+
+
+
+ -
+
+
+
+ 60
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+
+ 高压故障
+
+
+
+ -
+
+
+
+ 60
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+
+ 故障恢复
+
+
+
+
+
+ -
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+
+ 110
+ 0
+
+
+
+
+ 110
+ 16777215
+
+
+
+ 立即重新计米
+
+
+
+ -
+
+
+
+ 110
+ 20
+
+
+
+
+ 110
+ 16777215
+
+
+
+ QFrame::NoFrame
+
+
+ QFrame::Sunken
+
+
+ 产品计数
+
+
+
+ -
+
+
+
+ 110
+ 20
+
+
+
+
+ 110
+ 16777215
+
+
+
+ QFrame::WinPanel
+
+
+ QFrame::Sunken
+
+
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+
+ 110
+ 20
+
+
+
+
+ 110
+ 16777215
+
+
+
+ QFrame::NoFrame
+
+
+ QFrame::Sunken
+
+
+ 产品总计数
+
+
+
+ -
+
+
+
+ 110
+ 20
+
+
+
+
+ 110
+ 16777215
+
+
+
+ QFrame::WinPanel
+
+
+ QFrame::Sunken
+
+
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+
+ 110
+ 35
+
+
+
+
+ 130
+ 16777215
+
+
+
+ Qt::LeftToRight
+
+
+ false
+
+
+ 关机
+
+
+
+ :/icon/poweroff.png:/icon/poweroff.png
+
+
+
+
+
+ -
+
+
+ 7
+
+
+ 5
+
+
+ 0
+
+
-
+
+
+ 6
+
+
+ 3
+
+
+ 0
+
+
+ 0
+
+
+ 3
+
+
-
+
+
+ 1
+
+
+ 0
+
+
-
+
+
+ 3
+
+
-
+
+
+
+ 0
+ 20
+
+
+
+
+ 16524
+ 16777215
+
+
+
+
+
+
+ true
+
+
+
+
+
+ -
+
+
+ 2
+
+
-
+
+
+ 4
+
+
+ 3
+
+
+ 0
+
+
-
+
+
+
+ 0
+ 20
+
+
+
+
+ 1000
+ 20
+
+
+
+ 粘度
+
+
+
+ -
+
+
+
+ 0
+ 20
+
+
+
+
+ 10000
+ 20
+
+
+
+ 压力
+
+
+
+ -
+
+
+
+ 1000
+ 20
+
+
+
+ 隔膜位置
+
+
+
+ -
+
+
+
+ 1000
+ 20
+
+
+
+ 晶振电压
+
+
+
+ -
+
+
+
+ 88
+ 0
+
+
+
+
+ 16777215
+ 20
+
+
+
+
+
+
+
+ -
+
+
+
+ 70
+ 0
+
+
+
+
+ 1000
+ 20
+
+
+
+
+
+
+
+ -
+
+
+
+ 64
+ 0
+
+
+
+
+ 16777215
+ 20
+
+
+
+
+
+
+
+ -
+
+
+
+ 88
+ 0
+
+
+
+
+ 16777215
+ 20
+
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 20
+
+
+
+
+ 600
+ 16777215
+
+
+
+ QFrame::NoFrame
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 600
+ 20
+
+
+
+ 2014-08-23
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+
+
+
+
+ -
+
+
+
+ 0
+ 50
+
+
+
+
+ 80
+ 16777215
+
+
+
+
+
+
+
+
+ 60
+ 60
+ 60
+
+
+
+
+
+
+
+
+ 60
+ 60
+ 60
+
+
+
+
+
+
+
+
+ 147
+ 146
+ 146
+
+
+
+
+
+
+
+ 开
+
+
+
+ :/icon/openreclaimtanl.png:/icon/openreclaimtanl.png
+
+
+
+ -
+
+
+
+ 60
+ 0
+
+
+
+
+ 70
+ 60
+
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 50
+
+
+
+
+ 80
+ 16777215
+
+
+
+ 关
+
+
+
+ :/icon/closereclaimtanl.png:/icon/closereclaimtanl.png
+
+
+
+
+
+
+
+
+
+ -
+
+
+ 0
+
+
-
+
+
+
+ 0
+ 70
+
+
+
+
+ 110
+ 16777215
+
+
+
+
+
+
+
+
+ 0
+ 170
+ 0
+
+
+
+
+
+
+ 85
+ 170
+ 127
+
+
+
+
+
+
+ 0
+ 170
+ 0
+
+
+
+
+
+
+ 0
+ 170
+ 0
+
+
+
+
+
+
+ 0
+ 170
+ 0
+
+
+
+
+
+
+ 0
+ 170
+ 0
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 255
+ 255
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 255
+ 255
+ 255
+
+
+
+
+
+
+ 0
+ 170
+ 0
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 127
+ 212
+ 127
+
+
+
+
+
+
+ 255
+ 255
+ 220
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+
+
+ 85
+ 170
+ 127
+
+
+
+
+
+
+ 85
+ 170
+ 127
+
+
+
+
+
+
+ 85
+ 170
+ 127
+
+
+
+
+
+
+ 85
+ 170
+ 127
+
+
+
+
+
+
+ 85
+ 170
+ 127
+
+
+
+
+
+
+ 85
+ 170
+ 127
+
+
+
+
+
+
+ 85
+ 170
+ 127
+
+
+
+
+
+
+ 255
+ 255
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 255
+ 255
+ 255
+
+
+
+
+
+
+ 0
+ 170
+ 0
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 127
+ 212
+ 127
+
+
+
+
+
+
+ 255
+ 255
+ 220
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+
+
+ 186
+ 188
+ 185
+
+
+
+
+
+
+ 242
+ 241
+ 240
+
+
+
+
+
+
+ 186
+ 188
+ 185
+
+
+
+
+
+
+ 186
+ 188
+ 185
+
+
+
+
+
+
+ 186
+ 188
+ 185
+
+
+
+
+
+
+ 186
+ 188
+ 185
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 255
+ 255
+ 255
+
+
+
+
+
+
+ 147
+ 146
+ 146
+
+
+
+
+
+
+ 0
+ 170
+ 0
+
+
+
+
+
+
+ 0
+ 170
+ 0
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 0
+ 170
+ 0
+
+
+
+
+
+
+ 255
+ 255
+ 220
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+
+
+ :/icon/startprint2.png
+ :/icon/startprint1.png
+ :/icon/startprint1.png
+ :/icon/startprint.png:/icon/startprint2.png
+
+
+
+ 110
+ 70
+
+
+
+ false
+
+
+
+ -
+
+
+
+ 0
+ 70
+
+
+
+
+ 110
+ 16777215
+
+
+
+
+
+
+
+
+ 170
+ 0
+ 0
+
+
+
+
+
+
+ 193
+ 121
+ 121
+
+
+
+
+
+
+ 170
+ 0
+ 0
+
+
+
+
+
+
+ 193
+ 121
+ 121
+
+
+
+
+
+
+ 193
+ 121
+ 121
+
+
+
+
+
+
+ 193
+ 121
+ 121
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 255
+ 255
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 255
+ 255
+ 255
+
+
+
+
+
+
+ 227
+ 97
+ 75
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 241
+ 176
+ 165
+
+
+
+
+
+
+ 255
+ 255
+ 220
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+
+
+ 193
+ 121
+ 121
+
+
+
+
+
+
+ 193
+ 121
+ 121
+
+
+
+
+
+
+ 193
+ 121
+ 121
+
+
+
+
+
+
+ 193
+ 121
+ 121
+
+
+
+
+
+
+ 193
+ 121
+ 121
+
+
+
+
+
+
+ 193
+ 121
+ 121
+
+
+
+
+
+
+ 193
+ 121
+ 121
+
+
+
+
+
+
+ 255
+ 255
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 255
+ 255
+ 255
+
+
+
+
+
+
+ 227
+ 97
+ 75
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 241
+ 176
+ 165
+
+
+
+
+
+
+ 255
+ 255
+ 220
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+
+
+ 209
+ 199
+ 189
+
+
+
+
+
+
+ 242
+ 241
+ 240
+
+
+
+
+
+
+ 209
+ 199
+ 189
+
+
+
+
+
+
+ 209
+ 199
+ 189
+
+
+
+
+
+
+ 209
+ 199
+ 189
+
+
+
+
+
+
+ 209
+ 199
+ 189
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 255
+ 255
+ 255
+
+
+
+
+
+
+ 147
+ 146
+ 146
+
+
+
+
+
+
+ 227
+ 97
+ 75
+
+
+
+
+
+
+ 227
+ 97
+ 75
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 227
+ 97
+ 75
+
+
+
+
+
+
+ 255
+ 255
+ 220
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+
+
+ :/icon/stopprint2.png
+ :/icon/stopprint1.png
+ :/icon/stopprint1.png
+ :/icon/stopprint.png:/icon/stopprint2.png
+
+
+
+ 110
+ 70
+
+
+
+
+ -
+
+
+
+ 0
+ 70
+
+
+
+
+ 110
+ 16777215
+
+
+
+
+
+
+
+
+ 255
+ 170
+ 0
+
+
+
+
+
+
+ 206
+ 186
+ 124
+
+
+
+
+
+
+ 255
+ 170
+ 0
+
+
+
+
+
+
+ 255
+ 170
+ 0
+
+
+
+
+
+
+ 255
+ 170
+ 0
+
+
+
+
+
+
+ 255
+ 170
+ 0
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 255
+ 255
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 255
+ 255
+ 255
+
+
+
+
+
+
+ 255
+ 170
+ 0
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 255
+ 212
+ 127
+
+
+
+
+
+
+ 255
+ 255
+ 220
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+
+
+ 206
+ 186
+ 124
+
+
+
+
+
+
+ 206
+ 186
+ 124
+
+
+
+
+
+
+ 206
+ 186
+ 124
+
+
+
+
+
+
+ 206
+ 186
+ 124
+
+
+
+
+
+
+ 206
+ 186
+ 124
+
+
+
+
+
+
+ 206
+ 186
+ 124
+
+
+
+
+
+
+ 206
+ 186
+ 124
+
+
+
+
+
+
+ 255
+ 255
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 255
+ 255
+ 255
+
+
+
+
+
+
+ 255
+ 170
+ 0
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 255
+ 212
+ 127
+
+
+
+
+
+
+ 255
+ 255
+ 220
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+
+
+ 209
+ 206
+ 203
+
+
+
+
+
+
+ 242
+ 241
+ 240
+
+
+
+
+
+
+ 209
+ 199
+ 189
+
+
+
+
+
+
+ 209
+ 199
+ 189
+
+
+
+
+
+
+ 209
+ 199
+ 189
+
+
+
+
+
+
+ 209
+ 199
+ 189
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+ 255
+ 255
+ 255
+
+
+
+
+
+
+ 147
+ 146
+ 146
+
+
+
+
+
+
+ 255
+ 170
+ 0
+
+
+
+
+
+
+ 255
+ 170
+ 0
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 255
+ 170
+ 0
+
+
+
+
+
+
+ 255
+ 255
+ 220
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+
+
+ :/icon/pauseprint2.png
+ :/icon/pauseprint1.png
+ :/icon/pauseprint1.png
+ :/icon/pauseprint.png:/icon/pauseprint2.png
+
+
+
+ 110
+ 70
+
+
+
+
+ -
+
+
+
+ 0
+ 70
+
+
+
+
+ 110
+ 16777215
+
+
+
+ 喷嘴逆清洗
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PicWidget
+ QWidget
+
+ 1
+
+
+ ClickLabel
+ QLabel
+
+
+
+ TextEditOption
+ QWidget
+
+ 1
+
+
+ PrintTextDisplay
+ QWidget
+
+ 1
+
+
+ MyTextEdit
+ QTextEdit
+
+
+
+
+
+
+
+
diff --git a/oldProject/HtmlDelegate.cpp b/oldProject/HtmlDelegate.cpp
new file mode 100644
index 0000000..2cacbec
--- /dev/null
+++ b/oldProject/HtmlDelegate.cpp
@@ -0,0 +1,36 @@
+#include "HtmlDelegate.h"
+
+HtmlDelegate::HtmlDelegate(QObject *parent) : QAbstractItemDelegate(parent){}
+
+//HtmlDelegate::HtmlDelegate(QObject *parent = nullptr) : QAbstractItemDelegate(parent) {}
+
+
+void HtmlDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const {
+ QString html = index.model()->data(index, Qt::DisplayRole).toString();
+ QTextDocument doc;
+ doc.setHtml(html);
+ doc.setTextWidth(option.rect.width());
+
+ painter->save();
+ painter->setClipRect(option.rect);
+
+ if (option.state & QStyle::State_Selected) {
+ // 绘制选中项的背景颜色
+ painter->fillRect(option.rect, option.palette.color(QPalette::Highlight));
+ }
+
+ painter->translate(option.rect.topLeft());
+ doc.drawContents(painter, QRectF(QPointF(0, 0), QSizeF(option.rect.size())));
+ painter->restore();
+ }
+
+ QSize HtmlDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const {
+ QString html = index.model()->data(index, Qt::DisplayRole).toString();
+ QTextDocument doc;
+ doc.setHtml(html);
+ doc.setTextWidth(option.rect.width());
+ return QSize(doc.idealWidth(), doc.size().height());
+ }
+
+
+
diff --git a/oldProject/HtmlDelegate.h b/oldProject/HtmlDelegate.h
new file mode 100644
index 0000000..35e0c7f
--- /dev/null
+++ b/oldProject/HtmlDelegate.h
@@ -0,0 +1,23 @@
+#ifndef HTMLDELEGATE_H
+#define HTMLDELEGATE_H
+
+#include
+#include
+#include
+#include
+
+class HtmlDelegate : public QAbstractItemDelegate
+{
+ Q_OBJECT
+public:
+ explicit HtmlDelegate(QObject *parent = 0);
+ void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
+ QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
+
+signals:
+
+public slots:
+};
+
+#endif // HTMLDELEGATE_H
+
diff --git a/oldProject/InkJetPrinter.cpp b/oldProject/InkJetPrinter.cpp
new file mode 100644
index 0000000..9986b69
--- /dev/null
+++ b/oldProject/InkJetPrinter.cpp
@@ -0,0 +1,3446 @@
+#include "InkJetPrinter.h"
+#include "ui_inkjetprinter.h"
+#include "QDebug"
+#include "LogInfo.h"
+#include "mainwindow.h"
+#include "./Network/NetworkManager.h"
+#include "ZkEdit.h"
+#include "myinclude.h"
+#include
+#include
+#include
+#include
+
+#define MAX_VOL 300
+#define MIN_VOL 0
+void PID_init();
+#define ONLYCNTCLEAR
+extern MyInputMethod *myInputMethod;
+static bool firstTime = true;
+static unsigned int PulseCnt = 0; //时间间隔内的脉冲累计数
+InkJetPrinter::InkJetPrinter(QWidget *parent) :
+ QTabWidget(parent),
+ ui(new Ui::InkJetPrinter)
+{
+ // 隐藏系统任务栏,隐藏后,如果需要激活任务栏,则需要呼出QtUI中的任意弹出式、非全屏窗口,然后使用鼠标将光标移动至屏幕最左侧或最顶部则可以呼出任务栏
+ int ret = system("xfconf-query -c xfce4-panel -p /panels/panel-0/autohide-behavior -s 2");
+ qInfo() << "Hide system panel ret:" << ret;
+
+// system("ifconfig eth1 down");
+ ui->setupUi(this);
+ SysPara *para = new SysPara();
+ bindSysPara(para);
+ ui->tabMainWindow->bindSysPara(para);
+ sysPara->status.InkOrSOLVEmptyCnt=0;
+
+ t1.start();//calandar_and_dat_t
+ fileTransceiv = new FileTranseceiver(5001);
+ QObject::connect(fileTransceiv,SIGNAL(fileRecieved(QString)),this,SLOT(recievedFile2Save(QString)));
+ fileTransceiv->start();
+
+ //edit@12-30
+ tcpTransceiv = new FileTranseceiver(5002);
+ tcpTransceiv->start();
+
+
+ connect(ui->tabMainWindow,SIGNAL(closeSerial()),this,SLOT(closedSerial()));
+ qDebug()<<"main thread id:"<< QString("0x%1").arg(reinterpret_cast(QThread::currentThreadId()), 0, 16);
+
+ m_serialThreadFPGA = new QThread;
+ serialFPGA = new Serial("/dev/ttyAS5");
+
+ connect(m_serialThreadFPGA,&QThread::started,serialFPGA,&Serial::startInitSlot);
+
+ serialFPGA->moveToThread(m_serialThreadFPGA);
+ connect(serialFPGA,SIGNAL(sendQueueData(int,int,unsigned char*,int,int)),sysPara->devOp,SLOT(resendFPGADate(int,int,unsigned char*,int,int)));
+ connect(serialFPGA,SIGNAL(resendFPGAData(int,int,unsigned char*,int,int)),sysPara->devOp,SLOT(resendFPGADate(int,int,unsigned char*,int,int)));
+ connect(sysPara->devOp,SIGNAL(sendSerialDataToFPGA(int,int,unsigned char*,int,int)),serialFPGA,SLOT(sendSerialData(int,int,unsigned char*,int,int)),Qt::QueuedConnection);
+ connect(serialFPGA,SIGNAL(getFPGAVersion(uint)),this,SLOT(saveFPGAVersionNum(uint)));
+
+ connect(serialFPGA,SIGNAL(stopSendData(bool)),this,SLOT(stopSendFPGAData(bool)));
+ connect(serialFPGA,SIGNAL(getFPGAPhaseDetectHighTm(unsigned char*)),this,SLOT(saveFPGAPhaseDetectHighTm(unsigned char*)));
+ connect(serialFPGA,SIGNAL(getFPGAStatus(unsigned char*)),this,SLOT(saveFPGAStatus(unsigned char*)));
+ connect(serialFPGA,SIGNAL(getFPGACalandarAndDat(unsigned char*)),this,SLOT(saveFPGACalandarAndDat(unsigned char*)));
+ connect(serialFPGA,SIGNAL(getFPGACnt3CurrValue(unsigned char*)),this,SLOT(saveFPGACnt3CurrValue(unsigned char*)));
+ connect(serialFPGA,SIGNAL(getFPGAXXXDay(unsigned char*)),this,SLOT(saveFPGAXXXDay(unsigned char*)));
+ connect(serialFPGA,SIGNAL(queueSizeFPGA(int)),ui->tabMainWindow,SLOT(showFPGAqueuesize(int)));
+ connect(serialFPGA,SIGNAL(queueFPGASizeSIG(int)),ui->tabMainWindow,SLOT(showqueueFPGAsize(int)));
+
+ m_serialThreadSTM32 = new QThread();
+ serialSTM32 = new Serial("/dev/ttyAS2");
+
+ connect(m_serialThreadSTM32,&QThread::started,serialSTM32,&Serial::startInitSlot);
+
+ serialSTM32->moveToThread(m_serialThreadSTM32);
+ connect(serialSTM32,SIGNAL(sendQueueData(int,int,unsigned char*,int,int)),sysPara->devOp,SLOT(resendSTM32Date(int,int,unsigned char*,int,int)));
+ connect(sysPara->devOp,SIGNAL(sendSerialDataToSTM32(int,int,unsigned char*,int,int)),serialSTM32,SLOT(sendSerialData(int,int,unsigned char*,int,int)));
+ connect(serialSTM32,SIGNAL(getSTM32Status(unsigned char*)),this,SLOT(saveSTM32Status(unsigned char*)));
+ connect(serialSTM32,SIGNAL(getGearPumpVal(unsigned char*)),this,SLOT(saveGearPumpVal(unsigned char*)));
+ connect(serialSTM32,SIGNAL(getPulseCnt(unsigned char*)),this,SLOT(savePulseCntVal(unsigned char*)));
+ connect(serialSTM32,SIGNAL(getSTM32Version(unsigned char*)),this,SLOT(saveSTM32Version(unsigned char*)));
+ connect(serialSTM32,SIGNAL(getSTM32Time(unsigned char*)),this,SLOT(saveSTM32Time(unsigned char*)));
+ connect(serialSTM32,SIGNAL(stopSendData(bool)),this,SLOT(stopSendSTM32Data(bool)));
+ connect(serialSTM32,SIGNAL(powerOffReady()),ui->tabMainWindow,SLOT(powerOffConfirmed()));
+
+ connect(serialSTM32,SIGNAL(queueSizeSTM32(int)),ui->tabMainWindow,SLOT(showSTM32queuesize(int)));
+ connect(ui->tabSystemManage,SIGNAL(upgradeSTM32(QString)),serialSTM32,SLOT(upgradeSTM32File(QString)));
+ connect(ui->tabSystemManage,SIGNAL(enableClick(bool)),this,SLOT(enableInkJetTabClick(bool)));
+ connect(serialSTM32,SIGNAL(progress(int,int)),ui->tabSystemManage,SLOT(progressBarControl(int,int)));
+
+ connect(ui->tabSystemManage,SIGNAL(sigToCloseSerialFPGA()),this,SLOT(closeSerialFPGA()));
+ connect(ui->tabSystemManage,SIGNAL(sigToCloseSerialSTM32()),this,SLOT(closeSerialSTM32()));
+ connect(ui->tabSystemManage,SIGNAL(restartSerial()),this,SLOT(restartSerialPort()));
+ flagOfSerialThreadStratEn = true;
+
+ connect(this,SIGNAL(showReclaimTankstatus(unsigned char)),ui->tabPrintSetting,SLOT(showReclaimTankstatusslot(unsigned char)));
+ connect(this,SIGNAL(showMotorIsen(int,int)),ui->tabPrintSetting,SLOT(showMotorIsenVal(int,int)));
+ connect(ui->tabPrintSetting,SIGNAL(HiddenFunction(bool)),ui->tabMainWindow->getTexteditOption(),SLOT(SetHiddenValue(bool)));
+ ui->tabMainWindow->SetEditMode(sysPara->para.EditMode);
+ ui->tabOtherInfo->bindSysPara(para);
+ ui->tabPrintSetting->bindSysPara(para);
+ ui->tabSystemSetting->bindSysPara(para);
+ ui->tabOtherInfo->bindSysPara(para);
+ ui->tabTriggerMode->bindSysPara(para);
+ ui->tabSystemManage->bindSysPara(para);
+ ui->tabPicEdit->bindSysPara(para);
+ ui->tabNetworkManager->bindSysPara(para);
+
+ ui->tabSystemManage->loadKeyBoardType();
+
+ //以下两个信号要在(ui->tabMainWindow->updateSysParaToUI();)之前绑定,否则获取不到文本框的更新值
+ connect (ui->tabTriggerMode,SIGNAL(autoUpdateFontWidthByTriggerCtrl(const unsigned int)),ui->tabPrintSetting,SLOT(autoUpdateFontWidth(const unsigned int)));
+ connect (ui->tabMainWindow,SIGNAL(autoUpdateFontWidthByMainWindow(const unsigned int)),ui->tabPrintSetting,SLOT(autoUpdateFontWidth(const unsigned int)));
+ connect(ui->tabMainWindow,SIGNAL(readFPGAVersionReady()),ui->tabPrintSetting,SLOT(getFpgaVersionSetDisable()));
+ ui->tabMainWindow->updateSysParaToUI();
+
+ ui->tabPrintSetting->updateSysParaToUI();
+ ui->tabSystemSetting->updateSysParaToUI();
+ ui->tabOtherInfo->updateSysParaToUI();
+ ui->tabTriggerMode->updateSysParaToUI();
+
+ dlgShowMsg =new DlgShowMsg;
+ dlgShowMsg->hide();
+
+#ifdef __RFID_CARD
+ initRFIDManager();
+#endif
+ timer = new QTimer();
+ connect(timer, SIGNAL(timeout()), this, SLOT(timerHandler()));
+ timer->start(10);
+
+ qDebug()<<"timer status:"<isActive();
+
+ viscosity_timer = new QTimer();
+ connect(viscosity_timer, SIGNAL(timeout()), this, SLOT(viscosity_timerHandler()));
+
+ if(sysPara->para.gearPumpEnable)
+ {
+ pushButtonStartFlag = true;
+ }
+
+ connect(this,SIGNAL(currentChanged(int)),this,SLOT(onInkJetPrinterCurrentChanged(int)));
+ connect(this,SIGNAL(setReclaimTankCurrentPos(int)),ui->tabMainWindow,SLOT(onReclainTankPositionChanged(int)));
+
+ connect(this,SIGNAL(reclaimTankCloseDone()),ui->tabMainWindow,SLOT(checkForPowerOff()));
+ connect(this,SIGNAL(reclaimTankBlock()),this,SLOT(onReclaimTankBlock()));
+ connect(ui->tabPrintSetting,SIGNAL(authChanged(int)),this,SLOT(onAuthChanged(int)));
+ connect (this,SIGNAL(sendPicScene(PicScene*)),ui->tabPrintSetting,SLOT(updateUIForSpecialCondition(PicScene*)));
+
+ connect(ui->tabPrintSetting,SIGNAL(authChanged(int)),ui->tabOtherInfo,SLOT(onAuthChanged(int)));
+ //test
+ connect(ui->tabMainWindow,SIGNAL(InkjetCleanUP()),ui->tabSystemSetting,SLOT(on_pushButtonCleanUP_pressed()));
+ connect(ui->tabMainWindow,SIGNAL(clearPressureFault()),this,SLOT(resetPressureCnt()));
+ connect(ui->tabSystemSetting,SIGNAL(pressureAdjust()),this,SLOT(pressureAdjustForsystemseeting()));
+
+#ifdef COUNTER1_BY_GROUP /* 分段计米 */
+ connect(this,SIGNAL(updateCnt1GroupDisp(bool)),
+ ui->tabPrintSetting,SLOT(onUpdateCnt1GroupDisp(bool)));
+#endif
+ initCntGroup();
+
+ msgtest = new QMessageBox(this);
+ connect(msgtest, SIGNAL(finished(int)), this, SLOT(OnFinished(int)));
+ msgBox1 = new QMessageBox(this);
+ connect(msgBox1, SIGNAL(finished(int)), this, SLOT(OnBoxFinished(int)));
+
+ connect(ui->tabPrintSetting->dlgInputAddr,SIGNAL(printErrorStatus(QString,unsigned int)),this,SLOT(onPrintErrorStatus(QString,unsigned int)));//
+ connect(ui->tabSystemSetting,SIGNAL(changeEditMode(int)),this,SLOT(onchangeEditMode(int)));
+ connect(ui->tabSystemSetting,SIGNAL(setRunStatus(QString )),ui->tabMainWindow,SLOT(setRunStatus(QString)));
+
+ connect(ui->tabPrintSetting->dlgInputAddr,SIGNAL(changeMac(QString)),ui->tabMainWindow,SLOT(UpdateUIVersion()));
+ connect(ui->tabSystemManage,SIGNAL(enableReclaimButton(bool)),ui->tabMainWindow,SLOT(onEnableReclaimCtrlButton(bool)));
+ connect(ui->tabSystemManage,SIGNAL(configChanged(void)),this,SLOT(onConfigChanged(void)));
+ connect(ui->tabPrintSetting, SIGNAL(change_OutputPulse()), ui->tabTriggerMode, SLOT(OutputPulse()));
+ connect (ui->tabMainWindow,SIGNAL(openFileChange()),ui->tabPrintSetting,SLOT( PrintupdateSysParaToUI() ));
+ connect (ui->tabMainWindow,SIGNAL(openFileChange()),ui->tabSystemSetting,SLOT( SystemupdateSysParaToUI() ));
+ connect (ui->tabMainWindow,SIGNAL(openFileChange()),ui->tabOtherInfo,SLOT( OtherupdateSysParaToUI() ));
+ connect (ui->tabMainWindow,SIGNAL(openFileChange()),ui->tabTriggerMode,SLOT( TriggerupdateSysParaToUI() ));
+ connect (ui->tabMainWindow,SIGNAL(openFileChange()),ui->tabMainWindow->getTexteditOption(),SLOT( updateSysParaToZero() ));
+ connect (ui->tabMainWindow,SIGNAL(setMainTabNow(int)),this,SLOT(setCurrentIndex(int)));
+ //if(sysPara->para.EditMode==PICFILE){
+ connect(ui->tabPrintSetting,SIGNAL(authChanged(int)),ui->tabPicEdit,SLOT(updateAuthorization(int)));// 字库编辑使能
+ connect (ui->tabPicEdit,SIGNAL(setMainTabNow(int)),this,SLOT(setCurrentIndex(int)));
+ connect (ui->tabPicEdit ,SIGNAL(openCurrentFile (QString ,bool )),ui->tabMainWindow,SLOT(openPicFIleOpen(QString ,bool )));
+ connect (ui->tabMainWindow,SIGNAL(openCurrFile(QString)),ui->tabPicEdit,SLOT( EditCurrFile(QString)));
+ connect (ui->tabPicEdit ,SIGNAL(setMainTabEdit (int)),ui->tabMainWindow,SLOT(SetMainTabEdit(int)));
+ //}
+ //connect (ui->tabPrintSetting,SIGNAL(setMainTabNow(int)),this,SLOT(setCurrentIndex(int)));
+
+ connect (ui->tabMainWindow,SIGNAL(openCurrFile(QString)),this,SLOT(onChangeTab(QString)));
+
+ connect(ui->tabPrintSetting,SIGNAL(checkPrintIntervalSignal()),ui->tabMainWindow,SLOT(checkPrintingInterval()));
+ connect(ui->tabTriggerMode,SIGNAL(checkPrintIntervalSignal()),ui->tabMainWindow,SLOT(checkPrintingInterval()));
+
+ connect (ui->tabMainWindow,SIGNAL(CloseJd()),this,SLOT(close_jd_timer()));
+ connect (ui->tabMainWindow,SIGNAL(pushButtonStartPressed(bool)),this,SLOT(handlePushButtonStartPressed(bool)));
+ connect (ui->tabMainWindow,SIGNAL(repeatInitedPid()),this,SLOT(handleInitedPID()));
+ connect (ui->tabMainWindow,SIGNAL(setCNT1Select(bool)),ui->tabPrintSetting,SLOT(setCNT1BackColor(bool)));
+ connect (ui->tabMainWindow,SIGNAL(setCNT2Select(bool)),ui->tabPrintSetting,SLOT(setCNT2BackColor(bool)));
+ connect (ui->tabMainWindow,SIGNAL(setCNT3Select(bool)),ui->tabPrintSetting,SLOT(setCNT3BackColor(bool)));
+ connect(ui->tabMainWindow,SIGNAL(setDisableAll()),this,SLOT(disableTabClick()));
+
+ connect(ui->tabPrintSetting,SIGNAL(engineerMode(bool)),ui->tabSystemManage,SLOT(engieerModeAcceptSystemManage(bool)));
+ connect(ui->tabPrintSetting, SIGNAL(engineerMode(bool)), ui->tabSystemSetting, SLOT(setFreqFixVisible(bool)));
+
+ sysPara->status.rWarnViscoReady=0;
+
+ // hlp: 260608: 以授权为标准,不过度开放权限
+ onAuthChanged(AUTH_NONE);
+// onAuthChanged(AUTH_NONE | AUTH_SUPER_USER2 |AUTH_DISPLAY_SYSTEM_SETTING| 0xffff);
+
+
+ sysPara->status.WorkTimeOut=0;
+ ui->tabMainWindow->changeEditMode(0);
+ emit onchangeEditMode(0); // 20140912
+ sysPara->devOp->printCtrl( PRINT_CTRL_STOP);
+#ifdef MYTEST
+ onAuthChanged(AUTH_NONE | AUTH_SUPER_USER2 |AUTH_DISPLAY_SYSTEM_SETTING| 0xffff);
+#else
+ ui->tabMainWindow->on_pushButtonReclaimTankClose_pressed();
+#endif
+ sysPara->status.viscosityFaultCnt=0;
+ setCurrentIndex(0);
+ sysPara->status.updateSoftEN=0;
+ sysPara->status.adjHightVolInitEN=0;
+ sysPara->status.FileChangeRestCntFlag=0;
+ sysPara->status.HVFaultCloseEn=0;
+ sysPara->devOp->printCtrl( PRINT_CTRL_STOP);
+ sysPara->devOp->writeFpgaCalandar(1);
+ //qDebug()<para.calandar_and_dat.year;
+ sysPara->status.cnt1GroupRunningIndex=0;
+ //sysPara->status.cnt1RepeatCurrent=0;
+ sysPara->status.cnt1GroupCurrentLoop=0;
+
+ //JSON data
+ connect(ui->tabNetworkManager, SIGNAL(updateJSONData()), ui->tabMainWindow, SLOT(JSON_UpdateDATA()), Qt::QueuedConnection);
+ connect(ui->tabNetworkManager,SIGNAL(net_stopPrint()),ui->tabMainWindow,SLOT(on_pushButtonStopPrint_pressed()), Qt::QueuedConnection);
+ connect(ui->tabMainWindow,SIGNAL(getJSONData()),ui->tabNetworkManager,SLOT(on_GetJsonpushButton_clicked()), Qt::QueuedConnection);
+ connect(ui->tabNetworkManager,SIGNAL(OpenNewFile()),ui->tabMainWindow->getTexteditOption(),SLOT(onOpenNewFile()), Qt::QueuedConnection);
+ //JSON data
+#ifdef MODBUS
+
+ modbus = NULL;
+ memset((uint8_t *)&sysPara->modbusParas, 0, sizeof(sysPara->modbusParas));
+ sysPara->modbusStatus.receiveEnbleFlag = 1;
+ snprintf((char *)sysPara->modbusParas.selectFileName, sizeof(sysPara->modbusParas.selectFileName), "%s",QFileInfo(sysPara->para.lastOpenedFileName).fileName().toLatin1().constData());
+ modbus = new ModbusTcp(&sysPara->modbusParas, &sysPara->modbusStatus);
+ m_thread = new QThread();
+ modbus->moveToThread(m_thread);
+ connect(m_thread, SIGNAL(started()),modbus,SLOT(pvPollingThread()));
+ connect(modbus, SIGNAL(updateQRcode()), ui->tabMainWindow, SLOT(modbusUpdateQRCode()), Qt::QueuedConnection);
+ connect(modbus, SIGNAL(openFile(QString,bool)), ui->tabMainWindow->getTexteditOption(), SLOT(onFileOpen(QString,bool)), Qt::QueuedConnection);
+ connect(modbus, SIGNAL(startPrint()), ui->tabMainWindow, SLOT(on_pushButtonStartPrint_pressed()), Qt::QueuedConnection);
+ connect(modbus, SIGNAL(pausePrint()), ui->tabMainWindow, SLOT(on_pushButtonPausePrint_pressed()), Qt::QueuedConnection);//暂时屏蔽排除问题
+ connect(modbus,SIGNAL(stopPrint()),ui->tabMainWindow,SLOT(on_pushButtonStopPrint_pressed()), Qt::QueuedConnection);
+ connect(modbus,SIGNAL(writeCalendar()),this,SLOT(onModbusWriteCalendar()), Qt::QueuedConnection);
+ connect(modbus,SIGNAL(writeCalendar1()),this,SLOT(onModbusWriteCalendar1CurrValue()), Qt::QueuedConnection);
+ connect(modbus,SIGNAL(writeCalendar1EndValue()),this,SLOT(onModbusWriteCalendar1EndValue()), Qt::QueuedConnection);
+ connect(modbus,SIGNAL(writeCalendar2EndValue()),this,SLOT(onModbusWriteCalendar2EndValue()), Qt::QueuedConnection);
+ connect(modbus,SIGNAL(writeCalendar2RepeatValue()),this,SLOT(onModbusWriteCalendar2RepeatValue()), Qt::QueuedConnection);
+ connect(modbus,SIGNAL(writeCalendar2InitValue()),this,SLOT(onModbusWriteCalendar2InitValue()), Qt::QueuedConnection);
+ connect(modbus,SIGNAL(CNTResetNow()),ui->tabMainWindow,SLOT(onModbusCNTResetNowPressed()), Qt::QueuedConnection);
+ connect(modbus,SIGNAL(faultResume()),ui->tabMainWindow,SLOT(onLabelFaultRusumePressed()), Qt::QueuedConnection);
+ connect(modbus,SIGNAL(mbLineAndCharSpace(int, int)),ui->tabMainWindow->getTexteditOption(),SLOT(onMbSetLineAndChar(int, int)), Qt::QueuedConnection);
+ connect(this,SIGNAL(updataPara2UI()),ui->tabPrintSetting,SLOT( PrintupdateSysParaToUI() ), Qt::QueuedConnection);
+ connect(this, SIGNAL(openFile(QString,bool)), ui->tabMainWindow->getTexteditOption(), SLOT(onFileOpen(QString,bool)), Qt::QueuedConnection);
+ connect(this, SIGNAL(startPrint()), ui->tabMainWindow, SLOT(on_pushButtonStartPrint_pressed()), Qt::QueuedConnection);
+#endif
+
+ ui->tabMainWindow->enableReclaimCtrlButton(false);
+
+
+ //edit@12-14
+ connect(this,SIGNAL(currentChanged(int)),ui->tabMainWindow,SLOT(onInkJetPrinterCurrentChanged(int)), Qt::QueuedConnection);
+ //pidControllerInit();
+ PID_init();
+
+ removeTab(indexOf(ui->tabDacAdjust));
+ removeTab(indexOf(ui->tabFpgaDebug));
+ ui->tabWidget->removeTab(ui->tabWidget->indexOf(ui->tab_3));
+
+ ui->vol0SpinBox->setMinimum(0);
+ ui->vol1SpinBox->setMinimum(0);
+ ui->vol2SpinBox->setMinimum(0);
+ ui->vol3SpinBox->setMinimum(0);
+ ui->vol4SpinBox->setMinimum(0);
+ ui->vol5SpinBox->setMinimum(0);
+ ui->vol6SpinBox->setMinimum(0);
+ ui->vol7SpinBox->setMinimum(0);
+ ui->vol8SpinBox->setMinimum(0);
+ ui->vol9SpinBox->setMinimum(0);
+ ui->vol10SpinBox->setMinimum(0);
+ ui->vol11SpinBox->setMinimum(0);
+ ui->vol12SpinBox->setMinimum(0);
+ ui->vol13SpinBox->setMinimum(0);
+ ui->vol14SpinBox->setMinimum(0);
+ ui->vol15SpinBox->setMinimum(0);
+ ui->vol16SpinBox->setMinimum(0);
+ ui->vol17SpinBox->setMinimum(0);
+ ui->vol18SpinBox->setMinimum(0);
+ ui->vol19SpinBox->setMinimum(0);
+ ui->vol20SpinBox->setMinimum(0);
+ ui->vol21SpinBox->setMinimum(0);
+ ui->vol22SpinBox->setMinimum(0);
+ ui->vol23SpinBox->setMinimum(0);
+ ui->vol24SpinBox->setMinimum(0);
+ ui->vol25SpinBox->setMinimum(0);
+ ui->vol26SpinBox->setMinimum(0);
+ ui->vol27SpinBox->setMinimum(0);
+ ui->vol28SpinBox->setMinimum(0);
+ ui->vol29SpinBox->setMinimum(0);
+ ui->vol30SpinBox->setMinimum(0);
+ ui->vol31SpinBox->setMinimum(0);
+ ui->vol32SpinBox->setMinimum(0);
+ ui->vol33SpinBox->setMinimum(0);
+ ui->vol34SpinBox->setMinimum(0);
+ ui->vol35SpinBox->setMinimum(0);
+ ui->vol36SpinBox->setMinimum(0);
+ ui->vol37SpinBox->setMinimum(0);
+ ui->vol38SpinBox->setMinimum(0);
+ ui->vol39SpinBox->setMinimum(0);
+
+ ui->vol0SpinBox->setMaximum(MAX_VOL);
+ ui->vol1SpinBox->setMaximum(MAX_VOL);
+ ui->vol2SpinBox->setMaximum(MAX_VOL);
+ ui->vol3SpinBox->setMaximum(MAX_VOL);
+ ui->vol4SpinBox->setMaximum(MAX_VOL);
+ ui->vol5SpinBox->setMaximum(MAX_VOL);
+ ui->vol6SpinBox->setMaximum(MAX_VOL);
+ ui->vol7SpinBox->setMaximum(MAX_VOL);
+ ui->vol8SpinBox->setMaximum(MAX_VOL);
+ ui->vol9SpinBox->setMaximum(MAX_VOL);
+ ui->vol10SpinBox->setMaximum(MAX_VOL);
+ ui->vol11SpinBox->setMaximum(MAX_VOL);
+ ui->vol12SpinBox->setMaximum(MAX_VOL);
+ ui->vol13SpinBox->setMaximum(MAX_VOL);
+ ui->vol14SpinBox->setMaximum(MAX_VOL);
+ ui->vol15SpinBox->setMaximum(MAX_VOL);
+ ui->vol16SpinBox->setMaximum(MAX_VOL);
+ ui->vol17SpinBox->setMaximum(MAX_VOL);
+ ui->vol18SpinBox->setMaximum(MAX_VOL);
+ ui->vol19SpinBox->setMaximum(MAX_VOL);
+ ui->vol20SpinBox->setMaximum(MAX_VOL);
+ ui->vol21SpinBox->setMaximum(MAX_VOL);
+ ui->vol22SpinBox->setMaximum(MAX_VOL);
+ ui->vol23SpinBox->setMaximum(MAX_VOL);
+ ui->vol24SpinBox->setMaximum(MAX_VOL);
+ ui->vol25SpinBox->setMaximum(MAX_VOL);
+ ui->vol26SpinBox->setMaximum(MAX_VOL);
+ ui->vol27SpinBox->setMaximum(MAX_VOL);
+ ui->vol28SpinBox->setMaximum(MAX_VOL);
+ ui->vol29SpinBox->setMaximum(MAX_VOL);
+ ui->vol30SpinBox->setMaximum(MAX_VOL);
+ ui->vol31SpinBox->setMaximum(MAX_VOL);
+ ui->vol32SpinBox->setMaximum(MAX_VOL);
+ ui->vol33SpinBox->setMaximum(MAX_VOL);
+ ui->vol34SpinBox->setMaximum(MAX_VOL);
+ ui->vol35SpinBox->setMaximum(MAX_VOL);
+ ui->vol36SpinBox->setMaximum(MAX_VOL);
+ ui->vol37SpinBox->setMaximum(MAX_VOL);
+ ui->vol38SpinBox->setMaximum(MAX_VOL);
+ ui->vol39SpinBox->setMaximum(MAX_VOL);
+
+ ui->fvol0SpinBox->setMinimum(0);
+ ui->fvol1SpinBox->setMinimum(0);
+ ui->fvol2SpinBox->setMinimum(0);
+ ui->fvol3SpinBox->setMinimum(0);
+ ui->fvol4SpinBox->setMinimum(0);
+ ui->fvol5SpinBox->setMinimum(0);
+ ui->fvol6SpinBox->setMinimum(0);
+ ui->fvol7SpinBox->setMinimum(0);
+ ui->fvol8SpinBox->setMinimum(0);
+ ui->fvol9SpinBox->setMinimum(0);
+ ui->fvol10SpinBox->setMinimum(0);
+ ui->fvol11SpinBox->setMinimum(0);
+ ui->fvol12SpinBox->setMinimum(0);
+ ui->fvol13SpinBox->setMinimum(0);
+ ui->fvol14SpinBox->setMinimum(0);
+ ui->fvol15SpinBox->setMinimum(0);
+ ui->fvol16SpinBox->setMinimum(0);
+ ui->fvol17SpinBox->setMinimum(0);
+ ui->fvol18SpinBox->setMinimum(0);
+ ui->fvol19SpinBox->setMinimum(0);
+ ui->fvol20SpinBox->setMinimum(0);
+ ui->fvol21SpinBox->setMinimum(0);
+ ui->fvol22SpinBox->setMinimum(0);
+ ui->fvol23SpinBox->setMinimum(0);
+ ui->fvol24SpinBox->setMinimum(0);
+ ui->fvol25SpinBox->setMinimum(0);
+ ui->fvol26SpinBox->setMinimum(0);
+ ui->fvol27SpinBox->setMinimum(0);
+ ui->fvol28SpinBox->setMinimum(0);
+ ui->fvol29SpinBox->setMinimum(0);
+ ui->fvol30SpinBox->setMinimum(0);
+ ui->fvol31SpinBox->setMinimum(0);
+ ui->fvol32SpinBox->setMinimum(0);
+ ui->fvol33SpinBox->setMinimum(0);
+ ui->fvol34SpinBox->setMinimum(0);
+ ui->fvol35SpinBox->setMinimum(0);
+ ui->fvol36SpinBox->setMinimum(0);
+ ui->fvol37SpinBox->setMinimum(0);
+ ui->fvol38SpinBox->setMinimum(0);
+ ui->fvol39SpinBox->setMinimum(0);
+
+ ui->fvol0SpinBox->setMaximum(MAX_VOL);
+ ui->fvol1SpinBox->setMaximum(MAX_VOL);
+ ui->fvol2SpinBox->setMaximum(MAX_VOL);
+ ui->fvol3SpinBox->setMaximum(MAX_VOL);
+ ui->fvol4SpinBox->setMaximum(MAX_VOL);
+ ui->fvol5SpinBox->setMaximum(MAX_VOL);
+ ui->fvol6SpinBox->setMaximum(MAX_VOL);
+ ui->fvol7SpinBox->setMaximum(MAX_VOL);
+ ui->fvol8SpinBox->setMaximum(MAX_VOL);
+ ui->fvol9SpinBox->setMaximum(MAX_VOL);
+ ui->fvol10SpinBox->setMaximum(MAX_VOL);
+ ui->fvol11SpinBox->setMaximum(MAX_VOL);
+ ui->fvol12SpinBox->setMaximum(MAX_VOL);
+ ui->fvol13SpinBox->setMaximum(MAX_VOL);
+ ui->fvol14SpinBox->setMaximum(MAX_VOL);
+ ui->fvol15SpinBox->setMaximum(MAX_VOL);
+ ui->fvol16SpinBox->setMaximum(MAX_VOL);
+ ui->fvol17SpinBox->setMaximum(MAX_VOL);
+ ui->fvol18SpinBox->setMaximum(MAX_VOL);
+ ui->fvol19SpinBox->setMaximum(MAX_VOL);
+ ui->fvol20SpinBox->setMaximum(MAX_VOL);
+ ui->fvol21SpinBox->setMaximum(MAX_VOL);
+ ui->fvol22SpinBox->setMaximum(MAX_VOL);
+ ui->fvol23SpinBox->setMaximum(MAX_VOL);
+ ui->fvol24SpinBox->setMaximum(MAX_VOL);
+ ui->fvol25SpinBox->setMaximum(MAX_VOL);
+ ui->fvol26SpinBox->setMaximum(MAX_VOL);
+ ui->fvol27SpinBox->setMaximum(MAX_VOL);
+ ui->fvol28SpinBox->setMaximum(MAX_VOL);
+ ui->fvol29SpinBox->setMaximum(MAX_VOL);
+ ui->fvol30SpinBox->setMaximum(MAX_VOL);
+ ui->fvol31SpinBox->setMaximum(MAX_VOL);
+ ui->fvol32SpinBox->setMaximum(MAX_VOL);
+ ui->fvol33SpinBox->setMaximum(MAX_VOL);
+ ui->fvol34SpinBox->setMaximum(MAX_VOL);
+ ui->fvol35SpinBox->setMaximum(MAX_VOL);
+ ui->fvol36SpinBox->setMaximum(MAX_VOL);
+ ui->fvol37SpinBox->setMaximum(MAX_VOL);
+ ui->fvol38SpinBox->setMaximum(MAX_VOL);
+ ui->fvol39SpinBox->setMaximum(MAX_VOL);
+
+ ui->cVol0SpinBox->setMinimum(0);
+ ui->cVol1SpinBox->setMinimum(0);
+ ui->cVol2SpinBox->setMinimum(0);
+ ui->cVol3SpinBox->setMinimum(0);
+ ui->cVol4SpinBox->setMinimum(0);
+ ui->cVol5SpinBox->setMinimum(0);
+ ui->cVol6SpinBox->setMinimum(0);
+ ui->cVol7SpinBox->setMinimum(0);
+ ui->cVol8SpinBox->setMinimum(0);
+ ui->cVol9SpinBox->setMinimum(0);
+ ui->cVol10SpinBox->setMinimum(0);
+ ui->cVol11SpinBox->setMinimum(0);
+ ui->cVol12SpinBox->setMinimum(0);
+ ui->cVol13SpinBox->setMinimum(0);
+ ui->cVol14SpinBox->setMinimum(0);
+ ui->cVol15SpinBox->setMinimum(0);
+ ui->cVol16SpinBox->setMinimum(0);
+ ui->cVol17SpinBox->setMinimum(0);
+ ui->cVol18SpinBox->setMinimum(0);
+ ui->cVol19SpinBox->setMinimum(0);
+ ui->cVol20SpinBox->setMinimum(0);
+ ui->cVol21SpinBox->setMinimum(0);
+ ui->cVol22SpinBox->setMinimum(0);
+ ui->cVol23SpinBox->setMinimum(0);
+ ui->cVol24SpinBox->setMinimum(0);
+ ui->cVol25SpinBox->setMinimum(0);
+ ui->cVol26SpinBox->setMinimum(0);
+ ui->cVol27SpinBox->setMinimum(0);
+ ui->cVol28SpinBox->setMinimum(0);
+ ui->cVol29SpinBox->setMinimum(0);
+ ui->cVol30SpinBox->setMinimum(0);
+ ui->cVol31SpinBox->setMinimum(0);
+ ui->cVol32SpinBox->setMinimum(0);
+ ui->cVol33SpinBox->setMinimum(0);
+ ui->cVol34SpinBox->setMinimum(0);
+ ui->cVol35SpinBox->setMinimum(0);
+ ui->cVol36SpinBox->setMinimum(0);
+ ui->cVol37SpinBox->setMinimum(0);
+ ui->cVol38SpinBox->setMinimum(0);
+ ui->cVol39SpinBox->setMinimum(0);
+
+ ui->cVol0SpinBox->setMaximum(MAX_VOL);
+ ui->cVol1SpinBox->setMaximum(MAX_VOL);
+ ui->cVol2SpinBox->setMaximum(MAX_VOL);
+ ui->cVol3SpinBox->setMaximum(MAX_VOL);
+ ui->cVol4SpinBox->setMaximum(MAX_VOL);
+ ui->cVol5SpinBox->setMaximum(MAX_VOL);
+ ui->cVol6SpinBox->setMaximum(MAX_VOL);
+ ui->cVol7SpinBox->setMaximum(MAX_VOL);
+ ui->cVol8SpinBox->setMaximum(MAX_VOL);
+ ui->cVol9SpinBox->setMaximum(MAX_VOL);
+ ui->cVol10SpinBox->setMaximum(MAX_VOL);
+ ui->cVol11SpinBox->setMaximum(MAX_VOL);
+ ui->cVol12SpinBox->setMaximum(MAX_VOL);
+ ui->cVol13SpinBox->setMaximum(MAX_VOL);
+ ui->cVol14SpinBox->setMaximum(MAX_VOL);
+ ui->cVol15SpinBox->setMaximum(MAX_VOL);
+ ui->cVol16SpinBox->setMaximum(MAX_VOL);
+ ui->cVol17SpinBox->setMaximum(MAX_VOL);
+ ui->cVol18SpinBox->setMaximum(MAX_VOL);
+ ui->cVol19SpinBox->setMaximum(MAX_VOL);
+ ui->cVol20SpinBox->setMaximum(MAX_VOL);
+ ui->cVol21SpinBox->setMaximum(MAX_VOL);
+ ui->cVol22SpinBox->setMaximum(MAX_VOL);
+ ui->cVol23SpinBox->setMaximum(MAX_VOL);
+ ui->cVol24SpinBox->setMaximum(MAX_VOL);
+ ui->cVol25SpinBox->setMaximum(MAX_VOL);
+ ui->cVol26SpinBox->setMaximum(MAX_VOL);
+ ui->cVol27SpinBox->setMaximum(MAX_VOL);
+ ui->cVol28SpinBox->setMaximum(MAX_VOL);
+ ui->cVol29SpinBox->setMaximum(MAX_VOL);
+ ui->cVol30SpinBox->setMaximum(MAX_VOL);
+ ui->cVol31SpinBox->setMaximum(MAX_VOL);
+ ui->cVol32SpinBox->setMaximum(MAX_VOL);
+ ui->cVol33SpinBox->setMaximum(MAX_VOL);
+ ui->cVol34SpinBox->setMaximum(MAX_VOL);
+ ui->cVol35SpinBox->setMaximum(MAX_VOL);
+ ui->cVol36SpinBox->setMaximum(MAX_VOL);
+ ui->cVol37SpinBox->setMaximum(MAX_VOL);
+ ui->cVol38SpinBox->setMaximum(MAX_VOL);
+ ui->cVol39SpinBox->setMaximum(MAX_VOL);
+
+ loadVoltageValue();
+ connect(ui->savePushButton,SIGNAL(clicked()), this,SLOT( DacAdjustStore()));
+ sysPara->status.statWarn = sysPara->status.statWarn | WARN_STATUS_INK_WARN; //先置墨水标示为1
+ sleep(3);
+ qApp->installEventFilter(this);
+}
+
+
+void InkJetPrinter::loadVoltageValue()
+{
+ ui->vol0SpinBox->setValue(sysPara->para.printed_adj_dac[0]);
+ ui->vol1SpinBox->setValue(sysPara->para.printed_adj_dac[1]);
+ ui->vol2SpinBox->setValue(sysPara->para.printed_adj_dac[2]);
+ ui->vol3SpinBox->setValue(sysPara->para.printed_adj_dac[3]);
+ ui->vol4SpinBox->setValue(sysPara->para.printed_adj_dac[4]);
+ ui->vol5SpinBox->setValue(sysPara->para.printed_adj_dac[5]);
+ ui->vol6SpinBox->setValue(sysPara->para.printed_adj_dac[6]);
+ ui->vol7SpinBox->setValue(sysPara->para.printed_adj_dac[7]);
+ ui->vol8SpinBox->setValue(sysPara->para.printed_adj_dac[8]);
+ ui->vol9SpinBox->setValue(sysPara->para.printed_adj_dac[9]);
+
+ ui->vol10SpinBox->setValue(sysPara->para.printed_adj_dac[10]);
+ ui->vol11SpinBox->setValue(sysPara->para.printed_adj_dac[11]);
+ ui->vol12SpinBox->setValue(sysPara->para.printed_adj_dac[12]);
+ ui->vol13SpinBox->setValue(sysPara->para.printed_adj_dac[13]);
+ ui->vol14SpinBox->setValue(sysPara->para.printed_adj_dac[14]);
+ ui->vol15SpinBox->setValue(sysPara->para.printed_adj_dac[15]);
+ ui->vol16SpinBox->setValue(sysPara->para.printed_adj_dac[16]);
+ ui->vol17SpinBox->setValue(sysPara->para.printed_adj_dac[17]);
+ ui->vol18SpinBox->setValue(sysPara->para.printed_adj_dac[18]);
+ ui->vol19SpinBox->setValue(sysPara->para.printed_adj_dac[19]);
+
+ ui->vol20SpinBox->setValue(sysPara->para.printed_adj_dac[20]);
+ ui->vol21SpinBox->setValue(sysPara->para.printed_adj_dac[21]);
+ ui->vol22SpinBox->setValue(sysPara->para.printed_adj_dac[22]);
+ ui->vol23SpinBox->setValue(sysPara->para.printed_adj_dac[23]);
+ ui->vol24SpinBox->setValue(sysPara->para.printed_adj_dac[24]);
+ ui->vol25SpinBox->setValue(sysPara->para.printed_adj_dac[25]);
+ ui->vol26SpinBox->setValue(sysPara->para.printed_adj_dac[26]);
+ ui->vol27SpinBox->setValue(sysPara->para.printed_adj_dac[27]);
+ ui->vol28SpinBox->setValue(sysPara->para.printed_adj_dac[28]);
+ ui->vol29SpinBox->setValue(sysPara->para.printed_adj_dac[29]);
+
+ ui->vol30SpinBox->setValue(sysPara->para.printed_adj_dac[30]);
+ ui->vol31SpinBox->setValue(sysPara->para.printed_adj_dac[31]);
+ ui->vol32SpinBox->setValue(sysPara->para.printed_adj_dac[32]);
+ ui->vol33SpinBox->setValue(sysPara->para.printed_adj_dac[33]);
+ ui->vol34SpinBox->setValue(sysPara->para.printed_adj_dac[34]);
+ ui->vol35SpinBox->setValue(sysPara->para.printed_adj_dac[35]);
+ ui->vol36SpinBox->setValue(sysPara->para.printed_adj_dac[36]);
+ ui->vol37SpinBox->setValue(sysPara->para.printed_adj_dac[37]);
+ ui->vol38SpinBox->setValue(sysPara->para.printed_adj_dac[38]);
+ ui->vol39SpinBox->setValue(sysPara->para.printed_adj_dac[39]);
+
+ ui->cVol0SpinBox->setValue(sysPara->para.printed_continue_col_dac[0]);
+ ui->cVol1SpinBox->setValue(sysPara->para.printed_continue_col_dac[1]);
+ ui->cVol2SpinBox->setValue(sysPara->para.printed_continue_col_dac[2]);
+ ui->cVol3SpinBox->setValue(sysPara->para.printed_continue_col_dac[3]);
+ ui->cVol4SpinBox->setValue(sysPara->para.printed_continue_col_dac[4]);
+ ui->cVol5SpinBox->setValue(sysPara->para.printed_continue_col_dac[5]);
+ ui->cVol6SpinBox->setValue(sysPara->para.printed_continue_col_dac[6]);
+ ui->cVol7SpinBox->setValue(sysPara->para.printed_continue_col_dac[7]);
+ ui->cVol8SpinBox->setValue(sysPara->para.printed_continue_col_dac[8]);
+ ui->cVol9SpinBox->setValue(sysPara->para.printed_continue_col_dac[9]);
+
+ ui->cVol10SpinBox->setValue(sysPara->para.printed_continue_col_dac[10]);
+ ui->cVol11SpinBox->setValue(sysPara->para.printed_continue_col_dac[11]);
+ ui->cVol12SpinBox->setValue(sysPara->para.printed_continue_col_dac[12]);
+ ui->cVol13SpinBox->setValue(sysPara->para.printed_continue_col_dac[13]);
+ ui->cVol14SpinBox->setValue(sysPara->para.printed_continue_col_dac[14]);
+ ui->cVol15SpinBox->setValue(sysPara->para.printed_continue_col_dac[15]);
+ ui->cVol16SpinBox->setValue(sysPara->para.printed_continue_col_dac[16]);
+ ui->cVol17SpinBox->setValue(sysPara->para.printed_continue_col_dac[17]);
+ ui->cVol18SpinBox->setValue(sysPara->para.printed_continue_col_dac[18]);
+ ui->cVol19SpinBox->setValue(sysPara->para.printed_continue_col_dac[19]);
+
+ ui->cVol20SpinBox->setValue(sysPara->para.printed_continue_col_dac[20]);
+ ui->cVol21SpinBox->setValue(sysPara->para.printed_continue_col_dac[21]);
+ ui->cVol22SpinBox->setValue(sysPara->para.printed_continue_col_dac[22]);
+ ui->cVol23SpinBox->setValue(sysPara->para.printed_continue_col_dac[23]);
+ ui->cVol24SpinBox->setValue(sysPara->para.printed_continue_col_dac[24]);
+ ui->cVol25SpinBox->setValue(sysPara->para.printed_continue_col_dac[25]);
+ ui->cVol26SpinBox->setValue(sysPara->para.printed_continue_col_dac[26]);
+ ui->cVol27SpinBox->setValue(sysPara->para.printed_continue_col_dac[27]);
+ ui->cVol28SpinBox->setValue(sysPara->para.printed_continue_col_dac[28]);
+ ui->cVol29SpinBox->setValue(sysPara->para.printed_continue_col_dac[29]);
+
+ ui->cVol30SpinBox->setValue(sysPara->para.printed_continue_col_dac[30]);
+ ui->cVol31SpinBox->setValue(sysPara->para.printed_continue_col_dac[31]);
+ ui->cVol32SpinBox->setValue(sysPara->para.printed_continue_col_dac[32]);
+ ui->cVol33SpinBox->setValue(sysPara->para.printed_continue_col_dac[33]);
+ ui->cVol34SpinBox->setValue(sysPara->para.printed_continue_col_dac[34]);
+ ui->cVol35SpinBox->setValue(sysPara->para.printed_continue_col_dac[35]);
+ ui->cVol36SpinBox->setValue(sysPara->para.printed_continue_col_dac[36]);
+ ui->cVol37SpinBox->setValue(sysPara->para.printed_continue_col_dac[37]);
+ ui->cVol38SpinBox->setValue(sysPara->para.printed_continue_col_dac[38]);
+ ui->cVol39SpinBox->setValue(sysPara->para.printed_continue_col_dac[39]);
+
+ ui->fvol0SpinBox->setValue(sysPara->para.printed_full_col_dac[0]);
+ ui->fvol1SpinBox->setValue(sysPara->para.printed_full_col_dac[1]);
+ ui->fvol2SpinBox->setValue(sysPara->para.printed_full_col_dac[2]);
+ ui->fvol3SpinBox->setValue(sysPara->para.printed_full_col_dac[3]);
+ ui->fvol4SpinBox->setValue(sysPara->para.printed_full_col_dac[4]);
+ ui->fvol5SpinBox->setValue(sysPara->para.printed_full_col_dac[5]);
+ ui->fvol6SpinBox->setValue(sysPara->para.printed_full_col_dac[6]);
+ ui->fvol7SpinBox->setValue(sysPara->para.printed_full_col_dac[7]);
+ ui->fvol8SpinBox->setValue(sysPara->para.printed_full_col_dac[8]);
+ ui->fvol9SpinBox->setValue(sysPara->para.printed_full_col_dac[9]);
+
+ ui->fvol10SpinBox->setValue(sysPara->para.printed_full_col_dac[10]);
+ ui->fvol11SpinBox->setValue(sysPara->para.printed_full_col_dac[11]);
+ ui->fvol12SpinBox->setValue(sysPara->para.printed_full_col_dac[12]);
+ ui->fvol13SpinBox->setValue(sysPara->para.printed_full_col_dac[13]);
+ ui->fvol14SpinBox->setValue(sysPara->para.printed_full_col_dac[14]);
+ ui->fvol15SpinBox->setValue(sysPara->para.printed_full_col_dac[15]);
+ ui->fvol16SpinBox->setValue(sysPara->para.printed_full_col_dac[16]);
+ ui->fvol17SpinBox->setValue(sysPara->para.printed_full_col_dac[17]);
+ ui->fvol18SpinBox->setValue(sysPara->para.printed_full_col_dac[18]);
+ ui->fvol19SpinBox->setValue(sysPara->para.printed_full_col_dac[19]);
+
+ ui->fvol20SpinBox->setValue(sysPara->para.printed_full_col_dac[20]);
+ ui->fvol21SpinBox->setValue(sysPara->para.printed_full_col_dac[21]);
+ ui->fvol22SpinBox->setValue(sysPara->para.printed_full_col_dac[22]);
+ ui->fvol23SpinBox->setValue(sysPara->para.printed_full_col_dac[23]);
+ ui->fvol24SpinBox->setValue(sysPara->para.printed_full_col_dac[24]);
+ ui->fvol25SpinBox->setValue(sysPara->para.printed_full_col_dac[25]);
+ ui->fvol26SpinBox->setValue(sysPara->para.printed_full_col_dac[26]);
+ ui->fvol27SpinBox->setValue(sysPara->para.printed_full_col_dac[27]);
+ ui->fvol28SpinBox->setValue(sysPara->para.printed_full_col_dac[28]);
+ ui->fvol29SpinBox->setValue(sysPara->para.printed_full_col_dac[29]);
+
+ ui->fvol30SpinBox->setValue(sysPara->para.printed_full_col_dac[30]);
+ ui->fvol31SpinBox->setValue(sysPara->para.printed_full_col_dac[31]);
+ ui->fvol32SpinBox->setValue(sysPara->para.printed_full_col_dac[32]);
+ ui->fvol33SpinBox->setValue(sysPara->para.printed_full_col_dac[33]);
+ ui->fvol34SpinBox->setValue(sysPara->para.printed_full_col_dac[34]);
+ ui->fvol35SpinBox->setValue(sysPara->para.printed_full_col_dac[35]);
+ ui->fvol36SpinBox->setValue(sysPara->para.printed_full_col_dac[36]);
+ ui->fvol37SpinBox->setValue(sysPara->para.printed_full_col_dac[37]);
+ ui->fvol38SpinBox->setValue(sysPara->para.printed_full_col_dac[38]);
+ ui->fvol39SpinBox->setValue(sysPara->para.printed_full_col_dac[39]);
+ if(sysPara->para.dacScale < 40 || sysPara->para.dacScale>150)
+ sysPara->para.dacScale = 100;
+}
+
+void InkJetPrinter::initCntGroup()
+{
+ connect(this, &InkJetPrinter::sig_updateDisp,
+ SectionalManager::instance(), &SectionalManager::sig_updateCntGroupDisp);
+}
+
+float PID_realize(float speed);
+
+struct _pid{
+ float SetSpeed;//定义设定值
+ float ActualSpeed;//定义实际值
+ float err;//定义偏差值
+ float err_last;//定义上一个偏差值
+ float Kp,Ki,Kd;//定义比例、积分、微分系数
+ float voltage;//定义电压值(控制执行器的变量)
+ float integral;//定义积分值
+ float integral_max; //积分限幅(根据实际调整)
+}pid;
+
+
+void PID_init(){
+ pid.SetSpeed=0.0;
+ pid.ActualSpeed=0.0;
+ pid.err=0.0;
+ pid.err_last=0.0;
+ pid.voltage=0.0;
+ pid.integral=0.0;
+ pid.Kp=0.21; //0.25
+ pid.Ki=0.006; //0.015
+ pid.Kd=0.0;
+}
+
+static float u = 1.0;
+float PID_realize(float speed, float act){
+ unsigned char index = 1;
+ pid.SetSpeed=speed;
+ pid.ActualSpeed = act;
+ pid.err=pid.SetSpeed-pid.ActualSpeed;
+ if(u < 900)
+ {
+ pid.integral+=pid.err;
+ }
+
+ pid.voltage=pid.Kp*pid.err + index*pid.Ki*pid.integral + pid.Kd*(pid.err-pid.err_last);
+ pid.err_last=pid.err;
+ pid.ActualSpeed =pid.voltage*1.0;
+ return pid.ActualSpeed;
+}
+
+float PID_realize2(float speed, float act){
+ // 增量式 PID:Δu = Kp*(e[k]-e[k-1]) + Ki*e[k]
+ pid.Kp = 0.15f;
+ pid.Ki = 0.02f;
+ pid.Kd = 0.0f;
+ pid.SetSpeed = speed;
+ pid.ActualSpeed = act;
+ pid.err = pid.SetSpeed - pid.ActualSpeed;
+
+ float delta_u = pid.Kp * (pid.err - pid.err_last)
+ + pid.Ki * pid.err;
+
+ // 自适应非对称限幅:
+ // 压力严重偏高(err < -30):允许快速减速,限制慢速加速
+ // 压力严重偏低(err > 50):允许正常加速,限制减速(避免过度降速)
+ // 接近目标:小步长,平稳调节
+ if(pid.err < -30.0f) {
+ if(delta_u > 1.0f) delta_u = 1.0f;
+ if(delta_u < -6.0f) delta_u = -6.0f;
+ } else if(pid.err > 50.0f) {
+ if(delta_u > 3.0f) delta_u = 3.0f;
+ if(delta_u < -2.0f) delta_u = -2.0f;
+ } else {
+ if(delta_u > 3.0f) delta_u = 3.0f;
+ if(delta_u < -3.0f) delta_u = -3.0f;
+ }
+
+ pid.err_last = pid.err;
+ return delta_u;
+}
+
+void InkJetPrinter::pressureAdj()
+{
+ if(sysPara->status.gearPumpRunStopFlag || sysPara->status.flagOfSpeedAlarm)
+ {
+ sysPara->para.gearPumpValue = 0;
+ u = 0.0f;
+ m_rampDone = false;
+ m_adjSkip = 0;
+ m_lastPressure = 0;
+ m_stableCount = 0;
+ for(int i = 0; i < 10; i++) m_pressureBuf[i] = 0;
+ m_bufIdx = 0;
+ sysPara->devOp->WriteMoterPump();
+ return;
+ }
+
+ if(!sysPara->para.gearPumpEnable)
+ {
+ if(u > 0 || ((sysPara->para.pressure - sysPara->status.PRESSURE) > 0))
+ u = PID_realize((float)sysPara->para.pressure, (float)sysPara->status.PRESSURE);
+ sysPara->para.gearPumpValue = (u > 0) ? (unsigned short)u : 0;
+ if(sysPara->para.gearPumpValue > 800)
+ sysPara->para.gearPumpValue = 800;
+ sysPara->devOp->WriteMoterPump();
+ return;
+ }
+
+ int maxValue = sysPara->para.flagOfReclaimPumEnable ? 420 : 800;
+ if(maxValue < 60) maxValue = 60;
+
+ int maxSpeed = (int)sysPara->para.gearPumpSpeedAlarm;
+
+ auto clampU = [&]() {
+ if(u < 60.0f) u = 60.0f;
+ if(u > (float)maxValue) u = (float)maxValue;
+ };
+
+ int actual = sysPara->status.PRESSURE;
+ int target = (int)sysPara->para.pressure;
+ int cur;
+
+ // 每次进入都更新滑动平均缓冲(软启动用瞬时值,闭环用平均值)
+ m_pressureBuf[m_bufIdx] = actual;
+ m_bufIdx = (m_bufIdx + 1) % 10;
+ int avgPressure = 0;
+ for(int i = 0; i < 10; i++) avgPressure += m_pressureBuf[i];
+ avgPressure /= 10;
+
+ // ---------------------------------------------------------------
+ // 硬保护:压力超过目标+50,立即强制减速,优先级最高
+ // 覆盖自检、软启动、闭环所有阶段
+ // ---------------------------------------------------------------
+ if(actual > target + 50)
+ {
+ float overErr = (float)(actual - (target + 50));
+ float delta = -0.1f * overErr;
+ if(delta < -15.0f) delta = -15.0f;
+ u += delta;
+ clampU();
+ m_lastPressure = actual;
+ sysPara->para.gearPumpValue = (unsigned short)(int)u;
+ sysPara->devOp->WriteMoterPump();
+ return;
+ }
+
+ // ---------------------------------------------------------------
+ // 软启动:自适应步长,每 800ms 一次
+ // 自检期间也走此逻辑(硬保护兜底),自检完成后重置重新收敛
+ // 软启动阶段不做压力稳定检测,优先快速收敛
+ // ---------------------------------------------------------------
+ if(!m_rampDone)
+ {
+ if(++m_adjSkip < 8)
+ {
+ sysPara->para.gearPumpValue = (unsigned short)(int)u;
+ sysPara->devOp->WriteMoterPump();
+ return;
+ }
+ m_adjSkip = 0;
+
+ int err = target - actual;
+
+ if(err < 0)
+ {
+ // 超压:小步减速
+ u -= 1.0f;
+ }
+ else
+ {
+ // 自适应步长:差得远步子大,差得近步子小
+ float step;
+ if (err > 200) step = 5.0f;
+ else if(err > 100) step = 3.0f;
+ else if(err > 50) step = 2.0f;
+ else step = 1.0f;
+ u += step;
+ }
+
+ clampU();
+
+ // 转速上限保护
+ if(sysPara->para.flagOfReclaimPumEnable &&
+ sysPara->status.gearPumpRunSpeed >= maxSpeed)
+ {
+ u -= 3.0f;
+ clampU();
+ }
+
+ cur = (int)u;
+
+ // 进入闭环条件:压力已稳定在目标±50以内
+ if(sysPara->status.selfCheckDone && err >= -50 && err <= 50)
+ {
+ m_rampDone = true;
+ m_adjSkip = 0;
+ }
+
+ sysPara->para.gearPumpValue = (unsigned short)cur;
+ sysPara->devOp->WriteMoterPump();
+ return;
+ }
+
+ // ---------------------------------------------------------------
+ // 闭环:等压力稳定后再调速,自适应管路响应时间
+ //
+ // 每100ms采样一次,连续3次压力变化<15认为稳定,才执行调速
+ // 最长等待5s(50次)兜底,防止管路持续抖动导致永远不调
+ //
+ // 调速后立即重置稳定计数,重新等待下一次稳定
+ //
+ // 分区Kp:误差大步子大,误差小步子小
+ // |err| > 100 → Kp=0.05,限幅±5
+ // |err| 50~100→ Kp=0.04,限幅±4
+ // |err| < 50 → Kp=0.03,限幅±3
+ // ---------------------------------------------------------------
+ {
+ // 稳定检测用平均值,滤掉传感器噪声
+ int pressureChange = avgPressure - m_lastPressure;
+ if(pressureChange < 0) pressureChange = -pressureChange;
+ m_lastPressure = avgPressure;
+ m_adjSkip++; // 复用为超时计数
+
+ bool stable = (pressureChange < 10);
+ bool timeout = (m_adjSkip >= 50); // 5s兜底
+
+ if(stable)
+ m_stableCount++;
+ else
+ m_stableCount = 0;
+
+ bool readyToAdj = (m_stableCount >= 15) || timeout;
+
+ if(!readyToAdj)
+ {
+ sysPara->para.gearPumpValue = (unsigned short)(int)u;
+ sysPara->devOp->WriteMoterPump();
+ return;
+ }
+
+ // 平均压力已稳定(或超时兜底),执行调速,重置计数
+ m_adjSkip = 0;
+ m_stableCount = 0;
+
+ // 误差用平均值计算,避免瞬时噪声影响调速幅度
+ float absErr = (float)(target - avgPressure);
+ if(absErr < 0.0f) absErr = -absErr;
+
+ float kp, capDelta;
+ if(absErr > 100.0f) { kp = 0.05f; capDelta = 5.0f; }
+ else if(absErr > 50.0f) { kp = 0.04f; capDelta = 4.0f; }
+ else { kp = 0.03f; capDelta = 3.0f; }
+
+ float err = (float)(target - avgPressure);
+ float delta_u = kp * err;
+
+ if(delta_u > capDelta) delta_u = capDelta;
+ if(delta_u < -capDelta) delta_u = -capDelta;
+
+ // 转速上限软限制:转速已达上限时禁止继续加速
+ if(sysPara->para.flagOfReclaimPumEnable &&
+ sysPara->status.gearPumpRunSpeed >= maxSpeed)
+ {
+ if(delta_u > 0.0f) delta_u = 0.0f;
+ }
+
+ u += delta_u;
+ clampU();
+ cur = (int)u;
+
+ sysPara->para.gearPumpValue = (unsigned short)cur;
+ sysPara->devOp->WriteMoterPump();
+ }
+}
+
+
+void InkJetPrinter::DacAdjustStore()
+{
+ sysPara->para.printed_adj_dac[0] = ui->vol0SpinBox->value();
+ sysPara->para.printed_adj_dac[1] = ui->vol1SpinBox->value();
+ sysPara->para.printed_adj_dac[2] = ui->vol2SpinBox->value();
+ sysPara->para.printed_adj_dac[3] = ui->vol3SpinBox->value();
+ sysPara->para.printed_adj_dac[4] = ui->vol4SpinBox->value();
+ sysPara->para.printed_adj_dac[5] = ui->vol5SpinBox->value();
+ sysPara->para.printed_adj_dac[6] = ui->vol6SpinBox->value();
+ sysPara->para.printed_adj_dac[7] = ui->vol7SpinBox->value();
+ sysPara->para.printed_adj_dac[8] = ui->vol8SpinBox->value();
+ sysPara->para.printed_adj_dac[9] = ui->vol9SpinBox->value();
+ sysPara->para.printed_adj_dac[10] = ui->vol10SpinBox->value();
+ sysPara->para.printed_adj_dac[11] = ui->vol11SpinBox->value();
+ sysPara->para.printed_adj_dac[12] = ui->vol12SpinBox->value();
+ sysPara->para.printed_adj_dac[13] = ui->vol13SpinBox->value();
+ sysPara->para.printed_adj_dac[14] = ui->vol14SpinBox->value();
+ sysPara->para.printed_adj_dac[15] = ui->vol15SpinBox->value();
+ sysPara->para.printed_adj_dac[16] = ui->vol16SpinBox->value();
+ sysPara->para.printed_adj_dac[17] = ui->vol17SpinBox->value();
+ sysPara->para.printed_adj_dac[18] = ui->vol18SpinBox->value();
+ sysPara->para.printed_adj_dac[19] = ui->vol19SpinBox->value();
+
+ sysPara->para.printed_adj_dac[20] = ui->vol20SpinBox->value();
+ sysPara->para.printed_adj_dac[21] = ui->vol21SpinBox->value();
+ sysPara->para.printed_adj_dac[22] = ui->vol22SpinBox->value();
+ sysPara->para.printed_adj_dac[23] = ui->vol23SpinBox->value();
+ sysPara->para.printed_adj_dac[24] = ui->vol24SpinBox->value();
+ sysPara->para.printed_adj_dac[25] = ui->vol25SpinBox->value();
+ sysPara->para.printed_adj_dac[26] = ui->vol26SpinBox->value();
+ sysPara->para.printed_adj_dac[27] = ui->vol27SpinBox->value();
+ sysPara->para.printed_adj_dac[28] = ui->vol28SpinBox->value();
+ sysPara->para.printed_adj_dac[29] = ui->vol29SpinBox->value();
+
+ sysPara->para.printed_adj_dac[30] = ui->vol30SpinBox->value();
+ sysPara->para.printed_adj_dac[31] = ui->vol31SpinBox->value();
+ sysPara->para.printed_adj_dac[32] = ui->vol32SpinBox->value();
+ sysPara->para.printed_adj_dac[33] = ui->vol33SpinBox->value();
+ sysPara->para.printed_adj_dac[34] = ui->vol34SpinBox->value();
+ sysPara->para.printed_adj_dac[35] = ui->vol35SpinBox->value();
+ sysPara->para.printed_adj_dac[36] = ui->vol36SpinBox->value();
+ sysPara->para.printed_adj_dac[37] = ui->vol37SpinBox->value();
+ sysPara->para.printed_adj_dac[38] = ui->vol38SpinBox->value();
+ sysPara->para.printed_adj_dac[39] = ui->vol39SpinBox->value();
+
+ sysPara->para.printed_continue_col_dac[0] = ui->cVol0SpinBox->value();
+ sysPara->para.printed_continue_col_dac[1] = ui->cVol1SpinBox->value();
+ sysPara->para.printed_continue_col_dac[2] = ui->cVol2SpinBox->value();
+ sysPara->para.printed_continue_col_dac[3] = ui->cVol3SpinBox->value();
+ sysPara->para.printed_continue_col_dac[4] = ui->cVol4SpinBox->value();
+ sysPara->para.printed_continue_col_dac[5] = ui->cVol5SpinBox->value();
+ sysPara->para.printed_continue_col_dac[6] = ui->cVol6SpinBox->value();
+ sysPara->para.printed_continue_col_dac[7] = ui->cVol7SpinBox->value();
+ sysPara->para.printed_continue_col_dac[8] = ui->cVol8SpinBox->value();
+ sysPara->para.printed_continue_col_dac[9] = ui->cVol9SpinBox->value();
+ sysPara->para.printed_continue_col_dac[10] = ui->cVol10SpinBox->value();
+ sysPara->para.printed_continue_col_dac[11] = ui->cVol11SpinBox->value();
+ sysPara->para.printed_continue_col_dac[12] = ui->cVol12SpinBox->value();
+ sysPara->para.printed_continue_col_dac[13] = ui->cVol13SpinBox->value();
+ sysPara->para.printed_continue_col_dac[14] = ui->cVol14SpinBox->value();
+ sysPara->para.printed_continue_col_dac[15] = ui->cVol15SpinBox->value();
+ sysPara->para.printed_continue_col_dac[16] = ui->cVol16SpinBox->value();
+ sysPara->para.printed_continue_col_dac[17] = ui->cVol17SpinBox->value();
+ sysPara->para.printed_continue_col_dac[18] = ui->cVol18SpinBox->value();
+ sysPara->para.printed_continue_col_dac[19] = ui->cVol19SpinBox->value();
+
+ sysPara->para.printed_continue_col_dac[20] = ui->cVol20SpinBox->value();
+ sysPara->para.printed_continue_col_dac[21] = ui->cVol21SpinBox->value();
+ sysPara->para.printed_continue_col_dac[22] = ui->cVol22SpinBox->value();
+ sysPara->para.printed_continue_col_dac[23] = ui->cVol23SpinBox->value();
+ sysPara->para.printed_continue_col_dac[24] = ui->cVol24SpinBox->value();
+ sysPara->para.printed_continue_col_dac[25] = ui->cVol25SpinBox->value();
+ sysPara->para.printed_continue_col_dac[26] = ui->cVol26SpinBox->value();
+ sysPara->para.printed_continue_col_dac[27] = ui->cVol27SpinBox->value();
+ sysPara->para.printed_continue_col_dac[28] = ui->cVol28SpinBox->value();
+ sysPara->para.printed_continue_col_dac[29] = ui->cVol29SpinBox->value();
+
+ sysPara->para.printed_continue_col_dac[30] = ui->cVol30SpinBox->value();
+ sysPara->para.printed_continue_col_dac[31] = ui->cVol31SpinBox->value();
+ sysPara->para.printed_continue_col_dac[32] = ui->cVol32SpinBox->value();
+ sysPara->para.printed_continue_col_dac[33] = ui->cVol33SpinBox->value();
+ sysPara->para.printed_continue_col_dac[34] = ui->cVol34SpinBox->value();
+ sysPara->para.printed_continue_col_dac[35] = ui->cVol35SpinBox->value();
+ sysPara->para.printed_continue_col_dac[36] = ui->cVol36SpinBox->value();
+ sysPara->para.printed_continue_col_dac[37] = ui->cVol37SpinBox->value();
+ sysPara->para.printed_continue_col_dac[38] = ui->cVol38SpinBox->value();
+ sysPara->para.printed_continue_col_dac[39] = ui->cVol39SpinBox->value();
+
+ sysPara->para.printed_full_col_dac[0] = ui->fvol0SpinBox->value();
+ sysPara->para.printed_full_col_dac[1] = ui->fvol1SpinBox->value();
+ sysPara->para.printed_full_col_dac[2] = ui->fvol2SpinBox->value();
+ sysPara->para.printed_full_col_dac[3] = ui->fvol3SpinBox->value();
+ sysPara->para.printed_full_col_dac[4] = ui->fvol4SpinBox->value();
+ sysPara->para.printed_full_col_dac[5] = ui->fvol5SpinBox->value();
+ sysPara->para.printed_full_col_dac[6] = ui->fvol6SpinBox->value();
+ sysPara->para.printed_full_col_dac[7] = ui->fvol7SpinBox->value();
+ sysPara->para.printed_full_col_dac[8] = ui->fvol8SpinBox->value();
+ sysPara->para.printed_full_col_dac[9] = ui->fvol9SpinBox->value();
+ sysPara->para.printed_full_col_dac[10] = ui->fvol10SpinBox->value();
+ sysPara->para.printed_full_col_dac[11] = ui->fvol11SpinBox->value();
+ sysPara->para.printed_full_col_dac[12] = ui->fvol12SpinBox->value();
+ sysPara->para.printed_full_col_dac[13] = ui->fvol13SpinBox->value();
+ sysPara->para.printed_full_col_dac[14] = ui->fvol14SpinBox->value();
+ sysPara->para.printed_full_col_dac[15] = ui->fvol15SpinBox->value();
+ sysPara->para.printed_full_col_dac[16] = ui->fvol16SpinBox->value();
+ sysPara->para.printed_full_col_dac[17] = ui->fvol17SpinBox->value();
+ sysPara->para.printed_full_col_dac[18] = ui->fvol18SpinBox->value();
+ sysPara->para.printed_full_col_dac[19] = ui->fvol19SpinBox->value();
+
+ sysPara->para.printed_full_col_dac[20] = ui->fvol20SpinBox->value();
+ sysPara->para.printed_full_col_dac[21] = ui->fvol21SpinBox->value();
+ sysPara->para.printed_full_col_dac[22] = ui->fvol22SpinBox->value();
+ sysPara->para.printed_full_col_dac[23] = ui->fvol23SpinBox->value();
+ sysPara->para.printed_full_col_dac[24] = ui->fvol24SpinBox->value();
+ sysPara->para.printed_full_col_dac[25] = ui->fvol25SpinBox->value();
+ sysPara->para.printed_full_col_dac[26] = ui->fvol26SpinBox->value();
+ sysPara->para.printed_full_col_dac[27] = ui->fvol27SpinBox->value();
+ sysPara->para.printed_full_col_dac[28] = ui->fvol28SpinBox->value();
+ sysPara->para.printed_full_col_dac[29] = ui->fvol29SpinBox->value();
+
+ sysPara->para.printed_full_col_dac[30] = ui->fvol30SpinBox->value();
+ sysPara->para.printed_full_col_dac[31] = ui->fvol31SpinBox->value();
+ sysPara->para.printed_full_col_dac[32] = ui->fvol32SpinBox->value();
+ sysPara->para.printed_full_col_dac[33] = ui->fvol33SpinBox->value();
+ sysPara->para.printed_full_col_dac[34] = ui->fvol34SpinBox->value();
+ sysPara->para.printed_full_col_dac[35] = ui->fvol35SpinBox->value();
+ sysPara->para.printed_full_col_dac[36] = ui->fvol36SpinBox->value();
+ sysPara->para.printed_full_col_dac[37] = ui->fvol37SpinBox->value();
+ sysPara->para.printed_full_col_dac[38] = ui->fvol38SpinBox->value();
+ sysPara->para.printed_full_col_dac[39] = ui->fvol39SpinBox->value();
+ sysPara->devOp->writeFpgaPrintPara();
+}
+
+
+InkJetPrinter::~InkJetPrinter()
+{
+ if(m_serialThreadFPGA->isRunning()){
+ m_serialThreadFPGA->quit();
+ m_serialThreadFPGA->wait();
+ }
+ if(m_serialThreadSTM32->isRunning()){
+ m_serialThreadSTM32->quit();
+ m_serialThreadSTM32->wait();
+ }
+ if(m_thread->isRunning()){
+ m_thread->quit();
+ m_thread->wait();
+ }
+ if(serialFPGA)
+ delete serialFPGA;
+ if(serialSTM32)
+ delete serialSTM32;
+ delete ui;
+ delete timer;
+#ifdef MODBUS
+ if (modbus) {
+ delete modbus;
+ }
+#endif
+ if (fileTransceiv) {
+ fileTransceiv->deleteLater();
+ }
+ //edit@01-03
+ if (tcpTransceiv) {
+ tcpTransceiv->deleteLater();
+ }
+}
+
+extern void MySleep(unsigned int msec);
+extern unsigned char test_flag;
+bool gearPumpRunNormalFlag = false;
+unsigned char isPrintingFlag[1]={0};
+void InkJetPrinter::timerHandler(void){
+ static bool flag1 = 1;
+ if(flag1){
+ flag1 = 0;
+ qDebug()<<"timer had started";
+ }
+
+ int pulse_100ms = 0;
+ int pulse_200ms = 0;
+ int pulse_50ms = 0;
+ int pulse_20ms = 0;
+ int pulse_1s = 0;
+ int pulse_10s = 0;
+ int pulse_100s = 0;
+ int pulse_300ms = 0;
+ int timer_3s = 0;
+
+ static int pulse_3s = 0;
+ static int pulse_4s = 0;
+ static int pulse_5s = 0;
+ static int reciclar_30s = 0;
+ static int pulse_30s = 0;
+ static int xxxm=0;
+
+ static int tempFlag=0;
+ static int save_weeknum = 0;
+ static bool gearPumpRunFlag = false;
+ static bool ControledSwitchFlag = false;
+ static bool gearPumpStartFlag = false;
+ static bool delay3s;
+ bool InkSwintFlag = false,lastInkSwintFlag = false;
+ static float gearPumpRunNormalValue = 0.0;
+ if(sysPara){
+ xxxm=1;
+ if(sysPara->para.flagOfModuleDecimal || sysPara->para.flagOfModuleHide){
+ sysPara->para.flagOfModuleDecimal = 0;
+ sysPara->para.flagOfModuleHide = 0;
+ }
+
+ sysPara->para.ReadFileErrorCnt=0; // 正常打开文件
+
+ // /opt/FriendlyARM/mini2440/rootfs_qtopia_qt4/usr/local/Trolltech/QtEmbedded-4.6.3-arm/lib
+ if(sysPara->para.gearPumpEnable)
+ {
+ ui->tabMainWindow->enablePushButtonStart(true);
+ if(!pushButtonStartFlag)
+ {
+ gearPumpRunNormalFlag = false;
+ }
+ if(!gearPumpRunFlag)
+ {
+ ui->tabMainWindow->enableReclaimCtrlButton(false);
+ }
+ }
+ else
+ {
+ ui->tabMainWindow->enablePushButtonStart(false);
+ }
+
+ /*-----------------------形成脉冲-----------------------------*/
+ sysPara->status.delay10ms ++;
+ if(sysPara->status.delay10ms == 2){
+ pulse_20ms = 1;
+ }
+ if(sysPara->status.delay10ms == 5){
+ pulse_50ms = 1;
+ }
+ if(sysPara->status.delay10ms == 10){
+ pulse_100ms = 1;
+ sysPara->status.delay10ms = 0;
+ }
+ if(pulse_100ms){
+ sysPara->status.delay100ms ++;
+ if(sysPara->status.delay100ms == 10){
+ pulse_1s = 1;
+ sysPara->status.delay100ms = 0;
+ }
+ pulse_300ms = (sysPara->status.delay100ms%3) == 0; //1秒3次,并非精确的300ms
+ pulse_200ms = (sysPara->status.delay100ms%2) == 0;
+ }
+ if(pulse_300ms) tempFlag=1;
+ if((sysPara->status.delay10ms%3) == 0) //读取状态后再检測
+ {
+ if(!(sysPara->status.statWarn & WARN_STATUS_INK_WARN) && !gearPumpRunFlag && !sysPara->status.isPumpValveControledByHand)//刚启动前3秒
+ {
+ if(sysPara->para.gearPumpEnable) {
+ // 确保开机时控制字从 0 开始,让 pressureAdj 软启动从 0 爬坡,避免突变到高转速
+ if(sysPara->para.gearPumpValue != 0) {
+ sysPara->para.gearPumpValue = 0;
+ u = 0.0f;
+ sysPara->devOp->WriteMoterPump();
+ }
+ gearPumpStartFlag = true;
+ }
+ }
+ }
+
+ if(pushButtonStartFlag && sysPara->status.selfCheckDone)
+ {
+ if((sysPara->status.PRESSURE > (sysPara->para.pressure -10)) && (sysPara->status.PRESSURE < (sysPara->para.pressure +10)))
+ {
+ if(pulse_1s)
+ {
+
+ pulse_5s++;
+ }
+ if( pulse_5s == 5)
+ {
+ pulse_5s = 0;
+ gearPumpRunNormalFlag = true;
+ gearPumpRunNormalValue = u;
+ }
+ }
+ }
+ if(sysPara->status.isPumpValveControledByHand)
+ {
+ gearPumpRunNormalFlag = false;
+ ControledSwitchFlag = false;
+ pulse_3s = 0;
+ }
+ // 检测手动→自动边沿,直接恢复压力控制,不走 gearPumpStartFlag 的 3s 等待
+ if(m_lastByHand && !sysPara->status.isPumpValveControledByHand)
+ {
+ ControledSwitchFlag = true;
+ u = (float)sysPara->para.gearPumpValue; // 同步当前转速,避免突变
+ m_rampDone = false; // 重新软启动,适应切换后的压力状态
+ m_adjSkip = 0;
+ m_lastPressure = 0;
+ m_stableCount = 0;
+ for(int i = 0; i < 10; i++) m_pressureBuf[i] = 0;
+ m_bufIdx = 0;
+ }
+ m_lastByHand = sysPara->status.isPumpValveControledByHand;
+ if(!(sysPara->status.statWarn & WARN_STATUS_INK_SWINT)){//墨线开关,压力抖动
+ InkSwintFlag = true;
+ }
+ else
+ {
+ InkSwintFlag = false;
+ }
+ if(lastInkSwintFlag != InkSwintFlag)
+ {
+ lastInkSwintFlag = InkSwintFlag;
+ gearPumpRunNormalFlag = false;
+ }
+ if(gearPumpRunNormalFlag && !sysPara->status.isPumpValveControledByHand && sysPara->para.gearPumpEnable)
+ {
+ static int count_3s = 0;
+ if(u > gearPumpRunNormalValue*1.5)//改大一点
+ {
+ if(pulse_1s)
+ {
+ count_3s++;
+ if(count_3s == 3)
+ {
+ count_3s = 0;
+ ui->tabMainWindow->setRunStatus(tr("压力泄漏或压力传感器故障!"));
+ sysPara->status.gearPumpRunStopFlag = true;
+ gearPumpRunNormalFlag = false;
+ LogInfo::setRunStatusText(tr("运行中压力泄漏,停齿轮泵!"));
+ }
+ }
+ }
+ else
+ {
+ count_3s = 0;
+ }
+ }
+ if(sysPara->para.gearPumpEnable && (sysPara->status.gearPumpRunSpeed < 100) && test_flag){
+ if(test_flag % 2)
+ ui->tabMainWindow->on_pushButtonReclaimTankClose_pressed();
+ test_flag = 0;
+ }
+ if(pulse_1s) {
+ if(sysPara->status.selfCheckDone && sysPara->para.gearPumpEnable && sysPara->para.flagOfReclaimPumEnable)
+ checkPressureControl();
+ if((QTime::currentTime()>=QTime(00,00,00))&&(QTime::currentTime()<=QTime(00,00,02))&&sysPara->para.Reciclar){
+ if(ui->tabMainWindow->getCurrPrintStatus() != 1){
+ ui->tabMainWindow->_on_pushButtonPowerOff_pressed(false);
+ LogInfo::setRunStatusText(tr("测试时间结束,准备关机"));
+ ui->tabMainWindow->setRunStatus(tr("测试时间结束,准备关机"));
+ }
+ }
+ if(sysPara->status.selfCheckDone && sysPara->para.Reciclar && test_flag){
+ reciclar_30s++;
+ if(reciclar_30s > 30){
+ reciclar_30s = 0;
+ test_flag++;
+ }
+ }
+ else if(reciclar_30s){
+ reciclar_30s = 0;
+ }
+ QDate d = QDate::currentDate();
+
+ if(save_weeknum == 0)
+ {
+ save_weeknum = d.weekNumber();
+ }
+
+ if(save_weeknum != d.weekNumber())
+ {
+ sysPara->devOp->writeFpgaCalandar(1);
+ save_weeknum = d.weekNumber();
+ }
+
+ sysPara->status.delay1s ++;
+ if(sysPara->status.delay1s == 3 && !delay3s){
+ delay3s = true;
+ }
+ if(sysPara->status.delay1s % 3 == 0 && sysPara->status.delay1s != 0)
+ timer_3s = 1;
+ if(sysPara->status.delay1s == 10){
+ pulse_10s = 1;
+ sysPara->status.delay1s = 0;
+ }
+
+ pulse_4s++;
+ if(gearPumpStartFlag)
+ {
+ pulse_3s ++;
+ if(pulse_3s == 3)
+ {
+ pulse_3s = 0;
+ gearPumpRunFlag = true;
+ ControledSwitchFlag = true;
+ }
+ }
+ if( sysPara->status.reclainTankReachEnd) sysPara->para.openInkLineTime++;
+ }
+
+ if(pulse_1s && flagOfSerialThreadStratEn){
+ if (!m_serialThreadFPGA->isRunning()) {
+ qDebug()<<"start FPGA tread";
+ m_serialThreadFPGA->start();
+ }
+ if (!m_serialThreadSTM32->isRunning()){
+ qDebug()<<"start STM32 tread";
+ m_serialThreadSTM32->start();
+ }
+ flagOfSerialThreadStratEn = false;
+ }
+
+ if(pulse_10s){
+ if(!m_thread->isRunning())
+ m_thread->start();
+ sysPara->status.delay10s ++;
+ if(sysPara->status.delay10s == 10){
+ pulse_100s = 1;
+ sysPara->status.delay10s = 0;
+
+// if(sysPara->status.flagOfPowerOnMode && (ui->tabMainWindow->getCurrPrintStatus() != 1))
+ if(sysPara->status.flagOfPowerOnMode)
+ {
+ qDebug()<<"waitPowerOffTime: "<status.waitPowerOffTime;
+ LogInfo::setRunStatusText(tr("waitPowerOffTime: %1").arg(sysPara->status.waitPowerOffTime));
+ if(sysPara->status.waitPowerOffTime)
+ {
+ sysPara->status.waitPowerOffTime--;
+ if(!sysPara->status.waitPowerOffTime)
+ {
+ ui->tabMainWindow->_on_pushButtonPowerOff_pressed(false);
+ LogInfo::setRunStatusText(tr("定时开机循环完成,准备关机"));
+ ui->tabMainWindow->setRunStatus(tr("准备关机"));
+ }
+ }
+ }
+ }
+
+ }
+
+ /*------------------------------------------------------*/
+ if(pulse_100ms) {
+ sysPara->devOp->stm32Rd(0x07,(unsigned char *)&PulseCnt,2);//读取脉冲个数低字节
+ sysPara->devOp->readFgaStatus();
+ }
+
+ /**************桂澳增加超速提示*****************************/
+ static int logCtrl = 0;
+ if((sysPara->para.printTriggerMode == PRINT_TRIGGER_SYNCHRONIZER || sysPara->para.eleEyeTriggerSynPrintEn)
+ && sysPara->status.lesslen_warn == 1){ //置1表示超速了
+ if(logCtrl++ % 500 == 0){
+ LogInfo::setRunStatusText(tr("速度过快,请检查是否漏喷!!!"));
+ qDebug()<<"速度过快,请检查是否漏喷!!!";
+ }
+
+ /*if(msgBox1->isHidden()){ //桂澳的超速提示先保留
+ msgBox1->setText(tr("速度过快,请检查是否漏喷!!!"));
+ msgBox1->show();
+ LogInfo::setRunStatusText(tr("速度过快,请检查是否漏喷!!!"));
+ qDebug()<<"速度过快,请检查是否漏喷!!!";
+ }*/
+ sysPara->devOp->controlRedLight(true);
+ sysPara->devOp->controlGreenLight(false);
+ }
+ else{
+ if(!msgBox1->isHidden())
+ sysPara->devOp->controlRedLight(false);
+ }
+
+
+ sysPara->status.gearPumpRunSpeed = (PulseCnt * 60 * 1000) / (500 * 2);
+ if(!sysPara->para.gearPumpEnable)
+ sysPara->status.PRESSURE *= 5; //响应群众号召,数值放大五倍
+
+ /*-------------------------------------------------------*/
+ bool lostCommuFlag = 1;
+ if(sysPara->status.fpgaVersionNum != 0)
+ lostCommuFlag = 0;
+
+ if(sysPara->status.delay10ms%5 == 0)
+ {//复位发送打印数据
+ if((ui->tabMainWindow->getCurrPrintStatus() == 1)&&sysPara->para.ResetSendData)
+ {
+ static bool oneTimeFlag = false;
+ if(sysPara->status.productCnt== 0 && (oneTimeFlag==false))//计米复位发送打印数据
+ {
+ oneTimeFlag = true;
+ ui->tabMainWindow->on_pushButtonStartPrint_pressed();
+ //复位重设起始值
+ if(sysPara->para.cnt1ResetToInitValue)
+ {
+ sysPara->para.cnt1CurrValue = sysPara->para.cnt1StartValue;
+ sysPara->status.cnt1CurrentValueInitDoneFlag = false;
+ sysPara->devOp->writeFpgaCalandar(0);
+ }
+ }
+ if(sysPara->status.productCnt != 0)
+ {
+ oneTimeFlag = false;
+ }
+ }
+ static unsigned int lastProductCount=0;
+ if(sysPara->status.productCnt != lastProductCount || sysPara->status.printDoneFlag)
+ {
+ sysPara->status.printDoneFlag = false;
+ lastProductCount = sysPara->status.productCnt;
+ sysPara->modbusStatus.printFinishFlag = 1;
+ memcpy((void*)(&sysPara->modbusStatus.orderCode), (void*)(&sysPara->modbusParas.QRcode_buf), 2);//写返回序列号
+ ui->tabMainWindow->UpdateDateTimeQRCode(QDateTime::currentDateTime().toString("hh:mm"));
+ }
+ if (modbus->getModbusStatus() == 1) {
+ refreshModbusStatus();
+ }
+ }
+
+ if(gearPumpRunFlag || sysPara->para.gearPumpEnable == 0)
+ {
+ if(!sysPara->status.selfCheckDone && sysPara->status.isPrinting){
+
+ sysPara->status.flagOfAbnormalStatus = true;
+
+ static bool onceLog = true;
+ if(onceLog) {
+ LogInfo::setRunStatusText(tr("打印过程中死机了!!!"));
+ qDebug()<<"打印过程中死机了!!!";
+ onceLog = false;
+
+ ui->tabMainWindow->updatePrintDisplayLabel();
+ }
+
+ ui->tabMainWindow->on_pushButtonStopPrint_pressed();
+
+ }
+ if(!sysPara->status.selfCheckDone)
+ {
+ /*开机自检*/
+ autoControlValvePump();
+ if(pulse_100ms){
+ pressureAdj();
+ }
+ /*-----------------------------------------------------*/
+ if(!sysPara->status.selfCheckCnt) {
+ LogInfo::setRunStatusText(tr("开始自检,请等待60秒..............."));
+ ui->tabMainWindow->enableReclaimCtrlButton(false);
+ ui->tabMainWindow->enablePrintButton(false);
+ sysPara->devOp->mainInkCtrl();
+ sysPara->para.TrunOnPowerCnt++;// 20151218 开机次数加1
+ sysPara->saveParaToFile(); // 保存开机次数值
+
+ sysPara->status.lastProductCnt = sysPara->status.productCnt ; //这会让产品计数显示出来
+
+ ui->tabMainWindow->updateTotalCnt(0);
+
+
+ }
+ if((++sysPara->status.selfCheckCnt % 100) == 0){
+ ui->tabMainWindow->setRunStatus(tr("开始自检,请等待%1秒...............").arg((MAX_SELF_CHECK_CNT - sysPara->status.selfCheckCnt)/100));
+ }
+
+ if(sysPara->status.selfCheckCnt >= MAX_SELF_CHECK_CNT)
+ {
+ sysPara->status.selfCheckDone = 1;
+ u = (float)sysPara->para.gearPumpValue;
+ // 自检完成后管道恢复正常阻力,重置软启动让压力重新平稳收敛
+ // 不清零 u,从当前控制字开始,避免突变
+ m_rampDone = false;
+ m_adjSkip = 0;
+ m_lastPressure = 0;
+ m_stableCount = 0;
+ for(int i = 0; i < 10; i++) m_pressureBuf[i] = 0;
+ m_bufIdx = 0;
+ LogInfo::setRunStatusText(tr("自检完成!!!"));
+ ui->tabMainWindow->setRunStatus(tr("自检完成!!!"));
+ qDebug()<<"自检完成!!!";
+ ui->tabPrintSetting->PrintSettingLog();
+ ui->tabMainWindow->enableReclaimCtrlButton(true);
+ sysPara->devOp->mainInkCtrl();
+ sysPara->status.canRunAirPushing = true;
+
+ if(sysPara->para.Reciclar)
+ test_flag = 1;
+ }
+ else {
+ if((sysPara->status.selfCheckCnt % 200) == 0)
+ // sysPara->devOp->controlReclaimTankOpen(false);
+ ui->tabMainWindow->enableReclaimCtrlButton(false);
+ }
+
+ }
+ else{
+ // 开机自检完成的前提下
+ if (!sysPara->status.airPushing || ui->tabMainWindow->m_2sFlag) {
+ autoControlValvePump();
+ }
+ // 检测回收泵模式切换,切换时重置泄漏保护学习状态和软启动状态
+ if(m_lastReclaimMode != sysPara->para.flagOfReclaimPumEnable)
+ {
+ m_lastReclaimMode = sysPara->para.flagOfReclaimPumEnable;
+ gearPumpRunNormalFlag = false; // 泄漏保护重新学习
+ gearPumpRunNormalValue = 0.0f;
+ m_rampDone = false; // 软启动重新爬坡适应新上限
+ m_adjSkip = 0;
+ m_lastPressure = 0;
+ m_stableCount = 0;
+ for(int i = 0; i < 10; i++) m_pressureBuf[i] = 0;
+ m_bufIdx = 0;
+ }
+ if(pulse_100ms && sysPara->para.gearPumpEnable && !sysPara->status.isPumpValveControledByHand && ControledSwitchFlag ) {
+ pressureAdj();
+
+ }
+ }
+ }
+ else{
+ static bool flag = 1;
+ if(delay3s){
+ if(flag){
+ flag = 0;
+ LogInfo::setRunStatusText(tr("缺少墨水,喷码机不能正常工作!"));
+ qDebug()<<"缺少墨水,喷码机不能正常工作!";
+ }
+ ui->tabMainWindow->setRunStatus(tr("缺少墨水,喷码机不能正常工作!"));
+ }
+ }
+ /*----------------------------控制温度--------------------------------------*/
+ if(pulse_300ms){
+ autoControlHeater();
+ sysPara->devOp->readSyncCounterAtZero();
+ }
+
+ sysPara->status.lostCommuFlag = lostCommuFlag; //务必放在后面
+ static unsigned int lastProductCnt =0;
+ static int lastalterMode=-1;
+ if(sysPara->para.alterPrint.enable)
+ {
+ sysPara->para.AlterMode=sysPara->status.AlterMode; // 电眼触发交替功能:新增这一行
+ if( (sysPara->para.AlterMode!=lastalterMode)
+ || (lastProductCnt != sysPara->status.productCnt)
+ )
+ {
+ ui->tabMainWindow->alterDataPrint (sysPara->para.AlterMode);
+ }
+ }
+ else sysPara->para.AlterMode=0;
+ lastalterMode = sysPara->para.AlterMode;
+ lastProductCnt = sysPara->status.productCnt;
+ ui->tabMainWindow->CheckStatus(pulse_300ms); //
+ /*----------------------------------界面更新状态---------------------------------------*/
+#ifdef __RFID_CARD
+ static bool flag6 = true;
+ if(pulse_10s && flag6){ //初始化刷卡模块
+ qDebug()<<"初始化刷卡模块";
+ flag6 = false;
+ sysPara->devOp->setICReaderModeFlag = true;
+ sysPara->devOp->setRFIDReaderWorkMode();
+ qDebug()<<"jd.addr: "<tabPrintSetting->dlgInputAddr->jd.addr;
+ sysPara->devOp->setRFIDReaderKey(ui->tabPrintSetting->dlgInputAddr->jd.addr,1);
+ sysPara->devOp->setICReaderModeFlag = false;
+ }
+
+ if(pulse_300ms){
+ if(!sysPara->devOp->setICReaderModeFlag)
+ {
+ sysPara->devOp->strRevdata ="";
+ sysPara->devOp->receiveReadRFID_data();
+ if(sysPara->devOp->strRevdata.length() > 1)
+ {
+ if((sysPara->devOp->strRevdata.left(3) == QString::number(ui->tabPrintSetting->dlgInputAddr->jd.addr).left(3))
+ || sysPara->devOp->strRevdata.left(3) == "100")
+ {
+ if(sysPara->devOp->strRevdata.at(3) == 'A')
+ {
+ bool flag = true;
+ if(!sysPara->status.flagOfNeedInkCard){
+ flag = false;
+ msgtest->setText(tr("不需要刷墨水卡!"));
+ msgtest->show();
+ ui->tabMainWindow->setRunStatus(tr("不需要刷墨水卡!"));
+ LogInfo::setRunStatusText(tr("不需要刷墨水卡!"));
+ }
+ else if(sysPara->status.statWarn & WARN_STATUS_INK_WARN){
+ flag = false;
+ msgtest->setText(tr("请先添加原厂墨水再刷墨水卡!"));
+ msgtest->show();
+ ui->tabMainWindow->setRunStatus(tr("请先添加原厂墨水再刷墨水卡!"));
+ LogInfo::setRunStatusText(tr("请先添加原厂墨水再刷墨水卡!"));
+ }
+
+#ifdef __RFID_IND
+ if(flag){
+ sysPara->devOp->setRFIDReaderKey(ui->tabPrintSetting->dlgInputAddr->jd.addr,2);
+ sysPara->devOp->strRevdata ="";
+ if(sysPara->devOp->readIndBlock()){
+ if(sysPara->devOp->strRevdata.left(3) == QString::number(ui->tabPrintSetting->dlgInputAddr->jd.addr).left(3)){
+ if(sysPara->devOp->strRevdata.at(3) == 'C'){
+ if(sysPara->devOp->comWriteRFID_data(2) == 1)//把卡数据清零
+ {
+ // sysPara->RFIDPara.InkRFIDCnt = 0;
+ // sysPara->RFIDPara.PrintInkDots = 0;
+ // sysPara->saveRFIDPara();
+ // sysPara->devOp->checkCardIntervalTime = QDateTime::currentDateTime().toTime_t();
+ }
+ }
+ }
+ }
+ else{
+ flag = false;
+ LogInfo::setRunStatusText(tr("Read India Ink Block data failure."));
+ }
+ sysPara->devOp->setRFIDReaderKey(ui->tabPrintSetting->dlgInputAddr->jd.addr,1);
+ }
+#endif
+ if(flag){
+ if(sysPara->devOp->comWriteRFID_data(1) == 1)//把卡数据清零
+ {
+ sysPara->RFIDPara.InkRFIDCnt = 0;
+ sysPara->RFIDPara.PrintInkDots = 0;
+ sysPara->saveRFIDPara();
+ sysPara->para.RFIDInkWarn = false;
+ sysPara->para.inkWarnDate = 0;
+ sysPara->para.inkWarnTime = 0;
+ sysPara->status.flagOfInkMaxDot = false;
+ sysPara->status.flagOfNeedInkCard = false;
+ sysPara->devOp->checkCardIntervalTime = QDateTime::currentDateTime().toTime_t();
+ msgtest->setText(tr("刷墨水卡成功!"));
+ msgtest->show();
+ ui->tabMainWindow->setRunStatus(tr("刷墨水卡成功!"));
+ LogInfo::setRunStatusText(tr("刷墨水卡成功!"));
+ qDebug()<<"刷墨水卡成功!";
+ sysPara->saveParaToFile();
+ }
+ }
+ }
+ else if(sysPara->devOp->strRevdata.at(3) == 'B')
+ {
+ bool flag = true;
+ if(!sysPara->status.flagOfNeedSolventCard){
+ flag = false;
+ msgtest->setText(tr("不需要刷溶剂卡!"));
+ msgtest->show();
+ ui->tabMainWindow->setRunStatus(tr("不需要刷溶剂卡!"));
+ LogInfo::setRunStatusText(tr("不需要刷溶剂卡!"));
+ }
+ else if(sysPara->status.statWarn & WARN_STATUS_SOLV_WARN){
+ flag = false;
+ msgtest->setText(tr("请先添加原厂溶剂再刷溶剂卡!"));
+ msgtest->show();
+ ui->tabMainWindow->setRunStatus(tr("请先添加原厂溶剂再刷溶剂卡!"));
+ LogInfo::setRunStatusText(tr("请先添加原厂溶剂再刷溶剂卡!"));
+ }
+
+#ifdef __RFID_IND
+ if(flag){
+ sysPara->devOp->setRFIDReaderKey(ui->tabPrintSetting->dlgInputAddr->jd.addr,2);
+ sysPara->devOp->strRevdata ="";
+ if(sysPara->devOp->readIndBlock()){
+ if(sysPara->devOp->strRevdata.left(3) == QString::number(ui->tabPrintSetting->dlgInputAddr->jd.addr).left(3)){
+ if(sysPara->devOp->strRevdata.at(3) == 'D'){
+ if(sysPara->devOp->comWriteRFID_data(2) == 1)//把卡数据清零
+ {
+ // sysPara->RFIDPara.InkRFIDCnt = 0;
+ // sysPara->RFIDPara.PrintInkDots = 0;
+ // sysPara->saveRFIDPara();
+ // sysPara->devOp->checkCardIntervalTime = QDateTime::currentDateTime().toTime_t();
+ }
+ }
+ }
+ }
+ else{
+ flag = false;
+ LogInfo::setRunStatusText(tr("Read India solvent Block data failure."));
+ }
+ sysPara->devOp->setRFIDReaderKey(ui->tabPrintSetting->dlgInputAddr->jd.addr,1);
+ }
+#endif
+ if(flag){
+ if(sysPara->devOp->comWriteRFID_data(1) == 1)//把卡数据清零
+ {
+ sysPara->RFIDPara.SOLVRFIDCnt = 0;
+ sysPara->RFIDPara.solventNumber = 0;
+ sysPara->saveRFIDPara();
+ sysPara->para.RFIDSolventWarn = 0;
+ sysPara->para.solventWarnDate = 0;
+ sysPara->para.solventWarnTime = 0;
+ sysPara->para.RFIDSolventWarnMixCnt = 0;
+ sysPara->status.flagOfSolventMaxNum = false;
+ sysPara->status.flagOfNeedSolventCard = false;
+ sysPara->devOp->checkCardIntervalTime = QDateTime::currentDateTime().toTime_t();
+ msgtest->setText(tr("刷溶剂卡成功!"));
+ msgtest->show();
+ ui->tabMainWindow->setRunStatus(tr("刷溶剂卡成功!"));
+ LogInfo::setRunStatusText(tr("刷溶剂卡成功!"));
+ qDebug()<<"刷溶剂卡成功!";
+ sysPara->saveParaToFile();
+ }
+ }
+ }
+ else
+ {
+ msgtest->setText(tr("MAC无效卡!"));
+ msgtest->show();
+ LogInfo::setRunStatusText(tr("MAC无效卡!"));
+ }
+ }
+ else
+ {
+ LogInfo::setRunStatusText(tr("card data: %1").arg(sysPara->devOp->strRevdata));
+ QString str1 = QString::number(sysPara->devOp->strRevdata.mid(0,2).toInt(0,16)).rightJustified(2,'0');
+ QString str2 =QString::number(sysPara->devOp->strRevdata.mid(2,2).toInt(0,16)).rightJustified(2,'0');
+ QString str3 = QString::number(sysPara->devOp->strRevdata.mid(4,2).toInt(0,16)).rightJustified(2,'0');
+ QString str4 = QString::number(sysPara->devOp->strRevdata.mid(6,2).toInt(0,16)).rightJustified(2,'0');
+ QString str5 = QString::number(sysPara->devOp->strRevdata.mid(8,2).toInt(0,16)).rightJustified(2,'0');
+ QString str6 =QString::number( sysPara->devOp->strRevdata.mid(10,2).toInt(0,16)).rightJustified(2,'0');
+ QString strDateTime = str1 + "-" + str2 + "-" + str3 + " " + str4 + ":" + str5 + ":" + str6;
+ QString strShow = tr("无效卡,这张卡已经在%1时使用过").arg(strDateTime);
+ msgtest->setText(strShow);
+ msgtest->show();
+ LogInfo::setRunStatusText(strShow);
+ }
+ }
+ }
+ }
+#endif
+ if(pulse_300ms){
+ sysPara->devOp->readCalandarDat(); //务必读一下此数据
+ if(sysPara->status.RandomNum>0)
+ sysPara->devOp->Read_RanddomFromFpga();
+#ifdef COUNTER1_BY_GROUP /* 分段计米 */
+ cnt1GroupCheck();//分段计米
+#endif
+ cntGroupCheck();//分段计米
+
+ QWidget *widget = this->currentWidget();
+ static bool read_flag = false;
+ if(widget == ui->tabMainWindow && pulse_100ms) {
+ ui->tabMainWindow->updateSysStatusToUI();
+ }
+ else if(widget == ui->tabTriggerMode){
+ ui->tabTriggerMode->updateSysStatusToUI();
+ if(sysPara->status.fpgaVersionNum != 0){
+ QString FpgaVersion;
+ if((sysPara->status.fpgaVersionNum>>12) == 8 || (sysPara->status.fpgaVersionNum>>12) == 6)
+ FpgaVersion = "72";
+ else if((sysPara->status.fpgaVersionNum>>12) == 2 || (sysPara->status.fpgaVersionNum>>12) == 1){
+ if(sysPara->para.flagOfFastMode)
+ FpgaVersion = "66";
+ else
+ FpgaVersion = "67";
+ }
+ FpgaVersion += QString("_F%1.%2.%3").arg(sysPara->status.fpgaVersionNum >> 12)
+ .arg((sysPara->status.fpgaVersionNum>>8) & 0x0f).arg(sysPara->status.fpgaVersionNum&0xff);
+ ui->tabTriggerMode->setBuildTime(QString(" No%1").arg(FpgaVersion));
+ }
+
+ }
+ else if(widget == ui->tabPrintSetting)
+ {
+ ui->tabPrintSetting->updateSysStatusToUI();
+ if(!read_flag)
+ {
+ emit sendPicScene(ui->tabMainWindow->getPicScene());
+ }
+ read_flag = true;
+ }
+ else if(widget == ui->tabSystemSetting){
+
+ ui->tabSystemSetting->updateSysStatusToUI();
+ }
+ else if(widget == ui->tabSystemManage){
+ ui->tabSystemManage->updateSysStatusToUI();
+ }
+ else if(widget == ui->tabOtherInfo){
+ ui->tabOtherInfo->updateSysStatusToUI();
+ }
+ else if(widget == ui->tabNetworkManager){
+ if(!sysPara->status.bLanConfigManual)
+ {
+ ui->tabNetworkManager->updateSysStatusToUI();
+ }
+ }
+ if(widget != ui->tabPrintSetting)
+ {
+ read_flag = false;
+ }
+
+ // 20140306
+ static int last_lesslen_warn=0,lesslen_cnt=0;
+ if(sysPara->status.lesslen_warn && (sysPara->para.printTriggerMode != PRINT_TRIGGER_TIME))
+ {
+ if(last_lesslen_warn==0)
+ {
+ last_lesslen_warn =lesslen_cnt;
+ if(lesslen_cnt<60)lesslen_cnt +=6;
+ if(lesslen_cnt>40) sysPara->devOp->resumeFault();
+
+ if(sysPara->para.speedoverPaushPrint) {
+ ui->tabMainWindow->on_pushButtonPausePrint_pressed();// 2014-03-19
+ // emit OnSpeedOver(2);//QMessageBox::warning(NULL,tr("警告"),tr("喷印速度过快!无法喷印完全,自动暂停喷印!!!"));
+ ui->tabMainWindow->setRunStatus(tr("喷印速度过快!无法喷印完全,自动暂停喷印!!!"));
+
+ }
+ else {
+ // emit OnSpeedOver(1);//QMessageBox::warning(NULL,tr("警告"),tr("喷印速度过快!无法喷印完全!!!"));
+ ui->tabMainWindow->setRunStatus(tr("喷印速度过快!无法喷印完全!!!"));
+ }
+
+ }
+ }
+ else { last_lesslen_warn=0;lesslen_cnt=30;}
+
+ if(last_lesslen_warn) last_lesslen_warn--;
+
+ }
+
+ if(pulse_100ms && sysPara->status.selfCheckDone){
+ detectAndcontrolReclaimTank(); //控制回收槽
+ }
+
+ /*---------------------------------处理警告--------------------------------------------*/
+ if(pulse_1s){
+ if(sysPara->para.gearPumpEnable && sysPara->status.selfCheckDone && gearPumpRunNormalFlag)
+ {
+ if((sysPara->status.PRESSURE < (sysPara->para.pressure -8)) || (sysPara->status.PRESSURE > (sysPara->para.pressure +8)))
+ {
+ LogInfo::setRunStatusText(tr("压力波动超过设定的5个值."));
+ }
+ }
+
+ static bool logFlag1 = true;
+ if(sysPara->status.statWarn & WARN_STATUS_SOLV_WARN && logFlag1){
+ logFlag1 = false;
+ LogInfo::setRunStatusText(tr("溶剂液位报警! %1").arg(sysPara->RFIDPara.solventNumber));
+ qDebug()<<"溶剂液位报警! "<RFIDPara.solventNumber;
+ }
+
+#ifdef __RFID_CARD
+ /*****************墨水刷卡控制start**********************************************/
+ /*墨水刷卡新的控制逻辑*/
+ /* 1.任何时候,打印墨点数达到2.3billion之后,提示24小时内刷卡,否则禁止使用机器*/
+ /*2.当墨水液位后,持续提示刷卡,24小时后如果还没有刷卡,禁止使用机器*/
+ static bool logFlag4 = 1;
+ static int warnNum1 = 0;
+ if(!(sysPara->status.statWarn & WARN_STATUS_INK_WARN))
+ warnNum1 = 0;
+ if((sysPara->status.statWarn & WARN_STATUS_INK_WARN) || sysPara->para.RFIDInkWarn){
+ if(!sysPara->para.RFIDInkWarn){
+ if(++warnNum1 >6){
+ sysPara->para.RFIDInkWarn = true;
+ QDateTime curDateTime = QDateTime::currentDateTime();
+ QString strCurDateTime = curDateTime.toString("yyMMddhhmmss");
+ if(sysPara->para.inkWarnDate == 0){
+ sysPara->para.inkWarnDate = strCurDateTime.mid(0,6).toInt();
+ sysPara->para.inkWarnTime = strCurDateTime.mid(6,6).toInt();
+ }
+ sysPara->saveParaToFile();
+ }
+ else{
+ LogInfo::setRunStatusText(tr("detect Ink warning cnt: %1").arg(warnNum1));
+ qDebug()<<"检测到墨水液位次数:"<status.flagOfNeedInkCard = true;
+ if(logFlag4){
+ logFlag4 = 0;
+ QString strDate = QString::number(sysPara->para.inkWarnDate);
+ QString strTime = QString::number(sysPara->para.inkWarnTime);
+ QString str1 = QString::number(strDate.mid(0,2).toInt()).rightJustified(2,'0');
+ QString str2 = QString::number(strDate.mid(2,2).toInt()).rightJustified(2,'0');
+ QString str3 = QString::number(strDate.mid(4,2).toInt()).rightJustified(2,'0');
+ QString str4 = QString::number(strTime.mid(0,2).toInt()).rightJustified(2,'0');
+ QString str5 = QString::number(strTime.mid(2,2).toInt()).rightJustified(2,'0');
+ QString str6 = QString::number(strTime.mid(4,2).toInt()).rightJustified(2,'0');
+ QString strDateTime = str1 + "-" + str2 + "-" + str3 + " " + str4 + ":" + str5 + ":" + str6;
+ LogInfo::setRunStatusText(tr("ink Warning at: %1").arg(strDateTime));
+ qDebug()<<"ink Warning at:"<RFIDPara.PrintInkDots >= MAX_INK_DOTS || sysPara->para.RFIDInkWarn){
+ sysPara->status.flagOfNeedInkCard = true;
+ if(sysPara->RFIDPara.InkRFIDCnt == 0){
+ msgtest->setText(tr("请使用原厂墨水,然后刷墨水卡,否则机器将在24小时后禁止使用!"));
+ msgtest->show();
+ ui->tabMainWindow->setRunStatus(tr("请使用原厂墨水,然后刷墨水卡,否则机器将在24小时后禁止使用!"));
+ LogInfo::setRunStatusText(tr("请使用原厂墨水,然后刷墨水卡,否则机器将在24小时后禁止使用!"));
+ }
+ int timeRemain = (MAX_INK_RFIDTIME - sysPara->RFIDPara.InkRFIDCnt)/60;
+ if(timeRemain > 60){
+ if(sysPara->RFIDPara.PrintInkDots >= MAX_INK_DOTS)
+ ui->tabMainWindow->setRunStatus(tr("1.请使用原厂墨水,然后刷墨水卡,否则机器将在%1小时后禁止使用!").arg(timeRemain/60));
+ else
+ ui->tabMainWindow->setRunStatus(tr("2.请使用原厂墨水,然后刷墨水卡,否则机器将在%1小时后禁止使用!").arg(timeRemain/60));
+ }
+ else if(timeRemain > 0){
+ if(sysPara->RFIDPara.PrintInkDots >= MAX_INK_DOTS)
+ ui->tabMainWindow->setRunStatus(tr("1.请使用原厂墨水,然后刷墨水卡,否则机器将在%1分钟后禁止使用!").arg(timeRemain));
+ else
+ ui->tabMainWindow->setRunStatus(tr("2.请使用原厂墨水,然后刷墨水卡,否则机器将在%1分钟后禁止使用!").arg(timeRemain));
+ }
+ if(sysPara->RFIDPara.InkRFIDCnt % 300 == 0)
+ sysPara->saveRFIDPara();
+ if(++sysPara->RFIDPara.InkRFIDCnt >= MAX_INK_RFIDTIME)
+ sysPara->status.flagOfInkMaxDot = true;
+ }
+
+ if(sysPara->status.flagOfInkMaxDot){
+ if(sysPara->status.isPrinting)
+ ui->tabMainWindow->on_pushButtonStopPrint_pressed();
+ static bool logFlag2= true;
+ if(sysPara->RFIDPara.PrintInkDots >= MAX_INK_DOTS){
+ ui->tabMainWindow->setRunStatus(tr("1.请使用原厂墨水,然后刷墨水卡以恢复机器的正常功能!"));
+ if(logFlag2){
+ logFlag2 = false;
+ msgtest->setText(tr("请使用原厂墨水,然后刷墨水卡以恢复机器的正常功能!"));
+ msgtest->show();
+ LogInfo::setRunStatusText(tr("请使用原厂墨水,然后刷墨水卡以恢复机器的正常功能!"));
+ qDebug()<<"打印墨点已达到2.3billion,请使用原厂墨水,然后刷墨水卡以恢复机器的正常功能!";
+ }
+ }
+ else{
+ ui->tabMainWindow->setRunStatus(tr("2.请使用原厂墨水,然后刷墨水卡以恢复机器的正常功能!"));
+ if(logFlag2){
+ logFlag2 = false;
+ msgtest->setText(tr("请使用原厂墨水,然后刷墨水卡以恢复机器的正常功能!"));
+ msgtest->show();
+ LogInfo::setRunStatusText(tr("请使用原厂墨水,然后刷墨水卡以恢复机器的正常功能!"));
+ qDebug()<<"请使用原厂墨水,然后刷墨水卡以恢复机器的正常功能!";
+ }
+ }
+ }
+ /*****************墨水刷卡控制end**********************************************/
+
+ /*****************溶剂刷卡控制start**********************************************/
+ /*溶剂刷卡新的控制逻辑*/
+ /* 1.任何时候,混合阀打开次数达到360次,提示2小时关机,必须刷卡才能恢复*/
+ /*2.溶剂液位报警后,提示刷卡,允许有10次的混合阀打开次数,必须刷卡才能恢复*/
+ if(sysPara->RFIDPara.solventNumber >= MAX_SOLV_OPENNUM){ //混合阀打开次数达到360次
+ sysPara->status.flagOfNeedSolventCard = true;
+ if(sysPara->RFIDPara.SOLVRFIDCnt == 0){
+ msgtest->setText(tr("请使用原厂溶剂,然后刷溶剂卡,否则机器将在2小时后禁止使用!"));
+ msgtest->show();
+ LogInfo::setRunStatusText(tr("请使用原厂溶剂,然后刷溶剂卡,否则机器将在2小时后禁止使用!"));
+ }
+ int timeRemain = (MAX_SOLV_RFIDTIME - sysPara->RFIDPara.SOLVRFIDCnt)/60;
+ if(timeRemain > 0)
+ ui->tabMainWindow->setRunStatus(tr("请使用原厂溶剂,然后刷溶剂卡,否则机器将在%1分钟后禁止使用!").arg(timeRemain));
+ if(sysPara->RFIDPara.SOLVRFIDCnt % 300 == 0)
+ sysPara->saveRFIDPara();
+ if(++sysPara->RFIDPara.SOLVRFIDCnt >= MAX_SOLV_RFIDTIME)
+ sysPara->status.flagOfSolventMaxNum = true;
+ }
+
+ static bool logFlag5 = 1;
+ static int warnNum2 = 0;
+ if(!(sysPara->status.statWarn & WARN_STATUS_SOLV_WARN))
+ warnNum2 = 0;
+ if((sysPara->status.statWarn & WARN_STATUS_SOLV_WARN) || sysPara->para.RFIDSolventWarn){
+ if(!sysPara->para.RFIDSolventWarn){
+ if(++warnNum2 > 6){
+ sysPara->para.RFIDSolventWarn = true;
+ sysPara->para.RFIDSolventWarnMixCnt = 0;
+ LogInfo::setRunStatusText(tr("请添加原厂溶剂,然后刷溶剂卡!"));
+ qDebug()<<"请添加原厂溶剂,然后刷溶剂卡,否则将会在打开10次混合阀之后禁用喷码机!";
+ QDateTime curDateTime = QDateTime::currentDateTime();
+ QString strCurDateTime = curDateTime.toString("yyMMddhhmmss");
+ if(sysPara->para.solventWarnDate == 0){
+ sysPara->para.solventWarnDate = strCurDateTime.mid(0,6).toInt();
+ sysPara->para.solventWarnTime = strCurDateTime.mid(6,6).toInt();
+ }
+ sysPara->saveParaToFile();
+ }
+ else{
+ LogInfo::setRunStatusText(tr("detect solvent warning cnt: %1").arg(warnNum2));
+ qDebug()<<"检测到溶剂液位次数:"<status.flagOfNeedSolventCard = true;
+ ui->tabMainWindow->setRunStatus(tr("请添加原厂溶剂,然后刷溶剂卡!"));
+ if(logFlag5){
+ logFlag5 = 0;
+ QString strDate = QString::number(sysPara->para.solventWarnDate);
+ QString strTime = QString::number(sysPara->para.solventWarnTime);
+ QString str1 = QString::number(strDate.mid(0,2).toInt()).rightJustified(2,'0');
+ QString str2 = QString::number(strDate.mid(2,2).toInt()).rightJustified(2,'0');
+ QString str3 = QString::number(strDate.mid(4,2).toInt()).rightJustified(2,'0');
+ QString str4 = QString::number(strTime.mid(0,2).toInt()).rightJustified(2,'0');
+ QString str5 = QString::number(strTime.mid(2,2).toInt()).rightJustified(2,'0');
+ QString str6 = QString::number(strTime.mid(4,2).toInt()).rightJustified(2,'0');
+ QString strDateTime = str1 + "-" + str2 + "-" + str3 + " " + str4 + ":" + str5 + ":" + str6;
+ LogInfo::setRunStatusText(tr("solvent Warning at: %1").arg(strDateTime));
+ qDebug()<<"solvent Warning at:"<para.RFIDSolventWarnMixCnt >= 10)
+ sysPara->status.flagOfSolventMaxNum = true;
+
+ if(sysPara->status.flagOfSolventMaxNum){
+ if(sysPara->status.isPrinting)
+ ui->tabMainWindow->on_pushButtonStopPrint_pressed();
+ static bool logFlag3 = true;
+ if(sysPara->para.RFIDSolventWarnMixCnt>=10){
+ ui->tabMainWindow->setRunStatus(tr("请刷溶剂卡以恢复机器的正常功能"));
+ if(logFlag3){
+ logFlag3 = false;
+ msgtest->setText(tr("请刷溶剂卡以恢复机器的正常功能!"));
+ msgtest->show();
+ LogInfo::setRunStatusText(tr("请刷溶剂卡以恢复机器的正常功能"));
+ qDebug()<<"溶剂液位报警后已经打开混合阀10次,请刷卡以恢复机器的正常功能";
+ }
+ }
+ else{
+ ui->tabMainWindow->setRunStatus(tr("请刷溶剂卡以恢复机器的正常功能"));
+ if(logFlag3){
+ logFlag3 = false;
+ msgtest->setText(tr("请刷溶剂卡以恢复机器的正常功能!"));
+ msgtest->show();
+ LogInfo::setRunStatusText(tr("请刷溶剂卡以恢复机器的正常功能"));
+ qDebug()<<"已经打开混合阀360次,请刷卡以恢复机器的正常功能";
+ }
+ }
+ }
+ /*****************溶剂刷卡控制end**********************************************/
+#endif
+
+ static bool resumeFlag = false;
+ if(lostCommuFlag || ui->tabMainWindow->updatePhaseIndicatorLight() || (sysPara->status.statWarn & (WARN_STATUS_POWER_MON|WARN_STATUS_INK_WARN|WARN_STATUS_SUMP_WARN
+ |WARN_STATUS_SOLV_WARN|WARN_STATUS_POWER_MON)) || (sysPara->status.gearPumpRunStopFlag && pushButtonStartFlag) ||sysPara->status.lastHighVoltageFault)
+ { //updatePhaseIndicatorLight()务必放前面
+ sysPara->status.beeperOnFlag = true;
+ if(sysPara->status.gearPumpRunStopFlag && pushButtonStartFlag)
+ {
+ ui->tabMainWindow->setRunStatus(tr("压力泄漏或压力传感器故障!"));
+ }
+ if(!resumeFlag)
+ {
+ resumeFlag = true;
+ pulse_4s = 0;
+ if(!sysPara->status.lastHighVoltageFault)
+ {
+ ui->tabMainWindow->onLabelFaultRusumePressed();
+ }
+ }
+ }
+ else {
+ sysPara->status.beeperOnFlag = false;
+ sysPara->devOp->controlBeeper(false);
+ if(pulse_4s >= 20)
+ {
+ pulse_4s = 0;
+ resumeFlag = false;
+ }
+ }
+
+ if(sysPara->status.beeperOnFlag){ //报警会时有时无
+ sysPara->devOp->controlBeeper(!sysPara->devOp->isBeeperEnable());
+ }
+
+ if((sysPara->status.statWarn & (WARN_STATUS_POWER_MON))
+ ||sysPara->status.lastwarmInkPump||sysPara->status.lastwarmInkPump||sysPara->status.mainInkPumpError
+ ||sysPara->status.compressPumpError||sysPara->status.lastPhaseFault||sysPara->status.lastRecycleWarn||sysPara->status.lastHighVoltageFault)
+ { //2013-12-12故障报警灯 杨
+ sysPara->status.RedLightOnFlag = true;
+
+ }
+ else {
+ sysPara->status.RedLightOnFlag = false;
+ sysPara->devOp->controlRedLight(false);
+ //sysPara->devOp->controlRedLight(true);
+ }
+ if(sysPara->status.RedLightOnFlag){ //报警会时有时无
+ sysPara->devOp->controlRedLight(!sysPara->devOp->isRedLightEnable());
+ }
+ if((sysPara->status.statWarn & (WARN_STATUS_INK_WARN|WARN_STATUS_SOLV_WARN |WARN_STATUS_RECYCLE_FAULT|WARN_STATUS_SUMP_WARN))
+ && !sysPara->status.RedLightOnFlag){
+ //if(!sysPara->status.RedLightOnFlag){
+ sysPara->status.YellowLightOnFlag = true;
+ }
+ else {
+ sysPara->status.YellowLightOnFlag = false;
+ sysPara->devOp->controlYellowLight(false);
+ //sysPara->devOp->controlYellowLight(true);
+ }
+ if(sysPara->status.YellowLightOnFlag){ //报警会时有时无
+ sysPara->devOp->controlYellowLight(!sysPara->devOp->isYellowLightEnable());
+ }
+
+ if(sysPara->status.waitHightVolOff>0){
+ sysPara->status.waitHightVolOff--;
+ if(sysPara->status.waitHightVolOff==0){
+ sysPara->devOp->highVoltageCtrl(0);
+ ui->tabMainWindow->setRunStatus(tr("停止打印,自动关闭高压."));
+ }
+ }
+
+ }// 1s
+
+#ifdef WARNING
+ static int pre_pressed=0,pre_hvcurrent=0,press_err_cnt=0;
+ if(pulse_1s)
+ {
+ if((pre_pressed > sysPara->status.PRESSURE+70))
+ {
+ if(++press_err_cnt>3)
+ {
+ LogInfo::setRunStatusText(tr("压力异常:上次压力值%1,当前压力值%2").arg(pre_pressed).arg(sysPara->status.PRESSURE));
+ }
+ }
+ else
+ {
+ press_err_cnt = 0;
+ }
+ pre_pressed = sysPara->status.PRESSURE;
+
+
+ }
+
+ if(pulse_100ms)
+ {
+ if(pre_hvcurrent>150 && ( sysPara->status.HV_DETOUT> pre_hvcurrent+20) && (sysPara->status.waitHightVolOn==8 || sysPara->status.waitHightVolOff==1) && sysPara->status.isPrinting )
+ pre_hvcurrent = sysPara->status.HV_DETOUT;
+
+ if(sysPara->status.waitHightVolOn<8)sysPara->status.waitHightVolOn++;
+ if(sysPara->status.isPrinting==0) sysPara->status.waitHightVolOn=0;
+ }
+#endif
+ if(sysPara->devOp->color_flag ==3){
+ sysPara->devOp->color_flag = 0;
+ pulse_30s = 0;
+ }
+ else if(pulse_1s && sysPara->para.gearPumpEnable && sysPara->status.selfCheckDone
+ && (!sysPara->status.statWarn) && !sysPara->status.powerOffAppending){
+ if((!sysPara->para.flagOfReclaimPumEnable && sysPara->status.gearPumpRunSpeed <= 2000)
+ ||(sysPara->para.flagOfReclaimPumEnable && sysPara->status.gearPumpRunSpeed <= sysPara->para.gearPumpSpeedAlarm))
+ {
+ pulse_30s = 0;
+ }
+ else{
+ pulse_30s++;
+ if(pulse_30s >= 30){
+ if((sysPara->status.gearPumpRunSpeed >= 2500)||(sysPara->devOp->color_flag == 2)
+ ||(sysPara->para.flagOfReclaimPumEnable && sysPara->status.gearPumpRunSpeed > sysPara->para.gearPumpSpeedAlarm))
+ {
+ sysPara->status.flagOfSpeedAlarm = true;
+ sysPara->devOp->color_flag = 2;
+ if(pulse_30s % 500 == 0){
+ LogInfo::setRunStatusText(tr("齿轮泵转速过高,请立即停机并联系供应商!"));
+ qDebug()<<"齿轮泵转速过高,请立即停机并联系供应商!";
+ }
+ ui->tabMainWindow->setRunStatus(tr("齿轮泵转速过高,请立即停机并联系供应商!"));
+ sysPara->devOp->controlRedLight(true);
+ if(sysPara->status.isPrinting)
+ ui->tabMainWindow->on_pushButtonStopPrint_pressed();
+ }
+ else{
+ sysPara->devOp->color_flag = 1;
+ if(pulse_30s % 500 == 0){
+ LogInfo::setRunStatusText(tr("齿轮泵转速过高,请清理过滤器或者检查是否泄露!"));
+ qDebug()<<"齿轮泵转速过高,请清理过滤器或者检查是否泄露!";
+ }
+ ui->tabMainWindow->setRunStatus(tr("齿轮泵转速过高,请清理过滤器或者检查是否泄露!"));
+ sysPara->devOp->controlYellowLight(true);
+ }
+ }
+ if(pulse_30s % 10 == 0)
+ qDebug()<<"粘度: "<status.viscosity);
+ }
+ }
+ else if(sysPara->status.statWarn & 0xFE){
+ sysPara->devOp->color_flag = 3;
+ pulse_30s = 0;
+ }
+ }
+
+ //测试代码,发布模式自动忽略
+
+}
+
+void InkJetPrinter::autoControlHeater(){
+ //100ms
+ static int tempDly=1830;
+ if(sysPara->para.heatTime == 0)
+ sysPara->para.heatTime = 5;
+ int maxHeatTime = sysPara->para.heatTime * 600;
+ if(sysPara->para.flagOfContinueHeat)
+ maxHeatTime = 60* 600;
+ if(tempDly) tempDly--;
+ if(tempDly>=1800)
+ {
+ if(tempDly==1800)
+ {
+ sysPara->status.indoorTemperature = sysPara->status.TEMP_ADIN/4;
+ sysPara->devOp->pumpValveCtrl(1);
+ if(sysPara->status.indoorTemperature-35>0)
+ ui->tabSystemSetting->updateViscosityAdjust((sysPara->status.indoorTemperature-35));
+ else
+ ui->tabSystemSetting->updateViscosityAdjust(0);
+ }
+ return;
+ }
+ if(sysPara->status.TEMP_ADIN/4 < sysPara->para.temperature && sysPara->status.heaterONTimeCnt < MAX_HEATER_TIME){
+ if(tempDly==0) sysPara->status.heaterONTimeCnt ++;
+// if(!sysPara->devOp->isHearterEnable())
+ sysPara->devOp->controlHeater(true);
+
+ if(sysPara->status.heaterONTimeCnt == maxHeatTime)
+ {
+ if(sysPara->status.TEMP_ADIN/4 < (sysPara->para.temperature - 2)){
+ LogInfo::setRunStatusText(tr("警告:加热器长时间无法达到预期温度,故障或设置错误!"));
+ ui->tabMainWindow->setRunStatus("加热器长时间无法达到预期温度,故障或设置错误!");//20150105 no check
+ sysPara->devOp->controlHeater(false);
+ }
+ else
+ sysPara->status.heaterONTimeCnt = 0;
+ }
+ }
+ else if(sysPara->status.TEMP_ADIN/4 >= (sysPara->para.temperature + 2)){
+ if(sysPara->status.heaterONTimeCnt < maxHeatTime)
+ {
+ sysPara->status.heaterONTimeCnt = 0;
+ }
+// if(sysPara->devOp->isHearterEnable())
+ sysPara->devOp->controlHeater(false);
+ }
+}
+
+void InkJetPrinter::cnt1GroupCheck(void)
+{
+#ifdef COUNTER1_BY_GROUP /* 分段计米 */
+ static unsigned char lastGroupRunningIndex = 0;
+ if(sysPara->para.cnt1ByGroupEnalbe)
+ {
+ sysPara->devOp->ReadCnt1GroupStatus();
+ if(lastGroupRunningIndex == sysPara->status.cnt1GroupRunningIndex)
+ return;
+ lastGroupRunningIndex = sysPara->status.cnt1GroupRunningIndex;
+
+ emit updateCnt1GroupDisp(1);
+ }
+#endif
+}
+
+void InkJetPrinter::cntGroupCheck()
+{
+#ifdef COUNTER1_BY_GROUP /* 分段计米 */
+ static unsigned char mlastGroupRunningIndex = 0;
+ if(sysPara->para.cnt1ByGroupEnalbe)
+ {
+ sysPara->devOp->ReadCnt1GroupStatus();
+ if(mlastGroupRunningIndex != sysPara->status.cnt1GroupRunningIndex) {
+ mlastGroupRunningIndex = sysPara->status.cnt1GroupRunningIndex;
+ LogInfo::setRunStatusText("Next cnt1 group index: " + QString::number(sysPara->status.cnt1GroupRunningIndex));
+ }
+ }
+#endif
+
+#ifdef COUNTER2_BY_GROUP /* 分段计米2 */
+ if(sysPara->para.cnt2ByGroupEnalbe)
+ {
+ sysPara->devOp->ReadCnt2GroupStatus();
+ if(mlastGroupRunningIndex != sysPara->status.cnt2GroupRunningIndex) {
+ mlastGroupRunningIndex = sysPara->status.cnt2GroupRunningIndex;
+ LogInfo::setRunStatusText("Next cnt2 group index: " + QString::number(sysPara->status.cnt2GroupRunningIndex));
+ }
+ }
+#endif
+ emit sig_updateDisp(1);
+}
+
+void InkJetPrinter::autoControlValvePump(void)
+{
+ if(sysPara){
+ if(!sysPara->status.isPumpValveControledByHand){
+
+ /*---------------------------------供墨阀--------------------------------------------*/
+ bool enableFlag = ((sysPara->status.statWarn & WARN_STATUS_INK_SWINT)
+ || (sysPara->status.lastRecycleWarn && sysPara->para.RecycleWarnAction) // 2017.8.15版本回收故障关供墨阀问题
+ || ( sysPara->status.HVFaultCloseEn ) //高压故障关闭墨线
+ )?false:true; //墨线开关
+
+ if(enableFlag != sysPara->devOp->isInkValveOpen()){
+ if(enableFlag == false) { //关闭供墨阀的顺序 先开循环阀后关闭供墨阀间
+ if (sysPara->status.cycleValveOpenCntAfterSWintOff == 0) {
+ sysPara->status.cycleValveOpenCntAfterSWintOff = MAX_CYCLEVALVE_OPEN_TIME_AFTER_SWITN_OFF;
+ }
+ if (sysPara->status.cycleValveOpenCntAfterSWintOff < 60) { //在准备关闭循环阀的时候关闭供墨阀
+ sysPara->devOp->controlInkValve(enableFlag); //关供墨
+ sysPara->devOp->controlInkValvePWM(enableFlag); //关供墨
+ }
+ }
+ else { //开供墨阀
+ if(!sysPara->devOp->isReclaimPumpOpen()) //开供墨阀之前要判断回收泵有没有开,没开就提前打开
+ {
+ sysPara->devOp->controlReclaimPump(true, false); // 回收泵开
+ }
+ if(!ui->tabMainWindow->m_2sFlag)
+ {
+ sysPara->devOp->controlInkValve(enableFlag);
+ sysPara->devOp->controlInkValvePWM(enableFlag);
+ }
+ }
+ }
+
+ /*----------------------------------循环阀-------------------------------------------*/
+ if(!sysPara->status.selfCheckDone || (sysPara->status.flagOfPowerOnMode && sysPara->para.gearPumpEnable)){
+ // if(!sysPara->devOp->isCycleValveOpen()){ //循环阀 //定时开机循环时隔膜泵不开关循环阀
+ // sysPara->devOp->controlCycleValve(true);
+ // }
+ cycleValveRunForSelfCheck();
+ if(sysPara->status.flagOfPowerOnMode)
+ {
+ if(sysPara->devOp->isMixValveOpen()) { //
+ sysPara->devOp->controlMixValve(false);
+ }
+ }
+ }
+ else {
+ if(sysPara->status.cycleValveOpenCntAfterSWintOff){ // 开循环阀
+ if(!sysPara->devOp->isCycleValveOpen()){
+ sysPara->devOp->controlCycleValve(true);
+ }
+ sysPara->status.cycleValveOpenCntAfterSWintOff --;
+ }
+ else if(sysPara->devOp->isCycleValveOpen()){ // 关循环阀
+ sysPara->devOp->controlCycleValve(false);
+ }
+ }
+
+ /*----------------------------------泄压阀-------------------------------------------*/
+ //=====================================================================================================
+ if(sysPara->status.PRESSURE - sysPara->para.pressure > MAX_PRESSURE_RELEASE_DIFF)
+ sysPara->status.pressureOverFlowCnt ++;
+ else
+ sysPara->status.pressureOverFlowCnt = 0;
+
+ if((
+ sysPara->status.releaseValveOpenApending ||
+ sysPara->status.pressureOverFlowCnt > 2
+ ) //防止干扰和误动作
+ && !sysPara->status.releaseValveDelayCnt)
+ {
+ if(!sysPara->devOp->isReleaseValveOpen())
+ { //泄压阀
+ sysPara->devOp->controlReleaseValve(true);
+ }
+ sysPara->status.releaseValveDelayCnt = MAX_RELEASE_VALVE_DELAY_CNT;
+ sysPara->status.releaseValveOpenApending = true;
+ }
+ else
+ {
+ if(sysPara->devOp->isReleaseValveOpen())
+ { //
+ //sysPara->devOp->controlReleaseValve(false);
+ }
+
+ if(sysPara->status.releaseValveDelayCnt)
+ sysPara->status.releaseValveDelayCnt --;
+ if(sysPara->status.PRESSURE < sysPara->para.pressure)
+ {
+ sysPara->status.releaseValveOpenApending = false;
+ if(sysPara->devOp->isReleaseValveOpen()){ sysPara->devOp->controlReleaseValve(false);
+
+ }
+ }
+ }
+
+ /*-----------------------------------主墨泵------------------------------------------*/
+ if(sysPara->status.SEPTAL_POSITION < (sysPara->para.septalPostion - DIFF_SEPTAL_POSITION))
+ sysPara->status.septalPositionOverFlowCnt ++;
+ else
+ sysPara->status.septalPositionOverFlowCnt = 0;
+ if(sysPara->status.septalPositionOverFlowCnt > 2 && !sysPara->status.mainInkPumpError){ //主墨泵
+ if(!sysPara->devOp->isMainInkPumpOpen()){
+ sysPara->devOp->controlMainInkPump(true);
+ sysPara->status.mainInkPumpRunTmCnt = 0;
+ }
+ else if(sysPara->status.selfCheckDone){
+ if(sysPara->status.mainInkPumpRunTmCnt < MAX_MAIN_INK_PUMP_RUN_TIME){ //
+ sysPara->status.mainInkPumpRunTmCnt ++;
+ }
+ else {
+ if(!sysPara->para.gearPumpEnable)
+ {
+ sysPara->status.mainInkPumpError = true;
+ sysPara->devOp->controlMainInkPump(false);
+ LogInfo::setRunStatusText(tr("错误!!!!!!!!!!!主墨泵故障"));
+ ui->tabMainWindow->setRunStatus(tr("主墨泵故障!!!"));
+ }
+ }
+ }
+ }
+ else if(sysPara->status.SEPTAL_POSITION > sysPara->para.septalPostion){
+ if(sysPara->devOp->isMainInkPumpOpen())
+ sysPara->devOp->controlMainInkPump(false);
+ }
+ /*-----------------------------------压缩机------------------------------------------*/
+
+ if((sysPara->para.pressure - sysPara->status.PRESSURE > MAX_PRESSURE_DIFF) && !sysPara->status.compressPumpError){ //压缩机
+ if(!sysPara->devOp->isCompressPumpOpen()){
+ sysPara->devOp->controlCompressPump(true);
+ sysPara->status.compressPumpRunTmCnt = 0;
+ }
+ else if(sysPara->status.selfCheckDone){
+ if(sysPara->status.compressPumpRunTmCnt < MAX_COMPRESS_PUMP_RUN_TIME){ //如果长时间开压缩机,考虑设备故障
+ sysPara->status.compressPumpRunTmCnt ++;
+ }
+ else {
+ sysPara->status.compressPumpError = true;
+ sysPara->devOp->controlCompressPump(false);
+ if(!sysPara->para.gearPumpEnable)
+ {
+ LogInfo::setRunStatusText(tr("错误!!!!!!!!!!!压缩机故障"));
+ ui->tabMainWindow->setRunStatus(tr("压缩机故障!!!"));
+ }
+
+ }
+ }
+ }
+ else if(sysPara->para.pressure <= sysPara->status.PRESSURE){ //压力到达预期的压力
+ if(sysPara->devOp->isCompressPumpOpen())
+ sysPara->devOp->controlCompressPump(false);
+ }
+
+ /*------------------------------------粘度泵,混合阀-----------------------------------------*/
+
+ /*-----------------------------每30s打开一次粘度泵以及相关处理--------------------------------------*/
+ static bool hasDetectedBellow = false; // 检测到下位灯
+ static bool hasDetectedTop = false; // 检测到上位灯
+ static int viscosity_low = 0; //统计粘度连续偏低10%次数
+ static unsigned char Mixing_valve_open = 0; //统计粘度连续偏高5%次数
+ static unsigned char viscosity_faulty_num = 0; //统计粘度连续偏高13%次数
+ static bool flag = 0;
+
+ if(sysPara->status.cycleValveOpenCntAfterSWintOff) { //关闭墨线的时候要提前开粘度泵
+ sysPara->status.viscosityDelayCnt = sysPara->para.viscosityPumpInterval*100 + 100;
+ }
+ ++sysPara->status.viscosityDelayCnt;
+ int mixer_open_threshold = (105*sysPara->para.viscosity)/100;
+ int viscosity_faulty_threshold =(113*sysPara->para.viscosity)/100;
+ if(sysPara->status.viscosityDelayCnt >= sysPara->para.viscosityPumpInterval*100 && flag == 0)
+ {
+ flag=1;
+ if (!sysPara->devOp->isViscosityPumpOpen())
+ {
+ sysPara->devOp->controlViscosityPump(true);
+ viscosity_timer->start(10000);
+ qDebug()<<"粘度: "<status.viscosity);
+ }
+ if((sysPara->status.viscosity >= 90*sysPara->para.viscosity/100) && (sysPara->status.viscosity <= mixer_open_threshold))
+ {
+ sysPara->status.viscosityFault = 0;
+ viscosity_low=0;
+ Mixing_valve_open = 0;
+ viscosity_faulty_num = 0;
+ }
+ if(sysPara->status.viscosity < 90*sysPara->para.viscosity/100)
+ {
+ viscosity_low++;
+ viscosity_faulty_num = 0;
+ Mixing_valve_open = 0;
+ }
+ if(sysPara->status.viscosity > mixer_open_threshold && sysPara->status.viscosity <= viscosity_faulty_threshold)
+ {
+ Mixing_valve_open++;
+ viscosity_low = 0;
+ viscosity_faulty_num = 0;
+ }
+ if(sysPara->status.viscosity > viscosity_faulty_threshold){
+ Mixing_valve_open++;
+ viscosity_faulty_num++;
+ viscosity_low = 0;
+ }
+
+ if((!sysPara->devOp->isMixValveOpen()) && (((Mixing_valve_open > 1) && (!sysPara->para.gearPumpEnable)) || ((Mixing_valve_open > 4) && sysPara->para.gearPumpEnable))) { //
+ sysPara->devOp->controlMixValve(true);
+ Mixing_valve_open = 0;
+ LogInfo::setRunStatusText(tr("添加溶剂:")+QString::number(sysPara->status.viscosity));
+ qDebug()<<"添加溶剂";
+ }
+
+ if(viscosity_low >= 60)
+ {
+ LogInfo::setRunStatusText(tr("警告!!!!!!!!!!!粘度值偏低")+QString::number(sysPara->status.viscosity));
+ qDebug()<<"粘度值偏低";
+ sysPara->status.viscosityFault = 2;
+ if(sysPara->devOp->isMixValveOpen()) {
+ sysPara->devOp->controlMixValve(false);
+ }
+ }
+ if(viscosity_faulty_num >= 5)
+ {
+ LogInfo::setRunStatusText(tr("错误!!!!!!!!!!!粘度偏大故障")+QString::number(sysPara->status.viscosity));
+ qDebug()<<"粘度偏大故障";
+ sysPara->status.viscosityFault = 1;
+ }
+
+ }
+ if((sysPara->status.viscosityDelayCnt >= (sysPara->para.viscosityPumpInterval*100+120)) && flag==1)
+ {
+ if(sysPara->devOp->isMixValveOpen()) {
+ sysPara->devOp->controlMixValve(false);
+ }
+ }
+
+ if((sysPara->status.viscosityDelayCnt >= (sysPara->para.viscosityPumpInterval*100+130)) && flag==1)
+ {
+ if (sysPara->devOp->isViscosityPumpOpen()) {
+ sysPara->devOp->controlViscosityPump(false);
+ }
+ sysPara->status.viscosityDelayCnt = 0;
+ flag=0;
+ }
+
+ if(sysPara->status.statWarn & WARN_STATUS_VISCOTITY_MEASURE_READY){ //上位灯检测标志位
+ viscosity_timer->stop();
+ }
+
+ if(sysPara->status.viscosityDelayCnt < sysPara->para.viscosityPumpInterval*100) {
+ static int detectBelow = 0;
+ if (++detectBelow%400 == 0) {
+ if(sysPara->status.statWarn & WARN_STATUS_VISCOTITY_MEASURE_READY)
+ {
+ if(sysPara->status.rWarnViscoReady>=15){
+ sysPara->status.viscosityFault = 1;
+ sysPara->status.viscosity=0;
+ if(!firstTime)
+ qDebug()<<"错误!粘度计下位灯故障."+QString::number(sysPara->status.viscosity);
+ // LogInfo::setRunStatusText(tr("错误!粘度计下位灯故障.")+QString::number(sysPara->status.viscosity));
+ hasDetectedBellow = true;
+ }
+ else sysPara->status.rWarnViscoReady++;
+ }
+ else {
+ sysPara->status.rWarnViscoReady = 0;
+ sysPara->status.viscosityFault = 0;
+ }
+ }
+ }
+ if(hasDetectedBellow && hasDetectedTop)
+ {
+ if(sysPara->devOp->isMixValveOpen()) { //
+ sysPara->devOp->controlMixValve(false); //如果检测不到上下位灯就关掉混合阀
+ }
+ }
+ if(sysPara->status.viscosityFault==0)
+ {
+ hasDetectedBellow = false;
+ hasDetectedTop = false;
+ }
+ // }
+ /*-----------------------------------回收泵------------------------------------------*/
+
+ if(!sysPara->status.autoCtlReclaimAfterSWintOff)
+ {
+ if(!sysPara->devOp->isReclaimPumpOpen() ){ //回收泵
+ // ui->tabMainWindow->setRunStatus(tr("全速回收泵!!!"));
+ sysPara->status.reclaimPumpFullSpeedCnt = 0;
+ sysPara->devOp->controlReclaimPump(true,true); //先全速,后降速
+ }
+ else if(sysPara->status.reclaimPumpFullSpeedCnt <= RECLAIM_PUMP_FULL_SPEED_CNT){
+ sysPara->status.reclaimPumpFullSpeedCnt ++;
+ if(sysPara->status.reclaimPumpFullSpeedCnt == RECLAIM_PUMP_FULL_SPEED_CNT){ //降速
+ // ui->tabMainWindow->setRunStatus(tr("降速回收泵!!!"));
+ sysPara->devOp->controlReclaimPump(true,false);
+ }
+ }
+ }
+ /*-----------------------------------------------------------------------------*/
+ }
+ }
+}
+//==========================
+// 放在10ms的定时器运行,但和粘度泵工作周期一致
+void InkJetPrinter::checkMixValveOpen(){
+ //混合阀
+ if(sysPara->status.viscosity>40000){
+ sysPara->status.viscosityMaxFaultCnt++;
+ if(sysPara->status.viscosityMaxFaultCnt>5)
+ {
+ sysPara->status.viscosityMaxFaultCnt=0;
+ if(sysPara->status.viscosityFault ==0 ) LogInfo::setRunStatusText(tr("粘度检测异常,粘度值太大!!!"));
+ sysPara->status.viscosityFault=1;
+ }
+ sysPara->status.viscosity=0;
+ }
+ int mixer_open_threshold = MAX_VISICOSITY_RATIO*sysPara->para.viscosity/100;
+ int mixer_open_threshold_high = (MAX_VISICOSITY_RATIO + 11)*sysPara->para.viscosity/100;
+ if(sysPara->status.viscosity > mixer_open_threshold)
+ {// 粘度值高报警: 条件@高于设定值的1.05,时间:120个测量周期
+ sysPara->status.visocityValueOverflowNum ++;
+ if(sysPara->status.visocityValueOverflowNum >= (MAX_VISICOSITY_VALUE_OVERFLOW_NUM/3)){
+ if((sysPara->status.viscosity >= mixer_open_threshold_high)//超出太多加得快,否则隔三下,加一下
+ || ((sysPara->status.visocityValueOverflowNum % 3) == 0)){
+ if(!sysPara->devOp->isMixValveOpen()){ //
+ sysPara->devOp->controlMixValve(true);
+ LogInfo::setRunStatusText(tr("混合阀打开2:")+QString::number(sysPara->status.viscosity));
+ }
+ }
+ }
+ if(sysPara->status.visocityValueOverflowNum > MAX_ALLOW_VISICOSITY_OVERFLOW_NUM){
+ if(sysPara->status.viscosityFault ==0 )
+ LogInfo::setRunStatusText(tr("错误!!!!!!!!!!!粘度偏大故障"));
+
+ sysPara->status.viscosityFault = 1;
+ }
+ }
+ else if(sysPara->status.viscosity > 90*sysPara->para.viscosity/100){
+ // 粘度值正常
+ sysPara->status.visocityValueOverflowNum = 0;
+ sysPara->status.viscosityFault = 0; // 20160922 粘度低报警不能复位问题
+ }
+ else {// 粘度值低报警: 条件@ 低于设定值的0.9,时间:60个测量周期
+ sysPara->status.visocityValueOverflowNum ++;
+ if(sysPara->status.visocityValueOverflowNum > (MAX_ALLOW_VISICOSITY_OVERFLOW_NUM/2)){
+
+ if(sysPara->status.viscosityFault ==0 ) LogInfo::setRunStatusText(tr("警告!!!!!!!!!!!粘度值偏低"));
+ sysPara->status.viscosityFault = 2;
+ sysPara->status.visocityValueOverflowNum=MAX_ALLOW_VISICOSITY_OVERFLOW_NUM-10;
+ }
+ }
+}
+
+
+void InkJetPrinter::checkMixValveClose(){
+ if(sysPara->devOp->isMixValveOpen()){ // 关闭混合阀
+ sysPara->devOp->controlMixValve(false);
+ }
+}
+
+//在开机自检过程中交替打开和关闭循环阀
+void InkJetPrinter::cycleValveRunForSelfCheck(){
+ static int cycleValveOpenCnt = 0;
+ if (++cycleValveOpenCnt%300 > 150) {
+ if(!sysPara->devOp->isCycleValveOpen()){ //循环阀 开
+ sysPara->devOp->controlCycleValve(true);
+ }
+ }
+ else {
+ if(sysPara->devOp->isCycleValveOpen()){ //循环阀 关
+ sysPara->devOp->controlCycleValve(false);
+ }
+ }
+}
+
+void InkJetPrinter::onReclaimTankBlock(){
+ if(sysPara){
+ ui->tabMainWindow->enableReclaimCtrlButton(true);
+ sysPara->status.reclaimTankBlockedAppending = true;
+ if(sysPara->status.powerOffAppending && sysPara->status.powerOffAfterPhaseFaultAppending)
+ ui->tabMainWindow->checkForPowerOff();
+ sysPara->status.powerOffAppending = false; //如果有关机动作,终止
+
+ }
+
+}
+/*
+ *
+ * 控制回收槽
+ *
+ * */
+
+void InkJetPrinter::detectAndcontrolReclaimTank(){
+ sysPara->status.currReclaimTankPos =10*sysPara->status.curr_reclaimTankTime;
+ sysPara->status.reclaimTankBlockedAppending =0;
+ //qDebug()<status.reclaimTankstatus;
+ // if(sysPara->status.currReclaimTankPos == 0)
+ // ui->tabMainWindow->setReBootQtUIEnable(false);
+ // else
+ // ui->tabMainWindow->setReBootQtUIEnable(true);
+
+ if(sysPara->status.reclaimTankstatus == 0x10) //7 故障,6 关完成,5开完成,4 保持, 3 停止, 2 关, 1 开,0-无操作
+ {
+ if(sysPara->devOp->isReclaimTankCloseEnable())
+ {
+ LogInfo::setRunStatusText(tr("电机故障"));
+ ui->tabMainWindow->setRunStatus(tr("电机故障"));
+ sysPara->devOp->controlReclaimTankClose(false);
+ ui->tabMainWindow->resetReclaimCtrlButtonText();
+ emit reclaimTankBlock();
+ }
+ else {
+ LogInfo::setRunStatusText(tr("电机故障"));
+ ui->tabMainWindow->setRunStatus(tr("电机故障!!!"));
+ if(sysPara->devOp->isReclaimTankOpenEnable())
+ sysPara->devOp->controlReclaimTankOpen(false);
+ ui->tabMainWindow->resetReclaimCtrlButtonText();
+ emit reclaimTankBlock();
+ }
+
+ }
+ else if(sysPara->status.reclaimTankstatus == 5 )//7 故障,6 关完成,5开完成,4 保持, 3 停止, 2 关, 1 开,0-无操作
+ {
+ if(sysPara->devOp->isReclaimTankOpenEnable())
+ sysPara->devOp->controlReclaimTankOpen(false); //到头,关闭
+ sysPara->status.reclainTankReachEnd = true;
+ /*应要求去掉多余到信息 LogInfo::setRunStatusText(tr("回收槽到头"));*/
+ ui->tabMainWindow->setRunStatus(tr("回收槽到头"));
+ ui->tabMainWindow->enablePrintButton(true); //仅仅在此时能使能打印按钮
+ ui->tabMainWindow->resetReclaimCtrlButtonText();
+ sysPara->devOp->highVoltageCtrl(1);
+ emit reclaimTankOpenDone();
+ /*回收槽开关时间校正*/
+ sysPara->para.reclaimTankTime =( sysPara->status.currReclaimTankPos>120 )? sysPara->status.currReclaimTankPos/10-1:12;
+ ui->tabSystemSetting->updateReclaimTime( sysPara->para.reclaimTankTime );
+
+ qDebug()<<"reclaimTankOpenDone currReclaimTankPos:"<status.currReclaimTankPos;
+ qDebug()<<"reclaimTankOpenDone curr_reclaimTankTime:"<status.curr_reclaimTankTime;
+ }
+ else if(sysPara->status.reclaimTankstatus == 0x11 )//7 故障,6 关完成,5开完成,4 保持, 3 停止, 2 关, 1 开,0-无操作
+ {
+ sysPara->devOp->controlReclaimTankOpen(false); //卡住,关闭
+ ui->tabMainWindow->resetReclaimCtrlButtonText();
+ LogInfo::setRunStatusText(tr("回收槽卡住或者回收槽开关时间设置错误"));
+ ui->tabMainWindow->setRunStatus(tr("回收槽卡住或者回收槽开关时间设置错误"));
+ emit reclaimTankBlock();
+ }
+ else if(sysPara->status.reclaimTankstatus == 1 || sysPara->status.reclaimTankstatus == 2)//7 故障,6 关完成,5开完成,4 保持, 3 停止, 2 关, 1 开,0-无操作
+ {
+ emit setReclaimTankCurrentPos(sysPara->status.currReclaimTankPos);
+ sysPara->status.reclaimBlockedCnt = 0;
+
+ }
+ else if(sysPara->status.reclaimTankstatus == 6 )//7 故障,6 关完成,5开完成,4 保持, 3 停止, 2 关, 1 开,0-无操作
+ {
+ if(sysPara->devOp->isReclaimTankCloseEnable())
+ sysPara->devOp->controlReclaimTankClose(false); //到头,关闭
+ /*应要求去掉多余到信息 LogInfo::setRunStatusText(tr("回收槽到头"));*/
+ ui->tabMainWindow->setRunStatus(tr("回收槽到头"));
+ //sysPara->status.currReclaimTankPos = 0; //将回收槽的时间置为零
+ ui->tabMainWindow->resetReclaimCtrlButtonText();
+ emit reclaimTankCloseDone();
+ sysPara->status.lastRecycleWarn = 0;
+ sysPara->status.HVFaultCloseEn=0;
+ sysPara->status.reclainCloseAppending=false;
+ sysPara->status.canRunAirPushing = true; //下次开回收槽就执行排气程序
+ qDebug()<<"reclaimTankCloseDone currReclaimTankPos:"<status.currReclaimTankPos;
+ qDebug()<<"reclaimTankCloseDone curr_reclaimTankTime:"<status.curr_reclaimTankTime;
+ }
+ else if(sysPara->status.reclaimTankstatus == 0x12 )//7 故障,6 关完成,5开完成,4 保持, 3 停止, 2 关, 1 开,0-无操作
+ {
+ sysPara->devOp->controlReclaimTankOpen(false); //到头,关闭
+ LogInfo::setRunStatusText(tr("回收槽卡住或者回收槽开关时间设置错误"));
+ ui->tabMainWindow->setRunStatus(tr("回收槽卡住或者回收槽开关时间设置错误"));
+ ui->tabMainWindow->resetReclaimCtrlButtonText();
+ emit reclaimTankBlock();
+ }
+ else // if(sysPara->status.reclaimTankstatus == 7 )//7 故障,6 关完成,5开完成,4 保持, 3 停止, 2 关, 1 开,0-无操作
+ {
+ emit setReclaimTankCurrentPos(sysPara->status.currReclaimTankPos);
+ }
+}
+
+static void controlTabDisplay(QTabWidget *tab,QWidget *page,QString name,int enable){
+ if(enable){
+ if(tab->indexOf(page) == -1){
+ tab->addTab(page,name);
+
+ }
+ }
+ else {
+ int index = tab->indexOf(page);
+ if(index != -1)
+ tab->removeTab(index);
+ }
+
+}
+
+static void controlTabDisplay(QTabWidget *tab,QWidget *page,QString name,int enable,int Pos){
+ if(enable){
+ if(tab->indexOf(page) == -1){
+ tab->insertTab(Pos,page,name);
+ }
+ }
+ else {
+ int index = tab->indexOf(page);
+ if(index != -1)
+ tab->removeTab(index);
+ }
+
+}
+void InkJetPrinter::onAuthChanged(int auth){
+
+ controlTabDisplay(this,ui->tabSystemSetting,tr("系统设置"),auth&AUTH_DISPLAY_SYSTEM_SETTING);
+ controlTabDisplay(this,ui->tabSystemManage,tr("系统管理"),auth&AUTH_DISPLAY_SYSTEM_MANAGE);
+ controlTabDisplay(this,ui->tabOtherInfo,tr("其他信息"),auth& AUTH_DISPLAY_OTHER_INFO);
+ controlTabDisplay(this,ui->tabLogInfo,tr("日志信息"),auth&AUTH_DISPLAY_LOG_INFO);
+ controlTabDisplay(this,ui->tabNetworkManager,tr("网络管理"),auth&AUTH_SUPER_USER1);
+
+ // controlTabDisplay(this,ui->tabZkEdit,tr("图案编辑"),auth);
+ ui->tabPrintSetting->updateAuthorization(auth);
+ ui->tabSystemSetting->updateAuthorization(auth);
+ ui->tabNetworkManager->updateAuthorization(auth);
+}
+
+void InkJetPrinter::onConfigChanged(void){
+
+ sysPara->loadParaFromFile();
+}
+
+/*
+ * 这个方法的主要目的是在切换tab时不要弹出输入法
+ *
+ */
+
+void InkJetPrinter::onInkJetPrinterCurrentChanged(int index)
+{
+ QWidget *w = widget(index);
+ if(w){
+ QWidget *subWidget = w->focusWidget();
+ if(subWidget)
+ subWidget->clearFocus();
+ }
+ //if(index == 3||index == 3) //刷新打印设置这个界面
+ {
+ ui->tabPrintSetting->update();
+ }
+
+}
+
+void InkJetPrinter::closeEvent(QCloseEvent *event)
+{
+ event->ignore();
+}
+void InkJetPrinter::resizeEvent(QResizeEvent *event){
+
+ event->ignore();
+}
+
+void InkJetPrinter::onChangeTab(QString)
+{
+ this->setCurrentIndex (indexOf( ui->tabPicEdit));
+}
+void InkJetPrinter::onchangeEditMode(int)
+{
+ if(sysPara){
+ if(sysPara->para.EditMode == PICFILE) {
+ insertTab(1,ui->tabPicEdit,tr("信息编辑"));
+ // controlTabDisplay(this,ui->tabZkEdit,tr("图案编辑"),0);
+ }
+ else if(sysPara->para.EditMode == TXTFILE|| sysPara->para.EditMode == SCENE){
+ controlTabDisplay(this,ui->tabPicEdit,tr("信息编辑"),0);
+ // controlTabDisplay(this,ui->tabZkEdit,tr("图案编辑"),1,1);
+ }
+ ui->tabMainWindow->changeEditMode(sysPara->para.EditMode);
+ }
+ else{
+
+ }
+}
+
+
+void InkJetPrinter::OnSpeedOver(int mode)
+{
+ if(mode==2){
+ //emit QMessageBox::warning(NULL,tr("警告"),tr("喷印速度过快或间隔太短!无法喷印完全,自动暂停喷印!!!"));
+ msgtest->setText(tr("喷印速度过快或间隔太短!无法喷印完全,自动暂停喷印!!!"));
+ msgtest->show();
+ }
+ else if(mode==1){
+ //emit QMessageBox::warning(NULL,tr("警告"),tr("喷印速度过快或间隔太短!无法喷印完全!!!"));
+ msgtest->setText(tr("喷印速度过快或间隔太短!无法喷印完全!!!"));
+ msgtest->show();
+ }
+}
+
+void InkJetPrinter::onPrintErrorStatus(QString s,unsigned int res)
+{
+ if(res==1 || sysPara->status.WorkTimeOut ){
+ sysPara->status.WorkTimeOut =1;
+ sysPara->devOp->printCtrl( PRINT_CTRL_STOP);
+ //emit QMessageBox::warning(NULL,tr("警告"),s);
+ msgtest->setText(s);
+ msgtest->show();
+ }
+ else if(res==2) {
+ //emit QMessageBox::warning(NULL,tr("警告"),s);
+ msgtest->setText(s);
+ msgtest->show();
+ }
+ else if(res==3) { sysPara->status.WorkTimeOut =0; }
+}
+void InkJetPrinter::OnFinished(int event){
+ //msgtest->setText(" ");msgtest->show();
+ Q_UNUSED(event);
+ msgtest->hide();
+
+}
+void InkJetPrinter::OnBoxFinished(int event){
+ //msgtest->setText(" ");msgtest->show();
+ Q_UNUSED(event);
+ msgBox1->hide();
+
+}
+unsigned char BCDtoHEX(unsigned char BCD)
+{
+ unsigned char tempData;
+
+ tempData = (BCD >> 4) * 10 + (BCD & 0x0F);
+ return (tempData);
+}
+void InkJetPrinter::refreshModbusStatus(void)
+{
+#ifdef MODBUS
+ if (modbus->getModbusStatus() != 1) {
+ qDebug()<<"refresh get modbus error";
+ return;
+ }
+
+ qint16 fileNameSize = QFileInfo(sysPara->para.lastOpenedFileName).fileName().size();
+ if (fileNameSize) {
+ if (fileNameSize > 100) {
+ fileNameSize = 100;
+ }
+ }
+ QString str = QFileInfo(sysPara->para.lastOpenedFileName).fileName();
+ snprintf((char *)sysPara->modbusStatus.usedFileName, sizeof(sysPara->modbusStatus.usedFileName), "%s",(char *)str.toLatin1().constData());
+ sysPara->modbusStatus.printStatus = ui->tabMainWindow->getCurrPrintStatus();
+ memcpy(&sysPara->modbusStatus.curCalendarAndDate, &sysPara->status.calandar_and_dat, sizeof(sysPara->status.calandar_and_dat));
+
+ unsigned char tmp[4];
+ memcpy(&tmp,&sysPara->modbusStatus.curCalendarAndDate.cnt1CurrValue,4);
+ tmp[0] = BCDtoHEX(tmp[0]);
+ tmp[1] = BCDtoHEX(tmp[1]);
+ tmp[2] = BCDtoHEX(tmp[2]);
+ tmp[3] = BCDtoHEX(tmp[3]);
+ //memcpy(&sysPara->modbusStatus.curCalendarAndDate.cnt1CurrValue,&tmp,4);
+ sysPara->modbusStatus.curCalendarAndDate.cnt1CurrValue = tmp[3]*1000000 + tmp[2]*10000+ tmp[1]*100 + tmp[0] ;
+ //sysPara->modbusStatus.curCalendarAndDate.cnt1CurrValue = QString::number(sysPara->modbusStatus.curCalendarAndDate.cnt1CurrValue).toUInt(0,16);
+ sysPara->modbusStatus.curCalendarAndDate.cnt1CurrValue = QString::number(sysPara->status.calandar_and_dat.cnt1CurrValue,16).toInt();
+ sysPara->modbusStatus.curCalendarAndDate.cnt2CurrValue = QString::number(sysPara->status.calandar_and_dat.cnt2CurrValue,16).toInt();
+ sysPara->modbusStatus.curCalendarAndDate.cnt1End = sysPara->para.cnt1EndValue;
+ sysPara->modbusStatus.curCalendarAndDate.cnt2End = sysPara->para.cnt2EndValue;
+ sysPara->modbusStatus.curCalendarAndDate.cnt2Repeat = sysPara->para.cnt2RepeateValue;
+ sysPara->modbusStatus.curCalendarAndDate.cnt2InitValue = sysPara->para.cnt2StartValue;
+ sysPara->modbusStatus.productCnt = sysPara->status.productCnt;
+
+
+ sysPara->modbusStatus.statWarn = sysPara->status.RedLightOnFlag ;
+ // 显示正在打印内容的行数和列数
+ int wmax = sysPara->status.currPrintRow;
+ if (sysPara->para.AlterMode) {
+ wmax = sysPara->status.currAlterPrintRow;
+ }
+ sysPara->modbusStatus.mbCurrPrintRow = wmax;
+ sysPara->modbusStatus.mbCurrPrintCol = sysPara->status.currPrintCol;
+#endif
+}
+
+void InkJetPrinter::onModbusWriteCalendar()
+{
+#ifdef MODBUS
+ if (modbus->getModbusStatus() == -1) {
+ qDebug()<<"get modbus error";
+ return;
+ }
+
+ sysPara->para.cnt1StartValue = sysPara->modbusParas.setCalendar.cnt1CurrValue;
+ sysPara->para.cnt1EndValue = sysPara->modbusParas.setCalendar.cnt1End;
+ sysPara->para.cnt1CurrValue = sysPara->modbusParas.setCalendar.cnt1Repeat;
+ sysPara->para.cnt1StepValue = sysPara->modbusParas.setCalendar.cnt1Step;
+
+ sysPara->para.cnt2StartValue = sysPara->modbusParas.setCalendar.cnt2InitValue;
+ sysPara->para.cnt2EndValue = sysPara->modbusParas.setCalendar.cnt2End;
+ sysPara->para.cnt2StepValue = sysPara->modbusParas.setCalendar.cnt2Repeat;
+ sysPara->para.cnt2RepeateValue = sysPara->modbusParas.setCalendar.cnt2Step;
+
+ if (sysPara->modbusParas.setCalendar.cntCurrValueInitEnable & 0x02) {
+ sysPara->status.cnt2CurrentValueInitDoneFlag = 0;
+ }
+ if (sysPara->modbusParas.setCalendar.cntCurrValueInitEnable & 0x01) {
+ sysPara->status.cnt1CurrentValueInitDoneFlag = 0;
+ }
+ sysPara->para.cnt1CurrValue = sysPara->modbusParas.setCalendar.cnt1CurrValue;
+ sysPara->para.cnt2CurrValue = sysPara->modbusParas.setCalendar.cnt2CurrValue;
+ sysPara->devOp->writeFpgaCalandar(0);
+ emit updataPara2UI();
+#endif
+}
+
+void InkJetPrinter::close_jd_timer()
+{
+ timer->stop();
+}
+
+
+void InkJetPrinter::handlePushButtonStartPressed(bool flag)
+{
+ pushButtonStartFlag = flag;
+
+ if(flag)
+ {
+ PID_init();
+ }
+ sysPara->status.gearPumpRunStopFlag = !flag;//齿轮泵开关
+}
+
+void InkJetPrinter::handleInitedPID()
+{
+ PID_init();
+}
+
+void InkJetPrinter::recievedFile2Save(QString fileName)
+{
+ //qDebug() << "recieveFile2Save:"<exists(saveName);
+ if (exist)
+ {
+ createfile->remove(saveName);
+ }//end if
+ QFile::copy ( sourceName,saveName );
+ emit openFile(saveName,false);
+ //emit startPrint();确认接收到消息立即打印
+ //ui->tabMainWindow->getTexteditOption()->onFileOpen(saveName,false);
+ //ui->tabMainWindow->on_pushButtonStartPrint_pressed();
+ }
+ else {
+
+ }
+}
+
+void InkJetPrinter::viscosity_timerHandler()
+{
+ if(!firstTime)
+ qDebug()<<"错误!粘度计故障:检测不到上位灯";
+ // LogInfo::setRunStatusText(tr("错误!粘度计故障:检测不到上位灯"));
+ viscosity_timer->stop();
+ firstTime = 0;
+}
+
+void InkJetPrinter::disableTabClick(){
+ this->setDisabled(true);
+ this->setCurrentIndex(0);
+}
+
+void InkJetPrinter::enableInkJetTabClick(bool flag){
+ this->setEnabled(flag);
+}
+
+bool InkJetPrinter::eventFilter(QObject *watched, QEvent *event)
+{
+
+ if(sysPara->status.flagOfKeyBoardType)
+ return QTabWidget::eventFilter(watched,event);
+
+ QSpinBox *qsb=dynamic_cast(watched);
+ QLineEdit *qle=dynamic_cast(watched);
+ QTextEdit *qte=dynamic_cast(watched);
+ QMouseEvent *me = dynamic_cast(event);
+ switch (event->type()){
+ case QEvent::FocusIn:
+ if(qsb&&!qsb->isReadOnly()
+ ||qle&&!qle->isReadOnly()
+ ||qte&&!qte->isReadOnly())myInputMethod->updateHandler(1);
+ break;
+ case QEvent::FocusOut:
+ myInputMethod->updateHandler(2);
+ break;
+ }
+
+ return QTabWidget::eventFilter(watched,event);
+}
+
+void InkJetPrinter::sendDataManual(QString cmdstr,QString addrstr,QString datastr,QString lenstr,QString typestr){
+ qDebug()<<"sendDataManual!!!";
+ bool ok;
+ quint8 arr[8]={0xAA,0x02,0x03,0x01,0x11,0x00,0x00,0x55};
+ int cmd = cmdstr.toInt(&ok,16);
+ int addr = addrstr.toInt(&ok,16);
+ int len = lenstr.toInt(&ok,10);
+ int type = typestr.toInt(&ok,10);
+ QByteArray data;
+ data.resize(datastr.length() / 2);
+
+ for (int i = 0; i < datastr.length(); i += 2) {
+ // 提取每两个字符
+ QString byteString = datastr.mid(i, 2);
+ // 将16进制字符串转换为unsigned char
+ bool ok;
+ unsigned char byte = static_cast(byteString.toUInt(&ok, 16));
+ data[i / 2] = byte;
+ }
+ // quint16 data1[] = {68, 90, 108, 125, 141, 156, 170, 170, 180, 193, 204, 214};
+ const char* charData = data.constData();
+
+ // 转换为 unsigned char 指针
+ const unsigned char* unsignedCharData = reinterpret_cast