尺寸检测协议写错
This commit is contained in:
parent
bd75752dd5
commit
06c45b5aab
|
@ -2257,7 +2257,7 @@ void huagao_ds::init_support_caps(void)
|
|||
|
||||
int ret = SCANNER_ERR_OK;
|
||||
SET_SANE_OPT(ret, scanner_, ex_duplex, &mech);
|
||||
|
||||
load_sane_util::log_info(mech ? L"Set1 Duplex is: true\r\n" : L"Set1 Duplex is: false\r\n", 0);
|
||||
int count = count_;
|
||||
if (mech && count_ >= 2)
|
||||
{
|
||||
|
@ -2273,6 +2273,9 @@ void huagao_ds::init_support_caps(void)
|
|||
std::vector<bool> all;
|
||||
GET_SANE_OPT(bool, scanner_, ex_duplex, NULL, &all);
|
||||
dup = all[sane_opts::RANGE_POS_CURRENT];
|
||||
|
||||
load_sane_util::log_info(dup ? L"Get Duplex is: true\r\n" : L"Get Duplex is: false\r\n", 0);
|
||||
|
||||
int ret = SCANNER_ERR_OK;
|
||||
int count = count_;
|
||||
if (dup && count_ >= 2)
|
||||
|
@ -2443,13 +2446,13 @@ void huagao_ds::init_support_caps(void)
|
|||
if (Msg::Set == msg) {
|
||||
auto autodetectborder = data.currentItem<CapType::IAutomaticBorderDetection>();
|
||||
int ret = SCANNER_ERR_OK;
|
||||
SET_SANE_OPT(ret, scanner_, is_erase_black_frame, (bool*)&autodetectborder);
|
||||
SET_SANE_OPT(ret, scanner_, is_size_check, (bool*)&autodetectborder);
|
||||
return ret == SCANNER_ERR_OK ? success() : badValue();
|
||||
}
|
||||
Bool init = false,
|
||||
erase = false;
|
||||
std::vector<bool> all;
|
||||
GET_SANE_OPT(bool, scanner_, is_erase_black_frame, NULL, &all);
|
||||
GET_SANE_OPT(bool, scanner_, is_size_check, NULL, &all);
|
||||
init = (bool)all[sane_opts::RANGE_POS_DEFAULT];
|
||||
erase = (bool)all[sane_opts::RANGE_POS_CURRENT];
|
||||
return CapSupGetAllReset<Bool, Bool, CapType::IAutomaticBorderDetection>(msg, data, { false,true }, erase, init, erase ? 1 : 0, 0);
|
||||
|
|
Loading…
Reference in New Issue