diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2019-07-31 16:59:49 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2019-07-31 16:59:49 +0200 |
commit | 1687222e1b9e74c89cafbb5910e72d8ec7bfd40f (patch) | |
tree | d78102ce30207c63e7608eeba743efd680c888dc /backend/gt68xx.c | |
parent | 58912f68c2489bcee787599837447e0d64dfd61a (diff) |
New upstream version 1.0.28upstream/1.0.28
Diffstat (limited to 'backend/gt68xx.c')
-rw-r--r-- | backend/gt68xx.c | 43 |
1 files changed, 18 insertions, 25 deletions
diff --git a/backend/gt68xx.c b/backend/gt68xx.c index 13efe91..fb3bfb4 100644 --- a/backend/gt68xx.c +++ b/backend/gt68xx.c @@ -2,46 +2,46 @@ Copyright (C) 2002 Sergey Vlasov <vsu@altlinux.ru> Copyright (C) 2002 - 2007 Henning Geinitz <sane@geinitz.org> - Copyright (C) 2009 Stéphane Voltz <stef.dev@free.fr> for sheetfed + Copyright (C) 2009 Stéphane Voltz <stef.dev@free.fr> for sheetfed calibration code. This file is part of the SANE package. - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - + As a special exception, the authors of SANE give permission for additional uses of the libraries contained in this release of SANE. - + The exception is that, if you link a SANE library with other files to produce an executable, this does not by itself cause the resulting executable to be covered by the GNU General Public License. Your use of that executable is in no way restricted on account of linking the SANE library code into it. - + This exception does not, however, invalidate any other reasons why the executable file might be covered by the GNU General Public License. - + If you submit changes to SANE to the maintainers to be included in a subsequent release, you agree by submitting the changes that those changes may be distributed with this exception intact. If you write modifications of your own for SANE, it is your choice whether to permit this exception to apply to your modifications. - If you do not wish that, delete this exception notice. + If you do not wish that, delete this exception notice. */ /* @@ -162,13 +162,6 @@ static SANE_Range y_range = { SANE_FIX (0.0) /* quantization */ }; - -static const SANE_Range offset_range = { - -63, /* minimum */ - 63, /* maximum */ - 1 /* quantization */ -}; - static SANE_Range gamma_range = { SANE_FIX (0.01), /* minimum */ SANE_FIX (5.0), /* maximum */ @@ -756,7 +749,7 @@ init_options (GT68xx_Scanner * s) s->opt[OPT_SENSOR_GROUP].desc = SANE_DESC_SENSORS; s->opt[OPT_SENSOR_GROUP].type = SANE_TYPE_GROUP; s->opt[OPT_SENSOR_GROUP].constraint_type = SANE_CONSTRAINT_NONE; - + /* calibration needed */ s->opt[OPT_NEED_CALIBRATION_SW].name = "need-calibration"; s->opt[OPT_NEED_CALIBRATION_SW].title = SANE_I18N ("Need calibration"); @@ -1487,7 +1480,7 @@ sane_open (SANE_String_Const devicename, SANE_Handle * handle) DBG (0, "WARNING: Your scanner is not fully supported or at least \n"); DBG (0, " had only limited testing. Please be careful and \n"); DBG (0, " report any failure/success to \n"); - DBG (0, " sane-devel@lists.alioth.debian.org. Please provide as many\n"); + DBG (0, " sane-devel@alioth-lists.debian.net. Please provide as many\n"); DBG (0, " details as possible, e.g. the exact name of your\n"); DBG (0, " scanner and what does (not) work.\n"); } @@ -1502,7 +1495,7 @@ sane_open (SANE_String_Const devicename, SANE_Handle * handle) DBG (0, " the scanner immediately if you hear unusual noise. \n"); DBG (0, " Please report any success to \n"); - DBG (0, " sane-devel@lists.alioth.debian.org. Please provide as many\n"); + DBG (0, " sane-devel@alioth-lists.debian.net. Please provide as many\n"); DBG (0, " details as possible, e.g. the exact name of your\n"); DBG (0, " scanner, ids, settings etc.\n"); @@ -1616,7 +1609,7 @@ sane_close (SANE_Handle handle) gt68xx_device_lamp_control (s->dev, SANE_FALSE, SANE_FALSE); dev = s->dev; - + free (s->val[OPT_MODE].s); free (s->val[OPT_GRAY_MODE_COLOR].s); free (s->val[OPT_SOURCE].s); @@ -1624,7 +1617,7 @@ sane_close (SANE_Handle handle) free ((void *)(size_t)s->opt[OPT_RESOLUTION].constraint.word_list); gt68xx_scanner_free (s); - + gt68xx_device_fix_descriptor (dev); gt68xx_device_deactivate (dev); @@ -1859,7 +1852,7 @@ sane_control_option (SANE_Handle handle, SANE_Int option, status = gt68xx_sheetfed_scanner_calibrate (s); myinfo |= SANE_INFO_RELOAD_OPTIONS; break; - + case OPT_CLEAR_CALIBRATION: gt68xx_clear_calibration (s); myinfo |= SANE_INFO_RELOAD_OPTIONS; @@ -2045,14 +2038,14 @@ sane_start (SANE_Handle handle) { /* compute scan parameters */ scan_request.calculate = SANE_TRUE; - gt68xx_device_setup_scan (s->dev, &scan_request, SA_SCAN, &scan_params); + gt68xx_device_setup_scan (s->dev, &scan_request, SA_SCAN, &scan_params); /* restore settings from calibration stored */ memcpy(s->dev->afe,&(s->afe_params), sizeof(GT68xx_AFE_Parameters)); RIE (gt68xx_assign_calibration (s, scan_params)); scan_request.calculate = SANE_FALSE; } - + /* send scan request to the scanner */ RIE (gt68xx_scanner_start_scan (s, &scan_request, &scan_params)); @@ -2331,7 +2324,7 @@ sane_cancel (SANE_Handle handle) if (s->dev->model->flags & GT68XX_FLAG_SHEET_FED) { gt68xx_device_paperfeed (s->dev); - } + } else { sanei_usb_set_timeout (SHORT_TIMEOUT); |