[sane-devel] [canon_dr] Imprinter detection

Charles Quarra charles.quarra at smartmatic.com
Thu May 5 22:05:41 BST 2022


Good afternoon,

I've been working on the MR for imprinter support for the canon_dr backend (MR: https://gitlab.com/sane-project/backends/-/merge_requests/706 )
[https://gitlab.com/assets/twitter_card-570ddb06edf56a2312253c5872489847a0f385112ddbcd71ccfa1570febab5d2.jpg]<https://gitlab.com/sane-project/backends/-/merge_requests/706>
canon_dr: add imprinting support for DR-X10C (!706) · Merge requests · sane-project / backends · GitLab<https://gitlab.com/sane-project/backends/-/merge_requests/706>
enables all imprinting features exposed by the TWAIN driver: pre-imprinting and post-imprinting with all addon modes font size, orientation and spacing
gitlab.com



Since imprinters are optional hardware modules, it makes sense to detect them at runtime and make the corresponding SANE options inactive. I have some implementation for runtime detection of the imprinters.

My question is what would be the preferred place to do this runtime detection.

My instinct would be to add the required read cmd inside the init_model function, specifically here:

https://gitlab.com/sane-project/backends/-/merge_requests/706/diffs#bd44e4ec108bed0a73ccda8521103ba2ba4b2a5b_1894_1905
[https://gitlab.com/assets/twitter_card-570ddb06edf56a2312253c5872489847a0f385112ddbcd71ccfa1570febab5d2.jpg]<https://gitlab.com/sane-project/backends/-/merge_requests/706/diffs#bd44e4ec108bed0a73ccda8521103ba2ba4b2a5b_1894_1905>
canon_dr: add imprinting support for DR-X10C (!706) · Merge requests · sane-project / backends · GitLab<https://gitlab.com/sane-project/backends/-/merge_requests/706/diffs#bd44e4ec108bed0a73ccda8521103ba2ba4b2a5b_1894_1905>
enables all imprinting features exposed by the TWAIN driver: pre-imprinting and post-imprinting with all addon modes font size, orientation and spacing
gitlab.com



The reason I want to check with the backend maintainers first, is that I've not seen other usb/scsi commands done inside init_model, wondering if perhaps there is a good reason for that?

Thanks for your help,

Charles Quarra

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/sane-devel/attachments/20220505/3cabffed/attachment.htm>


More information about the sane-devel mailing list