[sane-devel] LIDE210 5th button. sane-devel Digest, Vol 91, Issue 33

Stef stef.dev at free.fr
Sun Jan 27 07:00:08 UTC 2013


On 26/01/2013 04:31, Michael Watson wrote:
> All,
>
> The existing lide 210 code supports 4/5 buttons.  I have 5/5 working
> temporarily (call it a hack) utilizing the enum OPT_PAGE_LOADED_SW that this
> scanner does not have.
>
> genesys_gl124.c (search for button)
> For the lide210 case add
> 	if (s->val[OPT_PAGE_LOADED_SW].b ==
> s->last_val[OPT_PAGE_LOADED_SW].b)
>          s->val[OPT_PAGE_LOADED_SW].b = (val & 0x01) == 0;
>
> genesys_devices.c
> Add "| GENESYS_HAS_PAGE_LOADED_SW" to static Genesys_Model
> canon_lide_210_model
>
> scanbd.conf
> add an action with filter = "^page.*"
>
> I do not understand the code that well to make a real 5th button addition.
> In genesys_low.h the options are defined (e.g. #define
> GENESYS_HAS_PAGE_LOADED_SW (1 << 4)) and all the bits could be used up with
> all the definitions.  If it's portable we may have only 8 and they are used
> up.
>
> R/
> Michael
>
>
     Hello,

     this button is meant for document in detection. So using it like 
this is effectively an hack. What are the buttons label on your scanner, 
especially the one of this not yet supported button ?

Regards,
     Stef



More information about the sane-devel mailing list