重构RFID前
This commit is contained in:
@@ -3632,7 +3632,15 @@ void DevOp::comForRFID_init(void)
|
|||||||
{
|
{
|
||||||
// return;
|
// return;
|
||||||
comForRFID = new QSerialPort();
|
comForRFID = new QSerialPort();
|
||||||
|
|
||||||
|
|
||||||
comForRFID->setPortName("/dev/ttyAS1");
|
comForRFID->setPortName("/dev/ttyAS1");
|
||||||
|
|
||||||
|
// 覆盖默认串口名称,用于x86架构调试
|
||||||
|
#ifdef ARCH_X86
|
||||||
|
comForRFID->setPortName("/dev/ttyUSB0");
|
||||||
|
#endif
|
||||||
|
|
||||||
comForRFID->setBaudRate(9600);
|
comForRFID->setBaudRate(9600);
|
||||||
comForRFID->setDataBits(QSerialPort::Data8);
|
comForRFID->setDataBits(QSerialPort::Data8);
|
||||||
comForRFID->setParity(QSerialPort::NoParity);
|
comForRFID->setParity(QSerialPort::NoParity);
|
||||||
@@ -3642,7 +3650,7 @@ void DevOp::comForRFID_init(void)
|
|||||||
qDebug() << "RFID串口打开成功";
|
qDebug() << "RFID串口打开成功";
|
||||||
connect(comForRFID,SIGNAL(readyRead()),this,SLOT(readRFIDData()));
|
connect(comForRFID,SIGNAL(readyRead()),this,SLOT(readRFIDData()));
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "RFID串口打开失败:" << comForRFID->errorString();
|
qDebug() << "RFID串口打开失败: " << comForRFID->errorString();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -3656,7 +3664,7 @@ extern void MySleep(unsigned int msec);
|
|||||||
int DevOp::comReadRFID_data()
|
int DevOp::comReadRFID_data()
|
||||||
{
|
{
|
||||||
UCHAR Cmd[23] = { 0x01, 0x17, 0xA4, 0x20, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
UCHAR Cmd[23] = { 0x01, 0x17, 0xA4, 0x20, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||||
UCHAR revdata[100];
|
UCHAR revdata[100] = {0};
|
||||||
Cmd[1] = 0x08;
|
Cmd[1] = 0x08;
|
||||||
Cmd[2] = 0xA3;
|
Cmd[2] = 0xA3;
|
||||||
Cmd[4] = 0x06; //读块6
|
Cmd[4] = 0x06; //读块6
|
||||||
@@ -3682,8 +3690,8 @@ int DevOp::comReadRFID_data()
|
|||||||
RFIDReadData.clear();
|
RFIDReadData.clear();
|
||||||
LogInfo::setRunStatusText(tr("readB6com"));
|
LogInfo::setRunStatusText(tr("readB6com"));
|
||||||
}
|
}
|
||||||
memcpy(revdata, recResponse, n);
|
memcpy(revdata, recResponse.constData(), n);
|
||||||
if ((revdata[0] = 0x01) && ((revdata[1] == 8) || (revdata[1] == 22)) && (revdata[1] == n) && (revdata[2] == 0xA3) && (revdata[3] = 0x20))//判断是否为读数据块返回的数据包
|
if ((revdata[0] == 0x01) && ((revdata[1] == 8) || (revdata[1] == 22)) && (revdata[1] == n) && (revdata[2] == 0xA3) && (revdata[3] == 0x20))//判断是否为读数据块返回的数据包
|
||||||
{
|
{
|
||||||
LogInfo::setRunStatusText(tr("readB6suc"));
|
LogInfo::setRunStatusText(tr("readB6suc"));
|
||||||
bool status = CheckSumIn(revdata, revdata[1]); //计算校验和
|
bool status = CheckSumIn(revdata, revdata[1]); //计算校验和
|
||||||
@@ -3754,8 +3762,8 @@ int DevOp::comWriteRFID_data(int type)
|
|||||||
str.sprintf("%d - %d - %d", recResponse.at(0),recResponse.at(1),recResponse.at(2));
|
str.sprintf("%d - %d - %d", recResponse.at(0),recResponse.at(1),recResponse.at(2));
|
||||||
qDebug()<<"写数据到数据块6: "<<str;
|
qDebug()<<"写数据到数据块6: "<<str;
|
||||||
}
|
}
|
||||||
memcpy(revdata, recResponse, n);
|
memcpy(revdata, recResponse.constData(), n);
|
||||||
if ((revdata[0] = 0x01) && (revdata[1] == 8) && (revdata[1] == n) && (revdata[2] == 0x5B) && (revdata[3] = 0x20)) //判断是否为写数据返回的数据包
|
if ((revdata[0] == 0x01) && (revdata[1] == 8) && (revdata[1] == n) && (revdata[2] == 0x5B) && (revdata[3] == 0x20)) //判断是否为写数据返回的数据包
|
||||||
{
|
{
|
||||||
bool status = CheckSumIn(revdata, revdata[1]); //计算校验和
|
bool status = CheckSumIn(revdata, revdata[1]); //计算校验和
|
||||||
if (status)
|
if (status)
|
||||||
@@ -3780,7 +3788,7 @@ int DevOp::comWriteRFID_data(int type)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
int DevOp::comWriteRFID_data()
|
int DevOp::RFIDmarkCardUsedAsync()
|
||||||
{
|
{
|
||||||
UCHAR Cmd[23] = { 0x01, 0x17, 0xA4, 0x20, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
UCHAR Cmd[23] = { 0x01, 0x17, 0xA4, 0x20, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||||
UCHAR revdata[100];
|
UCHAR revdata[100];
|
||||||
@@ -3821,8 +3829,8 @@ int DevOp::comWriteRFID_data()
|
|||||||
str.sprintf("%d - %d - %d", recResponse.at(0),recResponse.at(1),recResponse.at(2));
|
str.sprintf("%d - %d - %d", recResponse.at(0),recResponse.at(1),recResponse.at(2));
|
||||||
qDebug()<<"写数据到数据块6: "<<str;
|
qDebug()<<"写数据到数据块6: "<<str;
|
||||||
}
|
}
|
||||||
memcpy(revdata, recResponse, n);
|
memcpy(revdata, recResponse.constData(), n);
|
||||||
if ((revdata[0] = 0x01) && (revdata[1] == 8) && (revdata[1] == n) && (revdata[2] == 0x5B) && (revdata[3] = 0x20)) //判断是否为写数据返回的数据包
|
if ((revdata[0] == 0x01) && (revdata[1] == 8) && (revdata[1] == n) && (revdata[2] == 0x5B) && (revdata[3] == 0x20)) //判断是否为写数据返回的数据包
|
||||||
{
|
{
|
||||||
bool status = CheckSumIn(revdata, revdata[1]); //计算校验和
|
bool status = CheckSumIn(revdata, revdata[1]); //计算校验和
|
||||||
if (status)
|
if (status)
|
||||||
@@ -3840,7 +3848,7 @@ int DevOp::comWriteRFID_data()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qDebug() << "写数据到数据块6" << "失败2!" << endl << endl;
|
qDebug() << "写数据到数据块6" << "失败2!" << endl << endl;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -3848,7 +3856,7 @@ int DevOp::comWriteRFID_data()
|
|||||||
|
|
||||||
int DevOp::setRFIDCarKey(void)
|
int DevOp::setRFIDCarKey(void)
|
||||||
{
|
{
|
||||||
UCHAR revdata[100];
|
UCHAR revdata[100] = {0};
|
||||||
UCHAR Cmd[8] ;
|
UCHAR Cmd[8] ;
|
||||||
Cmd[0] = 0x01; //命令格式请核对协议手册充值章节
|
Cmd[0] = 0x01; //命令格式请核对协议手册充值章节
|
||||||
Cmd[1] = 0x08;
|
Cmd[1] = 0x08;
|
||||||
@@ -3882,7 +3890,8 @@ int DevOp::setRFIDCarKey(void)
|
|||||||
str.sprintf("%d - %d - %d", recResponse.at(0),recResponse.at(1),recResponse.at(2));
|
str.sprintf("%d - %d - %d", recResponse.at(0),recResponse.at(1),recResponse.at(2));
|
||||||
qDebug()<<"加密IC卡: "<<str;
|
qDebug()<<"加密IC卡: "<<str;
|
||||||
}
|
}
|
||||||
memcpy(revdata, recResponse, n);
|
if(n > (int)sizeof(revdata)) n = sizeof(revdata);
|
||||||
|
memcpy(revdata, recResponse.constData(), n);
|
||||||
if ((revdata[0] == 0x01) &&( revdata[1] == 8 )&& (revdata[1] == n) && (revdata[2] == 0xA5) && (revdata[3] == 0x20)) //判断是否为设置地址返回的数据包
|
if ((revdata[0] == 0x01) &&( revdata[1] == 8 )&& (revdata[1] == n) && (revdata[2] == 0xA5) && (revdata[3] == 0x20)) //判断是否为设置地址返回的数据包
|
||||||
{
|
{
|
||||||
bool status = CheckSumIn(revdata, revdata[1]); //计算校验和
|
bool status = CheckSumIn(revdata, revdata[1]); //计算校验和
|
||||||
@@ -3906,7 +3915,7 @@ int DevOp::setRFIDCarKey(void)
|
|||||||
|
|
||||||
int DevOp::setRFIDReaderKey(int mac,int type)
|
int DevOp::setRFIDReaderKey(int mac,int type)
|
||||||
{
|
{
|
||||||
if(mac == 0) mac = 100;
|
if(mac == 0) mac = 100;
|
||||||
QString strMac1 = QString::number(mac).mid(0,3);
|
QString strMac1 = QString::number(mac).mid(0,3);
|
||||||
strMac1 = "Vernon" + strMac1 + "Bach";
|
strMac1 = "Vernon" + strMac1 + "Bach";
|
||||||
strMac1 = strMac1.leftJustified(16,'6');
|
strMac1 = strMac1.leftJustified(16,'6');
|
||||||
@@ -3985,7 +3994,8 @@ int DevOp::setRFIDReaderKey(int mac,int type)
|
|||||||
str.sprintf("%d - %d - %d", recResponse.at(0),recResponse.at(1),recResponse.at(2));
|
str.sprintf("%d - %d - %d", recResponse.at(0),recResponse.at(1),recResponse.at(2));
|
||||||
qDebug()<<"设置读写器密码: "<<str;
|
qDebug()<<"设置读写器密码: "<<str;
|
||||||
}
|
}
|
||||||
memcpy(revdata, recResponse, n);
|
if(n > (int)sizeof(revdata)) n = sizeof(revdata);
|
||||||
|
memcpy(revdata, recResponse.constData(), n);
|
||||||
if ((revdata[0] == 0x03) &&( revdata[1] == 8 )&& (revdata[1] == n) && (revdata[2] == 0xC3) && (revdata[3] == 0x20)) //判断是否为设置地址返回的数据包
|
if ((revdata[0] == 0x03) &&( revdata[1] == 8 )&& (revdata[1] == n) && (revdata[2] == 0xC3) && (revdata[3] == 0x20)) //判断是否为设置地址返回的数据包
|
||||||
{
|
{
|
||||||
bool status = CheckSumIn(revdata, revdata[1]); //计算校验和
|
bool status = CheckSumIn(revdata, revdata[1]); //计算校验和
|
||||||
@@ -4010,7 +4020,7 @@ int DevOp::setRFIDReaderKey(int mac,int type)
|
|||||||
|
|
||||||
int DevOp::setRFIDReaderOriginalKey(void)
|
int DevOp::setRFIDReaderOriginalKey(void)
|
||||||
{
|
{
|
||||||
UCHAR revdata[100];
|
UCHAR revdata[100] = {0};
|
||||||
UCHAR Cmd[11] ;
|
UCHAR Cmd[11] ;
|
||||||
Cmd[0] = 0x03; //命令格式请核对协议手册充值章节
|
Cmd[0] = 0x03; //命令格式请核对协议手册充值章节
|
||||||
Cmd[1] = 0x0B;
|
Cmd[1] = 0x0B;
|
||||||
@@ -4047,7 +4057,8 @@ int DevOp::setRFIDReaderOriginalKey(void)
|
|||||||
str.sprintf("%d - %d - %d", recResponse.at(0),recResponse.at(1),recResponse.at(2));
|
str.sprintf("%d - %d - %d", recResponse.at(0),recResponse.at(1),recResponse.at(2));
|
||||||
qDebug()<<"设置读写器原始密码: "<<str;
|
qDebug()<<"设置读写器原始密码: "<<str;
|
||||||
}
|
}
|
||||||
memcpy(revdata, recResponse, n);
|
if(n > (int)sizeof(revdata)) n = sizeof(revdata);
|
||||||
|
memcpy(revdata, recResponse.constData(), n);
|
||||||
if ((revdata[0] == 0x03) &&( revdata[1] == 8 )&& (revdata[1] == n) && (revdata[2] == 0xC4) && (revdata[3] == 0x20)) //判断是否为设置地址返回的数据包
|
if ((revdata[0] == 0x03) &&( revdata[1] == 8 )&& (revdata[1] == n) && (revdata[2] == 0xC4) && (revdata[3] == 0x20)) //判断是否为设置地址返回的数据包
|
||||||
{
|
{
|
||||||
bool status = CheckSumIn(revdata, revdata[1]); //计算校验和
|
bool status = CheckSumIn(revdata, revdata[1]); //计算校验和
|
||||||
@@ -4071,13 +4082,13 @@ int DevOp::setRFIDReaderOriginalKey(void)
|
|||||||
|
|
||||||
int DevOp::setRFIDReaderWorkMode(void)
|
int DevOp::setRFIDReaderWorkMode(void)
|
||||||
{
|
{
|
||||||
UCHAR revdata[100];
|
UCHAR revdata[100] = {0};
|
||||||
UCHAR Cmd[8] ;
|
UCHAR Cmd[8] ;
|
||||||
Cmd[0] = 0x03; //命令格式请核对协议手册充值章节
|
Cmd[0] = 0x03; //命令格式请核对协议手册充值章节
|
||||||
Cmd[1] = 0x08;
|
Cmd[1] = 0x08; // 包长度
|
||||||
Cmd[2] = 0xC1; //设置工作模式
|
Cmd[2] = 0xC1; //设置工作模式
|
||||||
Cmd[3] = 0x20;
|
Cmd[3] = 0x20; // 地址,固定0x20
|
||||||
Cmd[4] = 0x03;
|
Cmd[4] = 0x03; // 自动读块数据
|
||||||
Cmd[5] = 0x06; //读块6
|
Cmd[5] = 0x06; //读块6
|
||||||
Cmd[6] = 0x00; //主动发送数据
|
Cmd[6] = 0x00; //主动发送数据
|
||||||
Cmd[7] = 0x00;
|
Cmd[7] = 0x00;
|
||||||
@@ -4096,7 +4107,7 @@ int DevOp::setRFIDReaderWorkMode(void)
|
|||||||
qDebug()<<"read uart for RFID not open!";
|
qDebug()<<"read uart for RFID not open!";
|
||||||
}
|
}
|
||||||
//sleep(200); // 延时200毫秒等待读写器返回数据,延时太小可能无法接收完整的数据包
|
//sleep(200); // 延时200毫秒等待读写器返回数据,延时太小可能无法接收完整的数据包
|
||||||
MySleep(200);
|
MySleep(500);
|
||||||
int n = RFIDReadData.size();
|
int n = RFIDReadData.size();
|
||||||
if(n>0)
|
if(n>0)
|
||||||
{
|
{
|
||||||
@@ -4106,7 +4117,8 @@ int DevOp::setRFIDReaderWorkMode(void)
|
|||||||
str.sprintf("%d - %d - %d", recResponse.at(0),recResponse.at(1),recResponse.at(2));
|
str.sprintf("%d - %d - %d", recResponse.at(0),recResponse.at(1),recResponse.at(2));
|
||||||
qDebug()<<"设置读写器工作模式: "<<str;
|
qDebug()<<"设置读写器工作模式: "<<str;
|
||||||
}
|
}
|
||||||
memcpy(revdata, recResponse, n);
|
if(n > (int)sizeof(revdata)) n = sizeof(revdata);
|
||||||
|
memcpy(revdata, recResponse.constData(), n);
|
||||||
if ((revdata[0] == 0x03) &&( revdata[1] == 8 )&& (revdata[1] == n) && (revdata[2] == 0xC1) && (revdata[3] == 0x20)) //判断是否为设置地址返回的数据包
|
if ((revdata[0] == 0x03) &&( revdata[1] == 8 )&& (revdata[1] == n) && (revdata[2] == 0xC1) && (revdata[3] == 0x20)) //判断是否为设置地址返回的数据包
|
||||||
{
|
{
|
||||||
bool status = CheckSumIn(revdata, revdata[1]); //计算校验和
|
bool status = CheckSumIn(revdata, revdata[1]); //计算校验和
|
||||||
@@ -4120,18 +4132,20 @@ int DevOp::setRFIDReaderWorkMode(void)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
qDebug() << "设置读写器工作模式失败!" << endl << endl;
|
qDebug() << "设置读写器工作模式失败!" << endl << endl;
|
||||||
|
LogInfo::setRunStatusText("Failed to set RFID reader work mode!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qDebug() << "设置读写器工作模式失败!" << endl << endl;
|
qDebug() << "设置读写器工作模式失败!" << endl << endl;
|
||||||
|
LogInfo::setRunStatusText("Failed to set RFID reader work mode!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int DevOp::receiveReadRFID_data(void)
|
int DevOp::receiveReadRFID_data(void)
|
||||||
{
|
{
|
||||||
UCHAR revdata[100];
|
UCHAR revdata[100] = {0};
|
||||||
QByteArray recResponse;
|
QByteArray recResponse;
|
||||||
int n = RFIDReadData.size();
|
int n = RFIDReadData.size();
|
||||||
if(n>0)
|
if(n>0)
|
||||||
@@ -4140,25 +4154,31 @@ int DevOp::receiveReadRFID_data(void)
|
|||||||
RFIDReadData.clear();
|
RFIDReadData.clear();
|
||||||
showData(recResponse);
|
showData(recResponse);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
|
|
||||||
memcpy(revdata, recResponse, n);
|
|
||||||
|
|
||||||
if ((revdata[0] = 0x04) && ((revdata[1] == 8) || (revdata[1] == 22)) && (revdata[1] == n) && (revdata[2] == 0x03) && (revdata[3] = 0x20))//判断是否为读数据块返回的数据包
|
if(n > (int)sizeof(revdata)) // 防止越界
|
||||||
|
n = sizeof(revdata);
|
||||||
|
|
||||||
|
memcpy(revdata, recResponse.constData(), n);
|
||||||
|
|
||||||
|
if ((revdata[0] == 0x04) && ((revdata[1] == 8) || (revdata[1] == 22)) && (revdata[1] == n) && (revdata[2] == 0x03) && (revdata[3] == 0x20))//判断是否为读数据块返回的数据包
|
||||||
{
|
{
|
||||||
bool status = CheckSumIn(revdata, revdata[1]); //计算校验和
|
bool status = CheckSumIn(revdata, revdata[1]); //计算校验和
|
||||||
if (status)
|
if (status)
|
||||||
{
|
{
|
||||||
if (revdata[4] == 0x00) //读数据块成功
|
if (revdata[4] == 0x00) //读数据块成功
|
||||||
{
|
{
|
||||||
UCHAR blockdata[16];
|
UCHAR blockdata[16] = {0};
|
||||||
UCHAR temp[33];
|
UCHAR temp[33] = {0};
|
||||||
for (int i = 0; i < 16; i++)
|
for (int i = 0; i < 16; i++)
|
||||||
{
|
{
|
||||||
blockdata[i] = revdata[5 + i]; //复制数据到数组
|
blockdata[i] = revdata[5 + i]; //复制数据到数组
|
||||||
}
|
}
|
||||||
Hex2Str(&blockdata[0], &temp[0], 16); // 数据块数据转换为字符
|
Hex2Str(&blockdata[0], &temp[0], 16); // 数据块数据转换为字符
|
||||||
strRevdata = QString((const char*)temp);
|
strRevdata = QString((const char*)temp);
|
||||||
qDebug() << "读数据块成功,数据块6" << "数据为:" << strRevdata << endl << endl;
|
qDebug() << "读数据块成功, 数据块6" << "数据为:" << strRevdata << endl << endl;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -4196,8 +4216,9 @@ int DevOp::queryReadRFID_address(void)
|
|||||||
}
|
}
|
||||||
MySleep(100);
|
MySleep(100);
|
||||||
int n = RFIDReadData.size();
|
int n = RFIDReadData.size();
|
||||||
UCHAR revdata[100];
|
UCHAR revdata[100] = {0};
|
||||||
memcpy(revdata, RFIDReadData, n);
|
if(n > (int)sizeof(revdata)) n = sizeof(revdata);
|
||||||
|
memcpy(revdata, RFIDReadData.constData(), n);
|
||||||
if(n>0)
|
if(n>0)
|
||||||
{
|
{
|
||||||
showData(RFIDReadData);
|
showData(RFIDReadData);
|
||||||
|
|||||||
@@ -223,7 +223,12 @@ public :
|
|||||||
void comForRFID_init();
|
void comForRFID_init();
|
||||||
int comReadRFID_data();
|
int comReadRFID_data();
|
||||||
// int comWriteRFID_data(int type);
|
// int comWriteRFID_data(int type);
|
||||||
int comWriteRFID_data();
|
|
||||||
|
/**
|
||||||
|
* @brief 向卡片写入当前日期时间,标识该卡片已被使用
|
||||||
|
* @param done 异步回调函数,用于处理写入完成后的操作,参数为写入结果,0表示成功,-1表示卡片已经离开
|
||||||
|
*/
|
||||||
|
void RFIDmarkCardUsedAsync(std::function<void(int)> done);
|
||||||
int setRFIDCarKey(void);
|
int setRFIDCarKey(void);
|
||||||
int setRFIDReaderKey(int,int);
|
int setRFIDReaderKey(int,int);
|
||||||
int setRFIDReaderOriginalKey(void);
|
int setRFIDReaderOriginalKey(void);
|
||||||
|
|||||||
@@ -6,9 +6,36 @@ DlgRFIDConfig::DlgRFIDConfig(QWidget *parent) :
|
|||||||
ui(new Ui::DlgRFIDConfig)
|
ui(new Ui::DlgRFIDConfig)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
setWindowFlags(windowFlags() | Qt::Tool | Qt::FramelessWindowHint);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DlgRFIDConfig::~DlgRFIDConfig()
|
DlgRFIDConfig::~DlgRFIDConfig()
|
||||||
{
|
{
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DlgRFIDConfig::setAutoConfirmTimeout(int seconds)
|
||||||
|
{
|
||||||
|
if(seconds == m_autoConfirmTimeout || seconds < 0 || seconds > ui->spinBox->maximum()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_autoConfirmTimeout = seconds;
|
||||||
|
ui->spinBox->setValue(seconds);
|
||||||
|
}
|
||||||
|
|
||||||
|
int DlgRFIDConfig::autoConfirmTimeout()
|
||||||
|
{
|
||||||
|
m_autoConfirmTimeout = ui->spinBox->value();
|
||||||
|
return m_autoConfirmTimeout;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DlgRFIDConfig::onExpirySpinBoxChanged(int val)
|
||||||
|
{
|
||||||
|
if(val == 0) {
|
||||||
|
ui->labExplain->setText(tr(u8"卡片接触后需要手动确认。"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
ui->labExplain->setText(tr(u8"卡片接触 %1 秒后自动激活。").arg(val));
|
||||||
|
}
|
||||||
|
|||||||
@@ -15,8 +15,20 @@ public:
|
|||||||
explicit DlgRFIDConfig(QWidget *parent = nullptr);
|
explicit DlgRFIDConfig(QWidget *parent = nullptr);
|
||||||
~DlgRFIDConfig();
|
~DlgRFIDConfig();
|
||||||
|
|
||||||
|
void setAutoConfirmTimeout(int seconds);
|
||||||
|
|
||||||
|
int autoConfirmTimeout();
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void onExpirySpinBoxChanged(int val);
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void autoConfirmTimeoutChanged();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::DlgRFIDConfig *ui;
|
Ui::DlgRFIDConfig *ui;
|
||||||
|
|
||||||
|
int m_autoConfirmTimeout;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DLGRFIDCONFIG_H
|
#endif // DLGRFIDCONFIG_H
|
||||||
|
|||||||
+138
-3
@@ -1,3 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>DlgRFIDConfig</class>
|
<class>DlgRFIDConfig</class>
|
||||||
<widget class="QDialog" name="DlgRFIDConfig">
|
<widget class="QDialog" name="DlgRFIDConfig">
|
||||||
@@ -5,14 +6,148 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>400</width>
|
<width>340</width>
|
||||||
<height>300</height>
|
<height>222</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Dialog</string>
|
<string>Dialog</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QWidget{
|
||||||
|
font-size: 16px;
|
||||||
|
}</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QPushButton" name="btnOk">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>230</x>
|
||||||
|
<y>170</y>
|
||||||
|
<width>81</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>确定</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QSpinBox" name="spinBox">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>40</x>
|
||||||
|
<y>60</y>
|
||||||
|
<width>81</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="buttonSymbols">
|
||||||
|
<enum>QAbstractSpinBox::NoButtons</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>40</x>
|
||||||
|
<y>30</y>
|
||||||
|
<width>221</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>自动激活超时</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>130</x>
|
||||||
|
<y>60</y>
|
||||||
|
<width>41</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>秒</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="labExplain">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>40</x>
|
||||||
|
<y>100</y>
|
||||||
|
<width>271</width>
|
||||||
|
<height>61</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>卡片接触 %1 秒后自动激活。</string>
|
||||||
|
</property>
|
||||||
|
<property name="textFormat">
|
||||||
|
<enum>Qt::AutoText</enum>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>btnOk</sender>
|
||||||
|
<signal>clicked()</signal>
|
||||||
|
<receiver>DlgRFIDConfig</receiver>
|
||||||
|
<slot>accept()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>414</x>
|
||||||
|
<y>181</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>340</x>
|
||||||
|
<y>221</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>btnOk</sender>
|
||||||
|
<signal>clicked()</signal>
|
||||||
|
<receiver>DlgRFIDConfig</receiver>
|
||||||
|
<slot>hide()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>396</x>
|
||||||
|
<y>184</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>301</x>
|
||||||
|
<y>221</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>spinBox</sender>
|
||||||
|
<signal>valueChanged(int)</signal>
|
||||||
|
<receiver>DlgRFIDConfig</receiver>
|
||||||
|
<slot>onExpirySpinBoxChanged(int)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>78</x>
|
||||||
|
<y>81</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>-81</x>
|
||||||
|
<y>81</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
|
<slots>
|
||||||
|
<slot>onExpirySpinBoxChanged(int)</slot>
|
||||||
|
</slots>
|
||||||
</ui>
|
</ui>
|
||||||
|
|||||||
+11
-7
@@ -29,7 +29,7 @@ InkJetPrinter::InkJetPrinter(QWidget* parent)
|
|||||||
init();
|
init();
|
||||||
|
|
||||||
QThread::sleep(3);
|
QThread::sleep(3);
|
||||||
qApp->installEventFilter(this);
|
// qApp->installEventFilter(this);
|
||||||
|
|
||||||
QString ARM_Version;
|
QString ARM_Version;
|
||||||
ARM_Version.sprintf("%d.%d.%02d%s%s", UP_PRINTER_MAJOR_VER, UP_PRINTER_MINOR_VER,UP_PRINTER_RIVISION_VER,SUB_VERSION,SUB_RFID);
|
ARM_Version.sprintf("%d.%d.%02d%s%s", UP_PRINTER_MAJOR_VER, UP_PRINTER_MINOR_VER,UP_PRINTER_RIVISION_VER,SUB_VERSION,SUB_RFID);
|
||||||
@@ -980,10 +980,14 @@ void InkJetPrinter::timerHandler(void){
|
|||||||
qDebug()<<"初始化刷卡模块";
|
qDebug()<<"初始化刷卡模块";
|
||||||
flag6 = false;
|
flag6 = false;
|
||||||
sysPara->devOp->setICReaderModeFlag = true;
|
sysPara->devOp->setICReaderModeFlag = true;
|
||||||
sysPara->devOp->setRFIDReaderWorkMode();
|
|
||||||
|
// 使用RFID读写器软件设置,而不是这里
|
||||||
|
// sysPara->devOp->setRFIDReaderWorkMode();
|
||||||
qDebug()<<"jd.addr: "<<m_MainInstruction->dlgInputAddr->jd.addr;
|
qDebug()<<"jd.addr: "<<m_MainInstruction->dlgInputAddr->jd.addr;
|
||||||
LogInfo::setRunStatusText(QString("jd.addr:%1").arg(m_MainInstruction->dlgInputAddr->jd.addr));
|
LogInfo::setRunStatusText(QString("jd.addr:%1").arg(m_MainInstruction->dlgInputAddr->jd.addr));
|
||||||
sysPara->devOp->setRFIDReaderKey(m_MainInstruction->dlgInputAddr->jd.addr,1);
|
|
||||||
|
// 使用RFID读写器软件设置,而不是这里
|
||||||
|
// sysPara->devOp->setRFIDReaderKey(m_MainInstruction->dlgInputAddr->jd.addr,1);
|
||||||
sysPara->devOp->setICReaderModeFlag = false;
|
sysPara->devOp->setICReaderModeFlag = false;
|
||||||
}
|
}
|
||||||
if(pulse_300ms){
|
if(pulse_300ms){
|
||||||
@@ -991,7 +995,7 @@ void InkJetPrinter::timerHandler(void){
|
|||||||
{
|
{
|
||||||
sysPara->devOp->strRevdata ="";
|
sysPara->devOp->strRevdata ="";
|
||||||
sysPara->devOp->receiveReadRFID_data();
|
sysPara->devOp->receiveReadRFID_data();
|
||||||
if(sysPara->devOp->strRevdata.length() > 1)
|
if(sysPara->devOp->strRevdata.length() > 3)
|
||||||
{
|
{
|
||||||
if((sysPara->devOp->strRevdata.left(3) == QString::number(m_MainInstruction->dlgInputAddr->jd.addr).left(3))\
|
if((sysPara->devOp->strRevdata.left(3) == QString::number(m_MainInstruction->dlgInputAddr->jd.addr).left(3))\
|
||||||
|| sysPara->devOp->strRevdata.left(3) == "100")
|
|| sysPara->devOp->strRevdata.left(3) == "100")
|
||||||
@@ -1019,7 +1023,7 @@ void InkJetPrinter::timerHandler(void){
|
|||||||
{
|
{
|
||||||
if(sysPara->para.rfidCountDown>0)
|
if(sysPara->para.rfidCountDown>0)
|
||||||
delayWithEventLoop(); //xx秒的倒计时
|
delayWithEventLoop(); //xx秒的倒计时
|
||||||
if(sysPara->devOp->comWriteRFID_data() == 1){//把卡数据清零
|
if(sysPara->devOp->RFIDmarkCardUsedAsync() == 1){//把卡数据清零
|
||||||
sysPara->RFIDPara.needInkCard = false;
|
sysPara->RFIDPara.needInkCard = false;
|
||||||
sysPara->RFIDPara.inkCardTimeOut = false;
|
sysPara->RFIDPara.inkCardTimeOut = false;
|
||||||
sysPara->saveRFIDPara();
|
sysPara->saveRFIDPara();
|
||||||
@@ -1060,7 +1064,7 @@ void InkJetPrinter::timerHandler(void){
|
|||||||
if(sysPara->para.rfidCountDown>0)
|
if(sysPara->para.rfidCountDown>0)
|
||||||
delayWithEventLoop();
|
delayWithEventLoop();
|
||||||
//弹出一个xx秒的倒计时,再执行以下代码
|
//弹出一个xx秒的倒计时,再执行以下代码
|
||||||
if(sysPara->devOp->comWriteRFID_data() == 1){//把卡数据清零
|
if(sysPara->devOp->RFIDmarkCardUsedAsync() == 1){//把卡数据清零
|
||||||
sysPara->RFIDPara.needSolventCard = false;
|
sysPara->RFIDPara.needSolventCard = false;
|
||||||
sysPara->RFIDPara.solventCardTimeOut = false;
|
sysPara->RFIDPara.solventCardTimeOut = false;
|
||||||
sysPara->saveRFIDPara();
|
sysPara->saveRFIDPara();
|
||||||
@@ -1087,7 +1091,7 @@ void InkJetPrinter::timerHandler(void){
|
|||||||
if(sysPara->para.rfidCountDown>0)
|
if(sysPara->para.rfidCountDown>0)
|
||||||
delayWithEventLoop(); //xx秒的倒计时
|
delayWithEventLoop(); //xx秒的倒计时
|
||||||
emit maintenanceShow();
|
emit maintenanceShow();
|
||||||
if(sysPara->devOp->comWriteRFID_data() == 1)//把卡数据清零
|
if(sysPara->devOp->RFIDmarkCardUsedAsync() == 1)//把卡数据清零
|
||||||
{
|
{
|
||||||
sysPara->RFIDPara.needMaintenance = false;
|
sysPara->RFIDPara.needMaintenance = false;
|
||||||
sysPara->status.needMaintenanceRemind = false;
|
sysPara->status.needMaintenanceRemind = false;
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
#include "ui_MainInstruction.h"
|
#include "ui_MainInstruction.h"
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
#include "DlgRFIDConfig.h"
|
||||||
|
|
||||||
MainInstruction::MainInstruction(QWidget *parent) :
|
MainInstruction::MainInstruction(QWidget *parent) :
|
||||||
QWidget(parent),
|
QWidget(parent),
|
||||||
@@ -17,10 +18,14 @@ MainInstruction::MainInstruction(QWidget *parent) :
|
|||||||
connect(ui->sysSetBtn, &QPushButton::clicked, this, std::bind(&MainInstruction::onSpecialButtonClicked, this, 3));
|
connect(ui->sysSetBtn, &QPushButton::clicked, this, std::bind(&MainInstruction::onSpecialButtonClicked, this, 3));
|
||||||
connect(ui->otherSetBtn, &QPushButton::clicked, this, std::bind(&MainInstruction::onSpecialButtonClicked, this, 4));
|
connect(ui->otherSetBtn, &QPushButton::clicked, this, std::bind(&MainInstruction::onSpecialButtonClicked, this, 4));
|
||||||
connect(ui->sysUpdateBtn,&QPushButton::clicked, this, std::bind(&MainInstruction::onSpecialButtonClicked, this, 5));
|
connect(ui->sysUpdateBtn,&QPushButton::clicked, this, std::bind(&MainInstruction::onSpecialButtonClicked, this, 5));
|
||||||
|
|
||||||
// 其他信号槽连接在ui文件中
|
// 其他信号槽连接在ui文件中
|
||||||
|
|
||||||
dlgInputAddr = new DlgInputAddr(parent);
|
dlgInputAddr = new DlgInputAddr(parent);
|
||||||
dialogAuthorization = new DialogAuthorization(parent);
|
dialogAuthorization = new DialogAuthorization(parent);
|
||||||
|
dlgRfidConfig = new DlgRFIDConfig(this);
|
||||||
|
|
||||||
|
connect(dlgRfidConfig, &DlgRFIDConfig::accepted, this, &MainInstruction::onRFIDAutoConfirmTimeoutChanged);
|
||||||
|
|
||||||
dlgInputAddr->GetAddr();
|
dlgInputAddr->GetAddr();
|
||||||
dlgInputAddr->vpnConnect();
|
dlgInputAddr->vpnConnect();
|
||||||
@@ -244,6 +249,19 @@ void MainInstruction::slt_timeSetting()
|
|||||||
sysPara->devOp->stm32Wr(0xA1,(unsigned char *)m_datatime,8);
|
sysPara->devOp->stm32Wr(0xA1,(unsigned char *)m_datatime,8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainInstruction::onRfidCfgBtnClicked()
|
||||||
|
{
|
||||||
|
dlgRfidConfig->setAutoConfirmTimeout(sysPara->para.rfidCountDown);
|
||||||
|
dlgRfidConfig->show();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainInstruction::onRFIDAutoConfirmTimeoutChanged()
|
||||||
|
{
|
||||||
|
sysPara->para.rfidCountDown = dlgRfidConfig->autoConfirmTimeout();
|
||||||
|
qInfo() << "RFID auto confirm timeout: " << sysPara->para.rfidCountDown;
|
||||||
|
sysPara->saveRFIDPara();
|
||||||
|
}
|
||||||
|
|
||||||
void MainInstruction::applyStyleSheet()
|
void MainInstruction::applyStyleSheet()
|
||||||
{
|
{
|
||||||
QString styleSheet =
|
QString styleSheet =
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
#include "LogInfo.h"
|
#include "LogInfo.h"
|
||||||
#include "TimeSettingDialog.h"
|
#include "TimeSettingDialog.h"
|
||||||
|
|
||||||
|
class DlgRFIDConfig;
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class MainInstruction;
|
class MainInstruction;
|
||||||
@@ -50,6 +51,11 @@ private slots:
|
|||||||
void on_btn_time_clicked();
|
void on_btn_time_clicked();
|
||||||
|
|
||||||
void slt_timeSetting();
|
void slt_timeSetting();
|
||||||
|
|
||||||
|
void onRfidCfgBtnClicked();
|
||||||
|
|
||||||
|
void onRFIDAutoConfirmTimeoutChanged();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
Ui::MainInstruction *ui;
|
Ui::MainInstruction *ui;
|
||||||
@@ -59,6 +65,7 @@ private:
|
|||||||
DialogAuthorization *dialogMaintenanceTimeSettingAuth;
|
DialogAuthorization *dialogMaintenanceTimeSettingAuth;
|
||||||
DialogMaintenanceTimeSetting *MTimeSetting;
|
DialogMaintenanceTimeSetting *MTimeSetting;
|
||||||
DialogAuthorization *dialogAuthorization;
|
DialogAuthorization *dialogAuthorization;
|
||||||
|
DlgRFIDConfig *dlgRfidConfig = nullptr;
|
||||||
|
|
||||||
// 时间设置
|
// 时间设置
|
||||||
TimeSettingDialog timeDia;
|
TimeSettingDialog timeDia;
|
||||||
|
|||||||
+64
-23
@@ -98,7 +98,7 @@
|
|||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tabExtra">
|
<widget class="QWidget" name="tabExtra">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
@@ -191,19 +191,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QPushButton" name="sysUpdateBtn">
|
|
||||||
<property name="text">
|
|
||||||
<string>系统更新</string>
|
|
||||||
</property>
|
|
||||||
<property name="fixedSize" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>220</width>
|
|
||||||
<height>60</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QPushButton" name="sysSetBtn">
|
<widget class="QPushButton" name="sysSetBtn">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -211,13 +198,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QPushButton" name="otherSetBtn">
|
|
||||||
<property name="text">
|
|
||||||
<string>其他设置</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QPushButton" name="sysMgtBtn">
|
<widget class="QPushButton" name="sysMgtBtn">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -238,8 +218,52 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QPushButton" name="sysUpdateBtn">
|
||||||
|
<property name="text">
|
||||||
|
<string>系统更新</string>
|
||||||
|
</property>
|
||||||
|
<property name="fixedSize" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>220</width>
|
||||||
|
<height>60</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QWidget" name="tab">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>额外设置</string>
|
||||||
|
</attribute>
|
||||||
|
<widget class="QPushButton" name="rfidCfgBtn">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>40</x>
|
||||||
|
<y>30</y>
|
||||||
|
<width>161</width>
|
||||||
|
<height>61</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>刷卡设置</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="otherSetBtn">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>40</x>
|
||||||
|
<y>120</y>
|
||||||
|
<width>161</width>
|
||||||
|
<height>61</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>其他设置</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QPushButton" name="closeBtn">
|
<widget class="QPushButton" name="closeBtn">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
@@ -276,8 +300,8 @@
|
|||||||
<slot>onGraphicsEditBtnClicked()</slot>
|
<slot>onGraphicsEditBtnClicked()</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel">
|
<hint type="sourcelabel">
|
||||||
<x>207</x>
|
<x>230</x>
|
||||||
<y>246</y>
|
<y>196</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel">
|
<hint type="destinationlabel">
|
||||||
<x>-154</x>
|
<x>-154</x>
|
||||||
@@ -285,8 +309,25 @@
|
|||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>rfidCfgBtn</sender>
|
||||||
|
<signal>clicked()</signal>
|
||||||
|
<receiver>MainInstruction</receiver>
|
||||||
|
<slot>onRfidCfgBtnClicked()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>137</x>
|
||||||
|
<y>94</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>-182</x>
|
||||||
|
<y>93</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
</connections>
|
</connections>
|
||||||
<slots>
|
<slots>
|
||||||
<slot>onGraphicsEditBtnClicked()</slot>
|
<slot>onGraphicsEditBtnClicked()</slot>
|
||||||
|
<slot>onRfidCfgBtnClicked()</slot>
|
||||||
</slots>
|
</slots>
|
||||||
</ui>
|
</ui>
|
||||||
|
|||||||
+509
-494
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -274,7 +274,7 @@ QString Public::ReadLanguageName()
|
|||||||
QString Public::ReadKeyBoardUse()
|
QString Public::ReadKeyBoardUse()
|
||||||
{
|
{
|
||||||
QFile file1("/home/plg/UseKBD");
|
QFile file1("/home/plg/UseKBD");
|
||||||
QString language="Chinese";
|
QString language="MultiLanguage";
|
||||||
|
|
||||||
char buf[256];
|
char buf[256];
|
||||||
|
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ HEADERS += Public.h \
|
|||||||
CounterVarSet.h \
|
CounterVarSet.h \
|
||||||
SystemUpdate.h \
|
SystemUpdate.h \
|
||||||
dialogmaintenancetimesetting.h \
|
dialogmaintenancetimesetting.h \
|
||||||
|
DlgRFIDConfig.h \
|
||||||
selectcodedlg.h \
|
selectcodedlg.h \
|
||||||
BarCode/barcode.h \
|
BarCode/barcode.h \
|
||||||
QBarCode.h \
|
QBarCode.h \
|
||||||
@@ -200,6 +201,7 @@ FORMS += \
|
|||||||
countervarset.ui \
|
countervarset.ui \
|
||||||
SystemUpdate.ui \
|
SystemUpdate.ui \
|
||||||
dialogmaintenancetimesetting.ui \
|
dialogmaintenancetimesetting.ui \
|
||||||
|
DlgRFIDConfig.ui \
|
||||||
selectcodedlg.ui \
|
selectcodedlg.ui \
|
||||||
QBarCode.ui \
|
QBarCode.ui \
|
||||||
setnumdlg.ui \
|
setnumdlg.ui \
|
||||||
@@ -283,6 +285,7 @@ SOURCES +=\
|
|||||||
scene/PicDateItem.cpp \
|
scene/PicDateItem.cpp \
|
||||||
SystemUpdate.cpp \
|
SystemUpdate.cpp \
|
||||||
dialogmaintenancetimesetting.cpp \
|
dialogmaintenancetimesetting.cpp \
|
||||||
|
DlgRFIDConfig.cpp \
|
||||||
selectcodedlg.cpp \
|
selectcodedlg.cpp \
|
||||||
QBarCode.cpp \
|
QBarCode.cpp \
|
||||||
BarCode/ps.c \
|
BarCode/ps.c \
|
||||||
|
|||||||
@@ -1015,6 +1015,7 @@ void SysPara::saveRFIDPara()
|
|||||||
out << RFIDPara.maintenanceInterval;
|
out << RFIDPara.maintenanceInterval;
|
||||||
out << RFIDPara.maintenanceEndDate;
|
out << RFIDPara.maintenanceEndDate;
|
||||||
out << RFIDPara.needMaintenance;
|
out << RFIDPara.needMaintenance;
|
||||||
|
out << para.rfidCountDown;
|
||||||
|
|
||||||
if(!file.flush()){
|
if(!file.flush()){
|
||||||
LogInfo::setRunStatusText("RFID Para save Failed 1");
|
LogInfo::setRunStatusText("RFID Para save Failed 1");
|
||||||
@@ -1054,6 +1055,7 @@ bool SysPara::loadRFIDPara()
|
|||||||
in >> RFIDPara.maintenanceInterval;
|
in >> RFIDPara.maintenanceInterval;
|
||||||
in >> RFIDPara.maintenanceEndDate;
|
in >> RFIDPara.maintenanceEndDate;
|
||||||
in >> RFIDPara.needMaintenance;
|
in >> RFIDPara.needMaintenance;
|
||||||
|
in >> para.rfidCountDown;
|
||||||
|
|
||||||
file.close();
|
file.close();
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user