新增部分ioctrl 接口

This commit is contained in:
13038267101 2022-12-09 09:47:42 +08:00
parent 6f1ac8fe12
commit d5893e7cc5
1 changed files with 28 additions and 16 deletions

View File

@ -2182,59 +2182,59 @@ int hg_scanner::setting_fold_type(void* data)
}
int hg_scanner::on_color_mode_changed(int& color_mode)
{
return SCANNER_ERR_OK;
return SCANNER_ERR_DEVICE_NOT_SUPPORT;
}
int hg_scanner::on_paper_changed(int& paper)
{
return SCANNER_ERR_OK;
return SCANNER_ERR_DEVICE_NOT_SUPPORT;
}
int hg_scanner::on_paper_check_changed(bool& check)
{
return SCANNER_ERR_OK;
return SCANNER_ERR_DEVICE_NOT_SUPPORT;
}
int hg_scanner::on_resolution_changed(int& dpi)
{
return SCANNER_ERR_OK;
return SCANNER_ERR_DEVICE_NOT_SUPPORT;
}
int hg_scanner::on_ultrasonic_check_changed(bool& check)
{
return SCANNER_ERR_OK;
return SCANNER_ERR_DEVICE_NOT_SUPPORT;
}
int hg_scanner::on_staple_check_changed(bool& check)
{
return SCANNER_ERR_OK;
return SCANNER_ERR_DEVICE_NOT_SUPPORT;
}
int hg_scanner::on_skew_check_changed(bool& check)
{
return SCANNER_ERR_OK;
return SCANNER_ERR_DEVICE_NOT_SUPPORT;
}
int hg_scanner::on_skew_check_level_changed(int& check)
{
return SCANNER_ERR_OK;
return SCANNER_ERR_DEVICE_NOT_SUPPORT;
}
int hg_scanner::on_set_feedmode(int feedmode)
{
return SCANNER_ERR_OK;
return SCANNER_ERR_DEVICE_NOT_SUPPORT;
}
int hg_scanner::on_get_feedmode(int &feedmode)
{
return SCANNER_ERR_OK;
return SCANNER_ERR_DEVICE_NOT_SUPPORT;
}
int hg_scanner::on_pic_type(bool& pic)
{
return SCANNER_ERR_OK;
return SCANNER_ERR_DEVICE_NOT_SUPPORT;
}
int hg_scanner::on_pick_paper(bool autostrength)
{
return SCANNER_ERR_OK;
return SCANNER_ERR_DEVICE_NOT_SUPPORT;
}
int hg_scanner::on_pick_paper_threshold(double threshold)
{
return SCANNER_ERR_OK;
return SCANNER_ERR_DEVICE_NOT_SUPPORT;
}
int hg_scanner::on_is_auto_paper(bool isautopaper)
{
return SCANNER_ERR_OK;
return SCANNER_ERR_DEVICE_NOT_SUPPORT;
}
void hg_scanner::on_device_reconnected(void)
{
@ -2244,11 +2244,11 @@ void hg_scanner::on_device_reconnected(void)
}
int hg_scanner::set_setting_value(const char* name, void* data, int len)
{
return SCANNER_ERR_OK;
return SCANNER_ERR_DEVICE_NOT_SUPPORT;
}
int hg_scanner::on_scanner_closing(bool force)
{
return SCANNER_ERR_OK;
return SCANNER_ERR_DEVICE_NOT_SUPPORT;
}
void hg_scanner::thread_handle_usb_read(void)
@ -3345,6 +3345,18 @@ int hg_scanner::device_io_control(unsigned long code, void* data, unsigned* len)
(*(int*)data) = num;
return ret;
}
else if (code == IO_CTRL_CODE_SET_FEEDMODE)
{
return on_set_feedmode(*((int*)data));
}
else if (code == IO_CTRL_CODE_SET_SKEW_CHECK)
{
return on_skew_check_changed(*((bool*)data));
}
else if (code == IO_CTRL_CODE_SET_SKEW_CHECK_VAL)
{
return on_skew_check_level_changed(*((int*)data));
}
return SCANNER_ERR_DEVICE_NOT_SUPPORT;
}
std::string hg_scanner::get_firmware_version(void)