From d8552eb4adc74c0de7e057c46308319e2f35f30f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Voltz?= Date: Fri, 24 Dec 2010 08:41:15 +0100 Subject: [PATCH] GL124 shading area tuning --- backend/genesys_devices.c | 6 +++--- backend/genesys_gl124.c | 13 +++++++++---- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/backend/genesys_devices.c b/backend/genesys_devices.c index 3dbe9dd6b..aec11df03 100644 --- a/backend/genesys_devices.c +++ b/backend/genesys_devices.c @@ -1271,7 +1271,7 @@ static Genesys_Model canon_lide_110_model = { SANE_FIX (213.80), /* Size of scan area in mm (x) */ SANE_FIX (297.0), /* Size of scan area in mm (y) */ - SANE_FIX (0.0), /* Start of white strip in mm (y) */ + SANE_FIX (1.0), /* Start of white strip in mm (y) */ SANE_FIX (0.0), /* Start of black mark in mm (x) */ SANE_FIX (0.0), /* Start of scan area in TA mode in mm (x) */ @@ -1301,7 +1301,7 @@ static Genesys_Model canon_lide_110_model = { | GENESYS_FLAG_DARK_CALIBRATION | GENESYS_FLAG_CUSTOM_GAMMA, GENESYS_HAS_SCAN_SW | GENESYS_HAS_COPY_SW | GENESYS_HAS_EMAIL_SW | GENESYS_HAS_FILE_SW, - 60, + 50, 400 }; @@ -1353,7 +1353,7 @@ static Genesys_Model canon_lide_210_model = { | GENESYS_FLAG_DARK_CALIBRATION | GENESYS_FLAG_CUSTOM_GAMMA, GENESYS_HAS_SCAN_SW | GENESYS_HAS_COPY_SW | GENESYS_HAS_EMAIL_SW | GENESYS_HAS_FILE_SW, - 60, + 50, 400 }; diff --git a/backend/genesys_gl124.c b/backend/genesys_gl124.c index 28361987f..9188842b6 100644 --- a/backend/genesys_gl124.c +++ b/backend/genesys_gl124.c @@ -2593,9 +2593,14 @@ gl124_init_regs_for_shading (Genesys_Device * dev) resolution=gl124_compute_dpihw(dev,dev->settings.xres); dev->calib_pixels = (dev->sensor.sensor_pixels*resolution)/dev->sensor.optical_res; - /* distance to move to reach white target */ - move = SANE_UNFIX (dev->model->y_offset_calib); - move = (move * resolution) / MM_PER_INCH; + /* distance to move to reach white target at high resolution */ + move=0; + if(3*dev->settings.yres>=1200) + { + move = SANE_UNFIX (dev->model->y_offset_calib); + move = (move * (dev->motor.base_ydpi/4)) / MM_PER_INCH; + } + DBG (DBG_io, "%s: move=%d steps\n", __FUNCTION__, move); status = gl124_init_scan_regs (dev, dev->calib_reg, @@ -2722,7 +2727,7 @@ gl124_init_regs_for_scan (Genesys_Device * dev) move = SANE_UNFIX (dev->model->y_offset); move += dev->settings.tl_y; move = (move * move_dpi) / MM_PER_INCH; - DBG (DBG_info, "gl124_init_regs_for_scan: move=%f steps\n", move); + DBG (DBG_info, "%s: move=%f steps\n", __FUNCTION__, move); if(channels*dev->settings.yres>=1200 && move>3000) {