尺寸检测协议写错
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;
|
int ret = SCANNER_ERR_OK;
|
||||||
SET_SANE_OPT(ret, scanner_, ex_duplex, &mech);
|
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_;
|
int count = count_;
|
||||||
if (mech && count_ >= 2)
|
if (mech && count_ >= 2)
|
||||||
{
|
{
|
||||||
|
@ -2273,6 +2273,9 @@ void huagao_ds::init_support_caps(void)
|
||||||
std::vector<bool> all;
|
std::vector<bool> all;
|
||||||
GET_SANE_OPT(bool, scanner_, ex_duplex, NULL, &all);
|
GET_SANE_OPT(bool, scanner_, ex_duplex, NULL, &all);
|
||||||
dup = all[sane_opts::RANGE_POS_CURRENT];
|
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 ret = SCANNER_ERR_OK;
|
||||||
int count = count_;
|
int count = count_;
|
||||||
if (dup && count_ >= 2)
|
if (dup && count_ >= 2)
|
||||||
|
@ -2443,13 +2446,13 @@ void huagao_ds::init_support_caps(void)
|
||||||
if (Msg::Set == msg) {
|
if (Msg::Set == msg) {
|
||||||
auto autodetectborder = data.currentItem<CapType::IAutomaticBorderDetection>();
|
auto autodetectborder = data.currentItem<CapType::IAutomaticBorderDetection>();
|
||||||
int ret = SCANNER_ERR_OK;
|
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();
|
return ret == SCANNER_ERR_OK ? success() : badValue();
|
||||||
}
|
}
|
||||||
Bool init = false,
|
Bool init = false,
|
||||||
erase = false;
|
erase = false;
|
||||||
std::vector<bool> all;
|
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];
|
init = (bool)all[sane_opts::RANGE_POS_DEFAULT];
|
||||||
erase = (bool)all[sane_opts::RANGE_POS_CURRENT];
|
erase = (bool)all[sane_opts::RANGE_POS_CURRENT];
|
||||||
return CapSupGetAllReset<Bool, Bool, CapType::IAutomaticBorderDetection>(msg, data, { false,true }, erase, init, erase ? 1 : 0, 0);
|
return CapSupGetAllReset<Bool, Bool, CapType::IAutomaticBorderDetection>(msg, data, { false,true }, erase, init, erase ? 1 : 0, 0);
|
||||||
|
|
Loading…
Reference in New Issue