Compare commits

..

No commits in common. "a972e9283a2a9dbe3e45fc85edef492c6bb6c116" and "8ba035a321c34c86567d3dd082466aa99b1442bc" have entirely different histories.

7 changed files with 68 additions and 226 deletions

View File

@ -53,7 +53,7 @@ Dialog_InputSerialNum::Dialog_InputSerialNum(class MainWindow *mainWnd, const QS
ui->pbtn_enterTest->setEnabled(false);
ui->label_scanner->setText(tr("Device name: %1").arg(m_devName));
//ui->lineEdit_sn->setValidator(new QRegExpValidator(QRegExp("[a-zA-Z0-9]+$")));
ui->lineEdit_sn->setValidator(new QRegExpValidator(QRegExp("[a-zA-Z0-9]+$")));
ui->lineEdit_sn->setMaxLength(14);
if (handle != nullptr)

View File

@ -150,25 +150,8 @@ void Form_mainInterface::setDevDisconnect()
m_disconnect = true;
}
void Form_mainInterface::checkDynamicCorrectItem(bool pass, int correctType)
void Form_mainInterface::checkWrongCorrectItem(int correctType)
{
int type = correctType;
QString name = m_map_title_name.value(m_curItemName).name;
if (name == HGPDTTOOLDB_NAME_IMAGE_CORRECTION_RGB_200DPI)
type = 1;
else if (name == HGPDTTOOLDB_NAME_IMAGE_CORRECTION_GRAY_200DPI)
type = 2;
else if (name == HGPDTTOOLDB_NAME_IMAGE_CORRECTION_RGB_300DPI)
type = 3;
else if (name == HGPDTTOOLDB_NAME_IMAGE_CORRECTION_GRAY_300DPI)
type = 4;
else if (name == HGPDTTOOLDB_NAME_IMAGE_CORRECTION_RGB_600DPI)
type = 5;
else if (name == HGPDTTOOLDB_NAME_IMAGE_CORRECTION_GRAY_600DPI)
type = 6;
bool allPass = false;
int correctItemId = -1;
for (int i = 0; i < ui->tableWidget->rowCount(); i++)
{
QTableWidgetItem *item = ui->tableWidget->item(i, 1);
@ -177,57 +160,41 @@ void Form_mainInterface::checkDynamicCorrectItem(bool pass, int correctType)
QString title = item->text();
QString name = m_map_title_name.value(title).name;
if (HGPDTTOOLDB_NAME_IMAGE_CORRECTION == name)
{
correctItemId = i;
}
if (1 == type && HGPDTTOOLDB_NAME_IMAGE_CORRECTION_RGB_200DPI == name)
if (1 == correctType && HGPDTTOOLDB_NAME_IMAGE_CORRECTION_RGB_200DPI == name)
{
ui->tableWidget->item(i, 2)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
ui->tableWidget->item(i, 2)->setBackgroundColor(pass ? QColor(0,255,0) : QColor(255,0,0));
ui->tableWidget->item(i, 2)->setText(pass ? tr("pass") : tr("not pass"));
ui->tableWidget->item(i, 2)->setBackgroundColor(QColor(255,0,0));
ui->tableWidget->item(i, 2)->setText(tr("not pass"));
}
else if (2 == type && HGPDTTOOLDB_NAME_IMAGE_CORRECTION_GRAY_200DPI == name)
else if (2 == correctType && HGPDTTOOLDB_NAME_IMAGE_CORRECTION_GRAY_200DPI == name)
{
ui->tableWidget->item(i, 2)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
ui->tableWidget->item(i, 2)->setBackgroundColor(pass ? QColor(0,255,0) : QColor(255,0,0));
ui->tableWidget->item(i, 2)->setText(pass ? tr("pass") : tr("not pass"));
ui->tableWidget->item(i, 2)->setBackgroundColor(QColor(255,0,0));
ui->tableWidget->item(i, 2)->setText(tr("not pass"));
}
else if (3 == type && HGPDTTOOLDB_NAME_IMAGE_CORRECTION_RGB_300DPI == name)
else if (3 == correctType && HGPDTTOOLDB_NAME_IMAGE_CORRECTION_RGB_300DPI == name)
{
ui->tableWidget->item(i, 2)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
ui->tableWidget->item(i, 2)->setBackgroundColor(pass ? QColor(0,255,0) : QColor(255,0,0));
ui->tableWidget->item(i, 2)->setText(pass ? tr("pass") : tr("not pass"));
ui->tableWidget->item(i, 2)->setBackgroundColor(QColor(255,0,0));
ui->tableWidget->item(i, 2)->setText(tr("not pass"));
}
else if (4 == type && HGPDTTOOLDB_NAME_IMAGE_CORRECTION_GRAY_300DPI == name)
else if (4 == correctType && HGPDTTOOLDB_NAME_IMAGE_CORRECTION_GRAY_300DPI == name)
{
ui->tableWidget->item(i, 2)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
ui->tableWidget->item(i, 2)->setBackgroundColor(pass ? QColor(0,255,0) : QColor(255,0,0));
ui->tableWidget->item(i, 2)->setText(pass ? tr("pass") : tr("not pass"));
ui->tableWidget->item(i, 2)->setBackgroundColor(QColor(255,0,0));
ui->tableWidget->item(i, 2)->setText(tr("not pass"));
}
else if (5 == type && HGPDTTOOLDB_NAME_IMAGE_CORRECTION_RGB_600DPI == name)
else if (5 == correctType && HGPDTTOOLDB_NAME_IMAGE_CORRECTION_RGB_600DPI == name)
{
ui->tableWidget->item(i, 2)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
ui->tableWidget->item(i, 2)->setBackgroundColor(pass ? QColor(0,255,0) : QColor(255,0,0));
ui->tableWidget->item(i, 2)->setText(pass ? tr("pass") : tr("not pass"));
ui->tableWidget->item(i, 2)->setBackgroundColor(QColor(255,0,0));
ui->tableWidget->item(i, 2)->setText(tr("not pass"));
}
else if (6 == type && HGPDTTOOLDB_NAME_IMAGE_CORRECTION_GRAY_600DPI == name)
else if (6 == correctType && HGPDTTOOLDB_NAME_IMAGE_CORRECTION_GRAY_600DPI == name)
{
ui->tableWidget->item(i, 2)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
ui->tableWidget->item(i, 2)->setBackgroundColor(pass ? QColor(0,255,0) : QColor(255,0,0));
ui->tableWidget->item(i, 2)->setText(pass ? tr("pass") : tr("not pass"));
allPass = true;
int row = item->row();
ui->tableWidget->selectRow(row + 1);
if (correctItemId >= 0)
{
ui->tableWidget->item(correctItemId, 2)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
ui->tableWidget->item(correctItemId, 2)->setBackgroundColor(QColor(0,255,0));
ui->tableWidget->item(correctItemId, 2)->setText(tr("pass"));
}
ui->tableWidget->item(i, 2)->setBackgroundColor(QColor(255,0,0));
ui->tableWidget->item(i, 2)->setText(tr("not pass"));
}
}
}
@ -243,8 +210,7 @@ void Form_mainInterface::resetCorrectItems()
QString title = item->text();
QString name = m_map_title_name.value(title).name;
if (HGPDTTOOLDB_NAME_IMAGE_CORRECTION == name ||
HGPDTTOOLDB_NAME_IMAGE_CORRECTION_RGB_200DPI == name ||
if (HGPDTTOOLDB_NAME_IMAGE_CORRECTION_RGB_200DPI == name ||
HGPDTTOOLDB_NAME_IMAGE_CORRECTION_GRAY_200DPI == name ||
HGPDTTOOLDB_NAME_IMAGE_CORRECTION_RGB_300DPI == name ||
HGPDTTOOLDB_NAME_IMAGE_CORRECTION_GRAY_300DPI == name ||
@ -259,34 +225,6 @@ void Form_mainInterface::resetCorrectItems()
}
}
void Form_mainInterface::updateDistortionItem(bool pass)
{
for (int i = 0; i < ui->tableWidget->rowCount(); i++)
{
QTableWidgetItem *item = ui->tableWidget->item(i, 1);
if (item != nullptr)
{
QString name = m_map_title_name.value(m_curItemName).name;
if (m_curItemName== item->text() && HGPDTTOOLDB_NAME_VERIFY_DISTORTION_VAL == name)
{
ui->tableWidget->item(i, 2)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
ui->tableWidget->item(i, 2)->setBackgroundColor(pass ? QColor(0,255,0) : QColor(255,0,0));
ui->tableWidget->item(i, 2)->setText(pass ? tr("pass") : tr("not pass"));
if (pass)
{
item->setToolTip("");
writeTestLog(tr("Tester: %1, Test item: %2, Test result: Pass!")
.arg(m_accountName).arg(m_curItemName));
on_pbtn_nextStep_clicked();
break;
}
}
}
}
}
void Form_mainInterface::paintEvent(QPaintEvent *event)
{
(void)event;
@ -306,7 +244,7 @@ void Form_mainInterface::on_testResult(QString text)
updateUiEnabled(true);
m_isTesting = false;
m_mainwnd->initTestingRef();
m_mainwnd->releaseTesting();
if (m_disconnect)
{
@ -338,12 +276,14 @@ void Form_mainInterface::on_testDistortion(float width, float height, float dist
{
ui->label_imgInfo->setVisible(true);
ui->label_destortionInfo_200dpi->setVisible(true);
ui->label_destortionInfo_300dpi->setVisible(true);
ui->label_destortionInfo_200dpi->setVisible(!verify);
ui->label_destortionInfo_300dpi->setVisible(!verify);
ui->label_imgInfo->setText(tr("image pixel: ") + QString::number((width > 0 && width < 9999) ? width : 0.0, 'f', 4) +
" * " + QString::number((height > 0 && height < 9999) ? height : 0.0, 'f', 4));
if (!verify)
{
if (200 == m_curDpi)
{
m_distortion_200dpi = distortion > 0 ? distortion : 0;
@ -374,35 +314,6 @@ void Form_mainInterface::on_testDistortion(float width, float height, float dist
m_hg->setDistortValue(m_distortion_600dpi);
}
}
if (verify)
{
bool pass = false;
float absPixcel = std::abs(width - height);
float absDistortion = std::abs(1 - distortion);
if (200 == m_curDpi)
{
if ((absPixcel > 0 && absPixcel < 6.0f) || (absDistortion > 0 && absDistortion < 0.002))
{
pass = true;
}
}
else if (300 == m_curDpi)
{
if ((absPixcel > 0 && absPixcel < 8.0f) || (absDistortion > 0 && absDistortion < 0.002))
{
pass = true;
}
}
else if (600 == m_curDpi)
{
if ((absPixcel > 0 && absPixcel < 15.0f) || (absDistortion > 0 && absDistortion < 0.002))
{
pass = true;
}
}
updateDistortionItem(pass);
}
updateUiEnabled(true);

View File

@ -32,9 +32,8 @@ public:
SANE_Handle getDevHandle();
hgscanner *getScanner();
void setDevDisconnect();
void checkDynamicCorrectItem(bool pass, int correctType); //1:200dpi-color; 2:200dpi-gray;3:300dpi-color; 4:300dpi-gray;5:600dpi-color; 6:600dpi-gray;
void checkWrongCorrectItem(int correctType); //1:200dpi-color; 2:200dpi-gray;3:300dpi-color; 4:300dpi-gray;5:600dpi-color; 6:600dpi-gray;
void resetCorrectItems();
void updateDistortionItem(bool pass);
protected:
void paintEvent(QPaintEvent *event) override;

View File

@ -310,12 +310,6 @@ void MainWindow::releaseTesting()
}
}
void MainWindow::initTestingRef()
{
m_testingRef = 0;
updateActionStatus(true);
}
bool MainWindow::isTesting()
{
return (m_testingRef != 0);
@ -323,11 +317,11 @@ bool MainWindow::isTesting()
void MainWindow::closeEvent(QCloseEvent *event)
{
// if (isTesting())
// {
// QMessageBox::information(this, tr("tips"), tr("Is testing, do not close!"));
// event->ignore();
// }
if (isTesting())
{
QMessageBox::information(this, tr("tips"), tr("Is testing, do not close!"));
event->ignore();
}
}
int MainWindow::sane_ex_callback(SANE_Handle hdev, int code, void *data, unsigned int *len, void *param)
@ -459,7 +453,7 @@ void MainWindow::on_sane_dev_remove(QString devName)
if (mainInterface != nullptr)
{
mainInterface->setDevDisconnect();
if (!mainInterface->isTesting())
//if (!mainInterface->isTesting())
{
RemoveInterface(mainInterface);
}
@ -476,23 +470,19 @@ void MainWindow::on_sane_create_interface(SaneParams *saneParams)
{
if (nullptr != mainInterface->getScanner() && nullptr != mainInterface->getScanner()->cb_)
{
bool isCorrectItem = false;
int type = 0;
QString info = QString::fromStdString((char*)saneParams->data);
if (info == QString(STATU_DESC_SCANNER_ERR_IMAGE_CORRECTION_FINISHED))
{
func_test_correct(true, &type, &isCorrectItem);
if (isCorrectItem)
{
mainInterface->checkDynamicCorrectItem(true, type);
int type = 0;
func_test_correct(true, &type);
}
}
else //if (info == QString(STATU_DESC_SCANNER_ERR_IMAGE_CORRECTION_FAIL))
else if (info == QString(STATU_DESC_SCANNER_ERR_IMAGE_CORRECTION_FAIL))
{
func_test_correct(false, &type, &isCorrectItem);
if (isCorrectItem)
int type = 0;
func_test_correct(false, &type);
if (type > 0)
{
mainInterface->checkDynamicCorrectItem(false, type);
mainInterface->checkWrongCorrectItem(type);
}
}

View File

@ -34,7 +34,6 @@ public:
void updateActionStatus(bool enable);
void addTestingRef();
void releaseTesting();
void initTestingRef();
bool isTesting();
QString getDevSn(SANE_Handle handle);

View File

@ -140,12 +140,13 @@ int get_json_config_file()
std::cout << buf << std::endl;
}
static std::wstring set_test_name_ = L"";
//bool is_distortion_get_image = false;
//bool is_distortion_get_image_abnormal = false;
std::atomic<bool> is_distortion_get_image_abnormal(false);
std::atomic<bool> is_distortion_get_image(false);
int g_imageCount = 0; //本轮出图数量
int g_currentCorrectType = 0; //动态校正正在进行的子项
int g_dynamicCorrectStatus = SCANNER_ERR_OK; //动态校正结果
int g_currentCorrectType = 0;
int g_dynamicCorrectStatus = SCANNER_ERR_OK;
std::string test::get_serial_num()
{
@ -403,11 +404,11 @@ static int sane_ex_callback(SANE_Handle hdev, int code, void* data, unsigned int
is_distortion_get_image = false;
is_distortion_get_image_abnormal = true;
wcscpy(buf, L"畸变修正值获取失败,原因--->");
break;
}
else
{
is_distortion_get_image = true;
is_distortion_get_image_abnormal = false;
//type = true;
//wcscpy(buf, L"畸变修正值获取完成:");
break;
@ -489,16 +490,6 @@ static int sane_ex_callback(SANE_Handle hdev, int code, void* data, unsigned int
wcscpy(buf, L"单张测试失败, 原因--->");
}
}
else if (wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_SCAN_WORKING_STATUS) == 0)
{
if (g_imageCount < 20)
{
type = false;
wcscpy(buf, L"扫描走纸未达到要求(10张)");
h->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_RESULT, (void*)buf, type);
break;
}
}
else if (wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_CORRECTION_RGB_200DPI) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_CORRECTION_GRAY_200DPI) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_CORRECTION_RGB_300DPI) == 0
@ -519,7 +510,6 @@ static int sane_ex_callback(SANE_Handle hdev, int code, void* data, unsigned int
wcscat(buf, wstr.c_str());
//ret = h->io_control(IO_CTRL_CODE_RESTORE_SETTINGS, NULL, NULL);//结束恢复默认
bool correctFail = false;
if (wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_CORRECTION) == 0)
{
if (g_currentCorrectType == 7)
@ -531,7 +521,6 @@ static int sane_ex_callback(SANE_Handle hdev, int code, void* data, unsigned int
{
type = false;
h->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_RESULT, (void*)buf, type);
correctFail = true;
break;
}
else if (g_dynamicCorrectStatus == SCANNER_ERR_IMAGE_CORRECTION_FINISHED)
@ -548,14 +537,6 @@ static int sane_ex_callback(SANE_Handle hdev, int code, void* data, unsigned int
count++;
}
}
if ((strcmp((char*)data, STATU_DESC_SCANNER_ERR_IMAGE_CORRECTION_FINISHED) != 0 && strcmp((char*)data, STATU_DESC_SCAN_STOPPED) != 0) ||
g_dynamicCorrectStatus == SCANNER_ERR_IMAGE_CORRECTION_FAIL)
{
g_dynamicCorrectStatus = SCANNER_ERR_IMAGE_CORRECTION_FAIL;
if (!correctFail)
h->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_RESULT, (void*)buf, false);
}
}
else
{
@ -580,7 +561,6 @@ static int sane_ex_callback(SANE_Handle hdev, int code, void* data, unsigned int
{
if (wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_CIS_ORIGINAL_IMAGE) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_COLOR_QUALITY) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_SCAN_WORKING_STATUS) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_SKEW_DETECTION) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_GRAY_QUALITY) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_GET_DISTORTION_VAL) == 0
@ -606,7 +586,6 @@ static int sane_ex_callback(SANE_Handle hdev, int code, void* data, unsigned int
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_CORRECTION_GRAY_600DPI) == 0)
{
g_imageCount++;
if (wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_GET_DISTORTION_VAL) == 0)
{
is_distortion_get_image = true;
@ -764,9 +743,9 @@ void test::thread_dynamic_correct(std::string correctData)
if (g_currentCorrectType > 1)
m_waitCorrect.wait(lock);
if (g_currentCorrectType == 0 || g_dynamicCorrectStatus == SCANNER_ERR_IMAGE_CORRECTION_FAIL)
if (g_currentCorrectType == 0)
{
break;
return;
}
SANE_Bool type = true;
@ -796,24 +775,12 @@ void test::thread_distortion()
if (ret != SCANNER_ERR_OK)
{
helper_->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_RESULT, (void*)L"自动计算畸变值获取失败", false);
return;
}
int cnt = 0;
SANE_DISTORTION_VAL dis = { 0 };
if (is_distortion_get_image_abnormal)
{
return;
}
m_waitDistortion.wait(lock);
if (is_distortion_get_image_abnormal)
{
return;
}
ret = helper_->io_control(IO_CTRL_CODE_GET_PC_DISTORTION_CHECK_VAL, &dis, &len);
if (dis.h > 0 && dis.scaleXY < 10)
@ -1037,13 +1004,7 @@ int test::test_host_fan(void* data)
/* 扫描工作状态 */
int test::test_scan_work_status(void* data)
{
int count = 10;
int ret = helper_->io_control(IO_CTRL_CODE_SET_SCAN_COUNT, &count, NULL);
ret = helper_->io_control(IO_CTRL_CODE_GET_IMAGE, NULL, NULL);
int count2 = -1;
ret = helper_->io_control(IO_CTRL_CODE_SET_SCAN_COUNT, &count2, NULL);
return ret;
return helper_->io_control(IO_CTRL_CODE_GET_IMAGE, NULL, NULL);
}
/* USB-PC接口 */
int test::test_usb_pc_interface(void* data)
@ -1270,10 +1231,8 @@ int test::test_get_auto_distortion(void* data)
}
//先默认设置1
float distortion = 1.0;
float getdistortion = 0;
ret = helper_->io_control(IO_CTRL_CODE_SET_DISTORTION_DEVS_CHECK_VAL, &distortion, &len);
ret = helper_->io_control(IO_CTRL_CODE_GET_DISTORTION_DEVS_CHECK_VAL, &getdistortion, &len);
if (thread_distortion_handle.get() && thread_distortion_handle->joinable())
thread_distortion_handle->join();
@ -1915,7 +1874,6 @@ int test::test_image_correct_all(void* data)
}
g_currentCorrectType = 1;
g_dynamicCorrectStatus = SCANNER_ERR_OK;
if (thread_dynamic_correct_handle.get() && thread_dynamic_correct_handle->joinable())
thread_dynamic_correct_handle->join();
thread_dynamic_correct_handle.reset(new std::thread(&test::thread_dynamic_correct, this, str));
@ -1965,8 +1923,6 @@ DECL_API(int) func_test_go(const wchar_t* NAME, const wchar_t* oper)
return -1;
}
g_imageCount = 0;
is_distortion_get_image = false;
is_distortion_get_image_abnormal = false;
@ -1988,32 +1944,19 @@ DECL_API(int) func_test_uninit(void* uninit)
return 0;
}
DECL_API(int) func_test_correct(bool isSuccess, int *currentIndex, bool *isCorrectItem)
DECL_API(int) func_test_correct(bool isSuccess, int *currentIndex)
{
if (wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_CORRECTION) != 0 &&
wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_CORRECTION_RGB_200DPI) != 0 &&
wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_CORRECTION_GRAY_200DPI) != 0 &&
wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_CORRECTION_RGB_300DPI) != 0 &&
wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_CORRECTION_GRAY_300DPI) != 0 &&
wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_CORRECTION_RGB_600DPI) != 0 &&
wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_CORRECTION_GRAY_600DPI) != 0)
{
return 0;
}
*currentIndex = g_currentCorrectType - 1;
*isCorrectItem = true;
if (!isSuccess)
{
//if (g_currentCorrectType == 7)
*currentIndex = g_currentCorrectType - 1;
if (g_currentCorrectType == 7)
{
g_dynamicCorrectStatus = SCANNER_ERR_IMAGE_CORRECTION_FAIL;
}
}
else
{
//if (g_currentCorrectType == 7)
if (g_currentCorrectType == 7)
{
g_dynamicCorrectStatus = SCANNER_ERR_IMAGE_CORRECTION_FINISHED;
}

View File

@ -296,7 +296,7 @@ DECL_API(int) func_test_uninit(void*);
// isSuccess - Explain whether the correction was successful this time.
//
// Return: error code
DECL_API(int) func_test_correct(bool isSuccess, int* currentIndex, bool* isCorrectItem);
DECL_API(int) func_test_correct(bool isSuccess, int* currentIndex);
DECL_API(int) func_test_distortion();