调整畸变和扫描异常提示

This commit is contained in:
yangjiaxuan 2023-06-17 17:27:57 +08:00
parent d09f488b52
commit f0a6eadfff
4 changed files with 60 additions and 9 deletions

View File

@ -927,10 +927,38 @@
</message>
<message>
<location filename="form_maininterface.cpp" line="706"/>
<location filename="form_maininterface.cpp" line="767"/>
<location filename="form_maininterface.cpp" line="791"/>
<source>device history scan count:</source>
<translation></translation>
</message>
<message>
<location filename="form_maininterface.cpp" line="763"/>
<location filename="form_maininterface.cpp" line="768"/>
<location filename="form_maininterface.cpp" line="773"/>
<location filename="form_maininterface.cpp" line="778"/>
<source>Prompt</source>
<translation></translation>
</message>
<message>
<location filename="form_maininterface.cpp" line="763"/>
<source>No paper</source>
<translation></translation>
</message>
<message>
<location filename="form_maininterface.cpp" line="768"/>
<source>Device is sleeping</source>
<translation></translation>
</message>
<message>
<location filename="form_maininterface.cpp" line="773"/>
<source>Counting mode</source>
<translation></translation>
</message>
<message>
<location filename="form_maininterface.cpp" line="778"/>
<source>Other error</source>
<translation></translation>
</message>
<message>
<source>device serial number:%1</source>
<translation type="vanished">%1</translation>
@ -993,7 +1021,7 @@
</message>
<message>
<location filename="form_maininterface.cpp" line="700"/>
<location filename="form_maininterface.cpp" line="761"/>
<location filename="form_maininterface.cpp" line="785"/>
<source>device roller count:</source>
<translation></translation>
</message>

View File

@ -746,14 +746,38 @@ void Form_mainInterface::on_pbtn_start_clicked()
if (m_hg != nullptr)
{
updateUiEnabled(false);
m_isTesting = true;
m_mainwnd->addTestingRef();
int ret = 0;
if (buf != nullptr && (dpi > 0 || (correct_value > -1 && correct_value < 7)))
func_test_go(name.toStdWString().c_str(), (const wchar_t*)buf, m_hg);
ret = func_test_go(name.toStdWString().c_str(), (const wchar_t*)buf, m_hg);
else
func_test_go(name.toStdWString().c_str(), L"null", m_hg);
ret = func_test_go(name.toStdWString().c_str(), L"null", m_hg);
if (ret == SANE_STATUS_GOOD)
{
updateUiEnabled(false);
m_isTesting = true;
m_mainwnd->addTestingRef();
}
else if (ret == SANE_STATUS_NO_DOCS)
{
QMessageBox::information(this, tr("Prompt"), tr("No paper"));
return;
}
else if (ret == SCANNER_ERR_DEVICE_SLEEPING)
{
QMessageBox::information(this, tr("Prompt"), tr("Device is sleeping"));
return;
}
else if (ret == SCANNER_ERR_DEVICE_COUNT_MODE)
{
QMessageBox::information(this, tr("Prompt"), tr("Counting mode"));
return;
}
else
{
QMessageBox::information(this, tr("Prompt"), tr("Other error"));
return;
}
}
if (name == HGPDTTOOLDB_NAME_CLEAR_ROLLER_COUNT)

View File

@ -1049,9 +1049,8 @@ public:
}
//先默认设置1
float distortion = 1.0;
int setdistortion = distortion;
ret = helper_->io_control(IO_CTRL_CODE_SET_DISTORTION_DEVS_CHECK_VAL, &setdistortion, &len);
ret = helper_->io_control(IO_CTRL_CODE_SET_DISTORTION_DEVS_CHECK_VAL, &distortion, &len);
ret = helper_->io_control(IO_CTRL_CODE_SET_DISTORTION_IMAGE, &type, &len);
if (ret != SCANNER_ERR_OK)