<div dir="ltr"><div>Please create a new function, like init_panel(), and call it after init_model.</div><div><br></div><div>allan<br></div><br><br>On Thu, May 5, 2022 at 5:39 PM Charles Quarra via sane-devel <<a href="mailto:sane-devel@alioth-lists.debian.net">sane-devel@alioth-lists.debian.net</a>> wrote:<br>><br>> Good afternoon,<br>><br>> I've been working on the MR for imprinter support for the canon_dr backend (MR: <a href="https://gitlab.com/sane-project/backends/-/merge_requests/706">https://gitlab.com/sane-project/backends/-/merge_requests/706</a> )<br>> canon_dr: add imprinting support for DR-X10C (!706) · Merge requests · sane-project / backends · GitLab<br>> enables all imprinting features exposed by the TWAIN driver: pre-imprinting and post-imprinting with all addon modes font size, orientation and spacing<br>> <a href="http://gitlab.com">gitlab.com</a><br>> <br>><br>><br>> 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.<br>><br>> My question is what would be the preferred place to do this runtime detection.<br>><br>> My instinct would be to add the required read cmd inside the init_model function, specifically here:<br>><br>> <a href="https://gitlab.com/sane-project/backends/-/merge_requests/706/diffs#bd44e4ec108bed0a73ccda8521103ba2ba4b2a5b_1894_1905">https://gitlab.com/sane-project/backends/-/merge_requests/706/diffs#bd44e4ec108bed0a73ccda8521103ba2ba4b2a5b_1894_1905</a><br>> canon_dr: add imprinting support for DR-X10C (!706) · Merge requests · sane-project / backends · GitLab<br>> enables all imprinting features exposed by the TWAIN driver: pre-imprinting and post-imprinting with all addon modes font size, orientation and spacing<br>> <a href="http://gitlab.com">gitlab.com</a><br>> <br>> <br>><br>> 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?<br>><br>> Thanks for your help,<br>><br>> Charles Quarra<br>><br><br><br>--<br>"well, I stand up next to a mountain- and I chop it down with the edge of my hand"</div>