<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <br>
    On 11/22/2011 02:12 AM, m. allan noah wrote:
    <blockquote
cite="mid:CAKO8m0DsjS8yKhBRKRtDDER1vsp1rsWUMW5YgUei44EEOQjzGg@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      Sane is free/open source software. Take a spin thru the backend,
      and see if you can find a good place to send this command.<br>
      <br>
      allan<br>
      <br>
      <br>
    </blockquote>
    <br>
    I've dug through the code and made copy/paste/rename adjustments
    everywhere it seemed reasonable (first day with c-code...). This
    will probably more show how lost I am than anything else, but below
    are the diffs for all files I've been poking around (don't think I
    forgot any). I think my main issue is that I have no clue how to
    connect the static that I made (SANE_EPSON_CAP_FULL_SENSOR_IN_TPU)
    to what is being sent in the scanner in "define
    esci_set_full_sensor(s,v)            e2_esc_cmd(
    s,(s)->hw->cmd->set_full_sensor, v)". That is to give
    set_full_sensor the value of SANE_EPSON_CAP_FULL_SENSOR_IN_TPU.<br>
    <br>
    /Martin<br>
    <br>
    ***epson2.h<br>
    <br>
    100,102d99<br>
    < /* undocumented sensor feature for V700 */<br>
    < #define SANE_EPSON_CAP_FULL_SENSOR_IN_TPU   0x803D<br>
    < <br>
    224d220<br>
    <     unsigned char set_full_sensor; /* For scanning the full
    area in TPU on V700*/<br>
    267d262<br>
    <     OPT_FULL_SENSOR,<br>
    346d340<br>
    <     SANE_Bool sensorSupport; /* does the scanner have support
    for full sensor mode when TPU is source? */<br>
    400d393<br>
    <     SANE_Bool fullSensor;<br>
    <br>
    <br>
    <br>
    ***epson2.c<br>
    <br>
    1341,1354d1340<br>
    <     /* full sensor in TPU */<br>
    <     s->opt[OPT_FULL_SENSOR].name = "full-sensor";<br>
    <     s->opt[OPT_FULL_SENSOR].title = SANE_I18N("TPU sensor
    modes");<br>
    <     s->opt[OPT_FULL_SENSOR].desc = SANE_I18N("In TPU mode
    some scanners (e.g. V700) reduce the max parameters for the scanning
    area. This option by-passes that 'functionality'");<br>
    <     s->opt[OPT_FULL_SENSOR].type = SANE_TYPE_BOOL;<br>
    <     s->val[OPT_FULL_SENSOR].w = SANE_FALSE;<br>
    < <br>
    <     s->opt[OPT_FULL_SENSOR].cap |= SANE_CAP_ADVANCED;<br>
    < <br>
    <     if (s->hw->sensorSupport == SANE_TRUE)<br>
    <         s->opt[OPT_FULL_SENSOR].cap &=
    ~SANE_CAP_INACTIVE;<br>
    <     else<br>
    <         s->opt[OPT_FULL_SENSOR].cap |= SANE_CAP_INACTIVE;<br>
    < <br>
    1637d1622<br>
    <     case OPT_FULL_SENSOR:<br>
    1731d1715<br>
    <     /*s->fullSensor = SANE_FALSE;     since this option
    isn't documented best not always activate */<br>
    1751,1752d1734<br>
    <         deactivateOption(s, OPT_FULL_SENSOR, &dummy);<br>
    < <br>
    1769,1776d1750<br>
    <         /* enable full size scanning */<br>
    <         if (s->hw->cmd->set_full_sensor != 0) {<br>
    <             s->hw->x_range = &s->hw->x_range;<br>
    <             s->hw->y_range = &s->hw->y_range;<br>
    <             activateOption(s, OPT_FULL_SENSOR, &dummy);<br>
    <         } else {<br>
    <             deactivateOption(s, OPT_FULL_SENSOR, &dummy);<br>
    <         }<br>
    1799d1772<br>
    <         deactivateOption(s, OPT_FULL_SENSOR, &dummy);<br>
    1986d1958<br>
    <     case OPT_FULL_SENSOR:<br>
    <br>
    <br>
    ***epson2-commands.h<br>
    <br>
    32d31<br>
    < #define esci_set_full_sensor(s,v)            e2_esc_cmd(
    s,(s)->hw->cmd->set_full_sensor, v)<br>
    <br>
    <br>
    ***epson2-ops.c<br>
    <br>
    762,766d761<br>
    <     /* There should be a proper way to test if scanner supports<br>
    <        full sensor mode */<br>
    < <br>
    <     dev->sensorSupport = SANE_TRUE;<br>
    < <br>
    774d768<br>
    < <br>
    1001,1009d994<br>
    <         if (s->hw->sensorSupport == SANE_TRUE) {<br>
    <             if (s->val[OPT_FULL_SENSOR].w == SANE_FALSE) {<br>
    <                 DBG(1, "setting sensor to capture full area");<br>
    <                 esci_set_full_sensor(s, SANE_TRUE);<br>
    <             } else {<br>
    <                 DBG(1, "setting sensor to standard capture
    area");<br>
    <                 esci_set_full_sensor(s, SANE_FALSE);<br>
    <             }<br>
    <         }<br>
    1081,1087d1065<br>
    <         if (status != SANE_STATUS_GOOD)<br>
    <             return status;<br>
    <     }<br>
    < <br>
    <     if (SANE_OPTION_IS_ACTIVE(s->opt[OPT_FULL_SENSOR].cap))
    {<br>
    <         status = esci_set_full_sensor(s,
    s->val[OPT_FULL_SENSOR].w);<br>
    < <br>
    <br>
    <br>
    <br>
  </body>
</html>