[sane-devel] TPU functionality in epson2-backend.
m. allan noah
kitno455 at gmail.com
Wed Nov 30 15:53:25 UTC 2011
Are you sure you are really running your modified version of the
backend? have you enabled debugging at runtime?
allan
On Wed, Nov 30, 2011 at 8:07 AM, Martin Zackrisson
<martin.zackrisson at cmb.gu.se> wrote:
>
>
> On 11/29/2011 07:09 PM, m. allan noah wrote:
>>
>> I would suggest that you NOT start with making options and such.
>> Instead, just hard-code the call to set the data in the scanner,
>> whenever the tpu is enabled/disabled. Once you have that working, then
>> try to make it user selectable.
>
> I switched to that, thanks, but as far as I can see nothing happens.
> I don't get DBG to print anything either (I've grep:ed and googled and it
> points me to a non-existing file backend/sanei.h), so I really don't know if
> I've missed something in my code or if the code is not run.
> In principle I put my code after the else if, I even as you can see tried
> hard-coding using the standard range in place of the TPU one (quoted out) in
> epson2.c
>
> } else if (strcmp(TPU_STR, value) == 0) {
>
> /* enable full size scanning */
> activateOption(s, OPT_UNDEFINEDIMAGESIZE, &dummy);
>
> esci_set_undefinedimagesize(s, SANE_TRUE);
>
> s->hw->x_range = &s->hw->x_range;
> s->hw->y_range = &s->hw->y_range;
>
> /*s->hw->x_range = &s->hw->tpu_x_range;
> s->hw->y_range = &s->hw->tpu_y_range;*/
> s->hw->use_extension = SANE_TRUE;
>
>
> For completeness, again, below is the esci_set_undefined (tried various
> DBG-levels)
>
>
> /* Test implementation of ICAP_UNDEFINEDIMAGESIZE */
> SANE_Status
> esci_set_undefinedimagesize(Epson_Scanner * s, SANE_Bool x)
> {
> SANE_Status status;
>
> unsigned char handshake[2];
> SANE_Bool params[1];
>
> DBG(8, "%s: undefinedimagesize = %d\n", __func__, x);
>
> if (!s->hw->cmd->set_undefinedimagesize) {
> DBG(1, "%s: not supported\n", __func__);
> return SANE_STATUS_GOOD;
> }
>
> handshake[0] = s->hw->cmd->set_undefinedimagesize[0];
> handshake[1] = s->hw->cmd->set_undefinedimagesize[1];
>
> DBG(1, "Undefinedimagesize: %s%s set to %d?\t", handshake[0],
> handshake[1], x);
>
> status = e2_cmd_simple(s, handshake, 2);
> if (status != SANE_STATUS_GOOD)
> return status;
> DBG(1, "It was:%d\n:", status);
>
> params[0] = x;
> return e2_cmd_simple(s, params, 1);
>
> }
>
>
> --
> sane-devel mailing list: sane-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
> Unsubscribe: Send mail with subject "unsubscribe your_password"
> to sane-devel-request at lists.alioth.debian.org
--
"The truth is an offense, but not a sin"
More information about the sane-devel
mailing list