更新无磁钢版RFID设备支持

This commit is contained in:
Mr.V 2024-03-06 14:13:50 +08:00
parent bf25b17221
commit 7a0d3e0fb4
4 changed files with 5 additions and 2 deletions

View File

@ -2,6 +2,7 @@
com_name=COM2
baud=19200
track_name=2
have_magnet_steel=true
magnet_steel_order=8421
up_result=true

View File

@ -23,6 +23,7 @@ bool ConfigUtil::readBaseConfig(const QString &configFile, QString &errorMessage
config.comName = mset->value("com_name", "").toString();
config.baud = mset->value("baud", 19200).toInt();
config.trackName = mset->value("track_name", 1).toInt();
config.havaMagnetSteel = mset->value("have_magnet_steel", false).toBool();
config.magnetSteelOrder = mset->value("magnet_steel_order", "").toString();
config.upResult = mset->value("up_result", false).toBool();

View File

@ -15,6 +15,8 @@ namespace ai_matrix {
int baud;
// 股道编号
int trackName;
// 是否有磁钢
bool havaMagnetSteel;
// 磁钢顺序
QString magnetSteelOrder;
// 上传识别结果标志

View File

@ -676,13 +676,12 @@ void MainWindow::getQueueDataThread()
}
}
}
// logInfo(strRfidInfo);
}
void MainWindow::upRfid()
{
if (!this->baseConfig_.upResult) return;
if (!this->needIdentify)
if (!this->needIdentify && this->baseConfig_.havaMagnetSteel)
{
QIcon icon("./Fail.ico");
QPixmap m_pic = icon.pixmap(icon.actualSize(QSize(32, 32)));//size自行调整