add GT68XX_FLAG_HAS_CALIBRATE flag

- add a flag to handle the case of sheetfed scanners that will be
  calibrated using a dedicated function that uses an external
  calibration sheet
- enable image OPT_QUALITY_CAL for scanners with
  GT68XX__FLAG_HAS_CALIBRATE
merge-requests/1/head
Stphane Voltz 2009-11-11 07:46:34 +01:00
rodzic 1d2d8e005c
commit f67da24316
2 zmienionych plików z 10 dodań i 2 usunięć

Wyświetl plik

@ -638,7 +638,9 @@ init_options (GT68xx_Scanner * s)
s->val[OPT_QUALITY_CAL].w = SANE_TRUE;
if (!debug_options)
DISABLE (OPT_QUALITY_CAL);
if (s->dev->model->flags & GT68XX_FLAG_SHEET_FED)
/* we disable image correction for scanners that can't calibrate */
if ((s->dev->model->flags & GT68XX_FLAG_SHEET_FED)
&&(!(s->dev->model->flags & GT68XX_FLAG_HAS_CALIBRATE)))
{
s->val[OPT_QUALITY_CAL].w = SANE_FALSE;
DISABLE (OPT_QUALITY_CAL);
@ -1833,7 +1835,11 @@ sane_start (SANE_Handle handle)
else
scan_request.backtrack_lines = 0;
RIE (gt68xx_scanner_calibrate (s, &scan_request));
/* don't call calibration for scanners that use sheetfed_calibrate */
if(!(s->dev->model->flags & GT68XX_FLAG_HAS_CALIBRATE))
{
RIE (gt68xx_scanner_calibrate (s, &scan_request));
}
/* some sheetfed scanners need a special operation to move

Wyświetl plik

@ -113,6 +113,8 @@
#define GT68XX_FLAG_USE_OPTICAL_X (1 << 10) /* Use optical xdpi for 50 dpi and below */
#define GT68XX_FLAG_ALWAYS_LINEMODE (1 << 11) /* Linemode must be used for any resolution */
#define GT68XX_FLAG_SHEET_FED (1 << 12) /* we have a sheet fed scanner */
#define GT68XX_FLAG_HAS_CALIBRATE (1 << 13) /* for sheet fed scanners that be calibrated with
an calibration sheet */
/* Forward typedefs */
typedef struct GT68xx_USB_Device_Entry GT68xx_USB_Device_Entry;