Hi,
after all it was probably not the best idea to dedicate all my open source time
to my
T2 Linux distribution (http://t2-project.org) and letting others commit to the
SANE/Avision backend.
Because, frankly, most scanners did not work anymore due of really stupid
regressions:
> - if (s->val[OPT_PAPERLEN].w)
> + if (s->val[OPT_PAPERLEN].w != SANE_FALSE) {
> set_double (cmd.window.descriptor.paper_length,
> (int)((double)30.0*1200));
> + }
The set_double macro does not include an own block scope, and to this always
sets
half of the paper_length WORD, seriously???
Beside I do not agree with this new option at all. It should definitely not be
a bool,
and instead specify the actual expected paper length, … (I leave that for
another day)
> /* Init the SANE option from the scanner inquiry data */
>
> - dev->x_range.max = SANE_FIX (
> (int)dev->inquiry_x_ranges[s->source_mode_dim]);
> - dev->x_range.quant = 0;
> - dev->y_range.max = SANE_FIX (
> (int)dev->inquiry_y_ranges[s->source_mode_dim]);
> - dev->y_range.quant = 0;
> -
> switch (dev->inquiry_asic_type) {
> case AV_ASIC_C2:
> dev->dpi_range.min = 100;
> @@ -6331,6 +6328,11 @@ init_options (Avision_Scanner* s)
> s->source_mode = match_source_mode (dev, s->val[OPT_SOURCE].s);
> s->source_mode_dim = match_source_mode_dim (s->source_mode);
>
> + dev->x_range.max = SANE_FIX (
> (int)dev->inquiry_x_ranges[s->source_mode_dim]);
> + dev->x_range.quant = 0;
> + dev->y_range.max = SANE_FIX (
> (int)dev->inquiry_y_ranges[s->source_mode_dim]);
> + dev->y_range.quant = 0;
> +
> /* resolution */
> s->opt[OPT_RESOLUTION].name = SANE_NAME_SCAN_RESOLUTION;
> s->opt[OPT_RESOLUTION].title = SANE_TITLE_SCAN_RESOLUTION;
Yeah, well, what should I say. At the point the range initializer
source_mode_dim was
not initialized. So for all ADF scanners (like nearly all Avision scanners form
the last decade)
this would result in random ranges (303 mm instead of 297 on the next best
Avision scanner
I had around).
At least now the scanner on my desk would scan again, and not randomly error
out early,
or deliver random pixel junk due out of bounds ranges, …
Please directly future patches to me, I will review them as I did between 1998
and 2008, …
I can not see my art being damaged like that.
René
--
ExactCODE GmbH, Lietzenburger Str. 42, DE-10789 Berlin
http://t2-project.org | http://rene.rebe.de
--
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org