diff --git a/app/HGProductionTool/dialog_inputserialnum.cpp b/app/HGProductionTool/dialog_inputserialnum.cpp index c0d4a97..c9e8284 100644 --- a/app/HGProductionTool/dialog_inputserialnum.cpp +++ b/app/HGProductionTool/dialog_inputserialnum.cpp @@ -285,7 +285,7 @@ void Dialog_InputSerialNum::updateCurDeviceCfg() QString content; content.append(tr("Current Configration of device:") + "\n\n"); content.append(tr("Speep mode: %1PPM").arg(QString::number(speedMode)) + "\n"); - content.append(sleepTime > 0 ? tr("Sleep time: %1minute").arg(QString::number(sleepTime)) : tr("Sleep time: Not sleeping") + "\n"); + content.append(sleepTime > 0 ? tr("Sleep time: %1minute").arg(QString::number(sleepTime)) + "\n" : tr("Sleep time: Not sleeping") + "\n"); content.append(tr("Vid: %1 Pid: %2").arg(QString::fromStdString(buf)).arg(QString::fromStdString(buf2)) + "\n"); ui->textBrowser_curConfig->setText(content); diff --git a/app/HGProductionTool/dialog_inputserialnum.ui b/app/HGProductionTool/dialog_inputserialnum.ui index a5abbde..034a377 100644 --- a/app/HGProductionTool/dialog_inputserialnum.ui +++ b/app/HGProductionTool/dialog_inputserialnum.ui @@ -17,7 +17,7 @@ 570 - 210 + 300 190 35 @@ -45,7 +45,7 @@ 570 - 300 + 210 190 35 @@ -73,7 +73,7 @@ 570 - 380 + 390 190 35 @@ -149,7 +149,7 @@ 610 - 460 + 480 101 41 diff --git a/app/HGProductionTool/form_maininterface.cpp b/app/HGProductionTool/form_maininterface.cpp index 57ef998..66e4a04 100644 --- a/app/HGProductionTool/form_maininterface.cpp +++ b/app/HGProductionTool/form_maininterface.cpp @@ -834,7 +834,7 @@ void Form_mainInterface::on_pbtn_start_clicked() ret = func_test_go(name.toStdWString().c_str(), L"null", m_hg); if (ret > SANE_STATUS_GOOD) { - getLogInfo(ret); + //getLogInfo(ret); updateUiEnabled(true); m_isTesting = false; m_mainwnd->releaseTesting(); diff --git a/code/base/test_base.cpp b/code/base/test_base.cpp index 59ad260..3e2fee8 100644 --- a/code/base/test_base.cpp +++ b/code/base/test_base.cpp @@ -46,7 +46,7 @@ static struct Test_Map {HGPDTTOOLDB_NAME_CONFIGURE_SPEED_MODE ,HGPDTTOOLDB_TITLE_CONFIGURE_SPEED_MODE}, {HGPDTTOOLDB_NAME_DORMANCY ,HGPDTTOOLDB_TITLE_DORMANCY}, {HGPDTTOOLDB_NAME_GET_DEVICE_CONFIG ,HGPDTTOOLDB_TITLE_GET_DEVICE_CONFIG}, - {HGPDTTOOLDB_NAME_GET_DEVICE_CPU_DISK ,HGPDTTOOLDB_TITLE_GET_DEVICE_CPU_DISK} + {HGPDTTOOLDB_NAME_GET_DEVICE_CPU_DISK ,HGPDTTOOLDB_TITLE_GET_DEVICE_CPU_DISK} }; static std::string StringToUtf(std::string strValue) @@ -435,7 +435,9 @@ public: else if (wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_PRESSUER_TEST_RGB_200DPI) == 0 || wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_PRESSUER_TEST_GRAY_200DPI) == 0 || wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_PRESSUER_TEST_RGB_300DPI) == 0 - || wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_PRESSUER_TEST_GRAY_300DPI) == 0) + || wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_PRESSUER_TEST_GRAY_300DPI) == 0 + || wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_PRESSUER_TEST_RGB_600DPI) == 0 + || wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_PRESSUER_TEST_GRAY_600DPI) == 0) { if (strcmp((char*)data, STATU_DESC_SCAN_STOPPED) != 0) { @@ -482,7 +484,7 @@ public: } wcscat(buf, wstr.c_str()); - ret = h->io_control(IO_CTRL_CODE_RESTORE_SETTINGS, NULL, NULL);//结束恢复默认 + //ret = h->io_control(IO_CTRL_CODE_RESTORE_SETTINGS, NULL, NULL);//结束恢复默认 h->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_RESULT, (void*)buf, type); } @@ -515,7 +517,9 @@ public: || wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_PRESSUER_TEST_RGB_200DPI) == 0 || wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_PRESSUER_TEST_GRAY_200DPI) == 0 || wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_PRESSUER_TEST_RGB_300DPI) == 0 - || wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_PRESSUER_TEST_GRAY_300DPI) == 0) + || wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_PRESSUER_TEST_GRAY_300DPI) == 0 + || wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_PRESSUER_TEST_RGB_600DPI) == 0 + || wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_PRESSUER_TEST_GRAY_600DPI) == 0) { if (wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_GET_DISTORTION_VAL) == 0) @@ -583,6 +587,8 @@ public: test_map_[HGPDTTOOLDB_NAME_PRESSUER_TEST_GRAY_200DPI] = &test::test_pressuer_test_gray_200dpi; test_map_[HGPDTTOOLDB_NAME_PRESSUER_TEST_RGB_300DPI] = &test::test_pressuer_test_rgb_300dpi; test_map_[HGPDTTOOLDB_NAME_PRESSUER_TEST_GRAY_300DPI] = &test::test_pressuer_test_gray_300dpi; + test_map_[HGPDTTOOLDB_NAME_PRESSUER_TEST_RGB_600DPI] = &test::test_pressuer_test_rgb_600dpi; + test_map_[HGPDTTOOLDB_NAME_PRESSUER_TEST_GRAY_600DPI] = &test::test_pressuer_test_gray_600dpi; test_map_[HGPDTTOOLDB_NAME_GET_DEVICE_CONFIG] = &test::test_get_device_config; test_map_[HGPDTTOOLDB_NAME_GET_DEVICE_CPU_DISK] = &test::test_get_device_cpu_disk; } @@ -1325,6 +1331,26 @@ public: helper_->io_control(IO_CTRL_CODE_SET_DPI, (void*)&dpi, &len); return helper_->io_control(IO_CTRL_CODE_GET_IMAGE, NULL, NULL); } + /*压力测试彩色_600dpi*/ + int test_pressuer_test_rgb_600dpi(void* data) + { + const char* color = OPTION_VALUE_YSMS_24WCS; + int dpi = 600; + unsigned int len = strlen(color); + helper_->io_control(IO_CTRL_CODE_SET_COLOR, (void*)color, &len); + helper_->io_control(IO_CTRL_CODE_SET_DPI, (void*)&dpi, &len); + return helper_->io_control(IO_CTRL_CODE_GET_IMAGE, NULL, NULL); + } + /*压力测试灰色_600dpi*/ + int test_pressuer_test_gray_600dpi(void* data) + { + const char* color = OPTION_VALUE_YSMS_256JHD; + int dpi = 600; + unsigned int len = strlen(color); + helper_->io_control(IO_CTRL_CODE_SET_COLOR, (void*)color, &len); + helper_->io_control(IO_CTRL_CODE_SET_DPI, (void*)&dpi, &len); + return helper_->io_control(IO_CTRL_CODE_GET_IMAGE, NULL, NULL); + } /*获取设备配置*/ int test_get_device_config(void* data) { @@ -1464,30 +1490,33 @@ public: wstr.resize(l); ret = str_to_wchar(cpu.c_str(), (wchar_t*)wstr.c_str(), &l); } - if (wstr.empty()) - { - helper_->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVEB_GET_DEVICE_DEVS_CPU, (void*)L",获取失败,设备不支持", false); - return ret; - } helper_->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVEB_GET_DEVICE_DEVS_CPU, (void*)wstr.c_str(), true); std::string disk; unsigned len2 = 0; + std::wstring wstr2; ret = helper_->io_control(IO_CTRL_CODE_GET_DEVS_DISK, &disk[0], &len2); - ret = str_to_wchar(disk.c_str(), (wchar_t*)wstr.c_str(), &l); + ret = str_to_wchar(disk.c_str(), (wchar_t*)wstr2.c_str(), &l); if (ret == ERROR_INSUFFICIENT_BUFFER) { - wstr.resize(l); - ret = str_to_wchar(disk.c_str(), (wchar_t*)wstr.c_str(), &l); + wstr2.resize(l); + ret = str_to_wchar(disk.c_str(), (wchar_t*)wstr2.c_str(), &l); } - if (wstr.empty()) - { - helper_->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVEB_GET_DEVICE_DEVS_DISK, (void*)L",获取失败,设备不支持", false); - return ret; - } - helper_->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVEB_GET_DEVICE_DEVS_DISK, (void*)wstr.c_str(), true); + helper_->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVEB_GET_DEVICE_DEVS_CPU, (void*)wstr2.c_str(), true); - helper_->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_RESULT, (void*)(L"获取完成"), true); + helper_->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVEB_GET_DEVICE_DEVS_CPU, wstr.empty() ? (void*)L"获取失败,设备不支持" : (void*)wstr.c_str(), wstr.empty() ? false : true); + helper_->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVEB_GET_DEVICE_DEVS_DISK, wstr2.empty() ? (void*)L"获取失败,设备不支持" : (void*)wstr2.c_str(), wstr2.empty() ? false : true); + if (wstr.empty() || wstr2.empty()) + { + helper_->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_RESULT, (void*)(L"获取失败"), false); + return -1; + } + + else + { + helper_->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_RESULT, (void*)(L"获取完成"), true); + return - 1; + } return ret; } diff --git a/code/base/test_base.h b/code/base/test_base.h index f8955cd..f96915d 100644 --- a/code/base/test_base.h +++ b/code/base/test_base.h @@ -78,12 +78,16 @@ #define HGPDTTOOLDB_TITLE_CLEAR_HISTORY_COUNT L"清除历史计数" /*压力测试彩色+200dpi*/ #define HGPDTTOOLDB_TITLE_PRESSUER_TEST_RGB_200DPI L"压力测试彩色_200dpi" -/*压力测试灰色+200dpi*/ -#define HGPDTTOOLDB_TITLE_PRESSUER_TEST_RGB_300DPI L"压力测试彩色_300dpi" /*压力测试彩色+300dpi*/ +#define HGPDTTOOLDB_TITLE_PRESSUER_TEST_RGB_300DPI L"压力测试彩色_300dpi" +/*压力测试彩色+600dpi*/ +#define HGPDTTOOLDB_TITLE_PRESSUER_TEST_RGB_600DPI L"压力测试彩色_600dpi" +/*压力测试灰色+200dpi*/ #define HGPDTTOOLDB_TITLE_PRESSUER_TEST_GRAY_200DPI L"压力测试灰色_200dpi" /*压力测试灰色+300dpi*/ #define HGPDTTOOLDB_TITLE_PRESSUER_TEST_GRAY_300DPI L"压力测试灰色_300dpi" +/*压力测试灰色+600dpi*/ +#define HGPDTTOOLDB_TITLE_PRESSUER_TEST_GRAY_600DPI L"压力测试灰色_600dpi" /*获取设备配置*/ #define HGPDTTOOLDB_TITLE_GET_DEVICE_CONFIG L"获取设备配置" /*获取设备内存和硬盘容量大小*/ @@ -178,6 +182,10 @@ #define HGPDTTOOLDB_NAME_PRESSUER_TEST_RGB_300DPI L"PRESSUER_TEST_RGB_300DPI" /*压力测试灰色+300dpi*/ #define HGPDTTOOLDB_NAME_PRESSUER_TEST_GRAY_300DPI L"PRESSUER_TEST_GRAY_300DPI" +/*压力测试彩色+600dpi*/ +#define HGPDTTOOLDB_NAME_PRESSUER_TEST_RGB_600DPI L"PRESSUER_TEST_RGB_600DPI" +/*压力测试灰色+600dpi*/ +#define HGPDTTOOLDB_NAME_PRESSUER_TEST_GRAY_600DPI L"PRESSUER_TEST_GRAY_600DPI" /*获取设备配置*/ #define HGPDTTOOLDB_NAME_GET_DEVICE_CONFIG L"GET_DEVICE_CONFIG" /*获取设备内存和硬盘容量大小*/