make AutoScan an empty protocol - fix bug-732
This commit is contained in:
parent
ef545cca20
commit
fc972c5c41
|
@ -2553,19 +2553,21 @@ void huagao_ds::init_support_caps(void)
|
|||
{
|
||||
m_query[CapType::AutoScan] = msgSupportGetAllSetReset;
|
||||
m_caps[CapType::AutoScan] = [this](Msg msg, Capability& data)->Result {
|
||||
// HaoFenShu - an empty protocol, 2023-11-27
|
||||
log_attr_access((int)CapType::AutoScan, (int)msg);
|
||||
if (Msg::Set == msg || Msg::Reset == msg) {
|
||||
bool val = false;
|
||||
if(Msg::Set == msg)
|
||||
val = (bool)data.currentItem<CapType::AutoScan>();
|
||||
int ret = SANE_STATUS_GOOD;
|
||||
//int ret = SANE_STATUS_GOOD;
|
||||
m_autoscan = val;
|
||||
SET_SANE_OPT_EX(ret, scanner_, scan_when_paper_on, &val);
|
||||
return ret == SANE_STATUS_GOOD ? success() : badValue();
|
||||
//SET_SANE_OPT_EX(ret, scanner_, scan_when_paper_on, &val);
|
||||
//return ret == SANE_STATUS_GOOD ? success() : badValue();
|
||||
return success();
|
||||
}
|
||||
std::vector<bool> all;
|
||||
GET_SANE_OPT_EX(bool, scanner_, scan_when_paper_on, NULL, &all);
|
||||
m_autoscan = (bool)all[sane_opts::RANGE_POS_CURRENT];
|
||||
//std::vector<bool> all;
|
||||
//GET_SANE_OPT_EX(bool, scanner_, scan_when_paper_on, NULL, &all);
|
||||
//m_autoscan = (bool)all[sane_opts::RANGE_POS_CURRENT];
|
||||
//return oneValGetSet<Bool>(msg, data, (Bool)all[sane_opts::RANGE_POS_CURRENT], 0);
|
||||
//data = Capability::createOneValue<Bool>(CapType::AutoScan, (BYTE)all[sane_opts::RANGE_POS_CURRENT]);
|
||||
//return success();
|
||||
|
|
Loading…
Reference in New Issue