From cfcccda5df2bea9077827a4792217d477e546b30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Voltz?= Date: Fri, 26 Feb 2010 21:46:19 +0100 Subject: [PATCH] fix 1200 dpi stagger effect for HP3670 - fix motor information for 1200 dpi mode for HP3670 - fix motor max resolution for HP3670 - handle stagger effect for HP3670 --- backend/genesys_devices.c | 5 ++--- backend/genesys_gl646.c | 13 +++++++++---- backend/genesys_gl646.h | 6 ++++-- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/backend/genesys_devices.c b/backend/genesys_devices.c index cac51d489..5ebf4f7f3 100644 --- a/backend/genesys_devices.c +++ b/backend/genesys_devices.c @@ -551,7 +551,7 @@ static Genesys_Motor Motor[] = { },},}, }, {MOTOR_HP3670, /* HP 3670 */ - 600, + 1200, 1200, 1, 1, @@ -1085,8 +1085,7 @@ static Genesys_Model hp3670c_model = { | GENESYS_FLAG_DARK_CALIBRATION | GENESYS_FLAG_OFFSET_CALIBRATION | GENESYS_FLAG_SKIP_WARMUP - /* | GENESYS_FLAG_NO_CALIBRATION */ - /* | GENESYS_FLAG_STAGGERED_LINE */ + | GENESYS_FLAG_STAGGERED_LINE | GENESYS_FLAG_CUSTOM_GAMMA, GENESYS_HAS_COPY_SW | GENESYS_HAS_EMAIL_SW | GENESYS_HAS_SCAN_SW, 20, diff --git a/backend/genesys_gl646.c b/backend/genesys_gl646.c index d1b469706..b1ae4d072 100644 --- a/backend/genesys_gl646.c +++ b/backend/genesys_gl646.c @@ -989,13 +989,18 @@ gl646_setup_registers (Genesys_Device * dev, } /* at QUATER_STEP lines are 'staggered' and need correction */ + stagger = 0; if ((!half_ccd) && (dev->model->flags & GENESYS_FLAG_STAGGERED_LINE)) { - stagger = (4 * scan_settings.yres) / dev->motor.base_ydpi; - linecnt += stagger; + /* for CCD_HP3670, stagger happens only at 1200 dpi */ + if(dev->model->motor_type != MOTOR_HP3670 + || scan_settings.yres >= dev->sensor.optical_res) + { + stagger = (4 * scan_settings.yres) / dev->motor.base_ydpi; + } } - else - stagger = 0; + linecnt += stagger; + DBG (DBG_info, "gl646_setup_registers : max_shift=%d, stagger=%d lines\n", max_shift, stagger); diff --git a/backend/genesys_gl646.h b/backend/genesys_gl646.h index a13bbf4be..8190b8c01 100644 --- a/backend/genesys_gl646.h +++ b/backend/genesys_gl646.h @@ -523,13 +523,15 @@ static Motor_Master motor_master[] = { {MOTOR_HP3670, 150, SANE_TRUE , 150, HALF_STEP, SANE_FALSE, SANE_TRUE , 1, 73, 3429, 305, 192, 3399, 341, 0.3, 0.4, 192}, {MOTOR_HP3670, 300, SANE_TRUE , 300, HALF_STEP, SANE_FALSE, SANE_TRUE , 1, 11, 1055, 563, 192, 3399, 341, 0.3, 0.4, 192}, {MOTOR_HP3670, 600, SANE_TRUE , 600, FULL_STEP, SANE_FALSE, SANE_TRUE , 0, 3, 10687, 5126, 192, 3399, 341, 0.3, 0.4, 192}, - {MOTOR_HP3670,1200, SANE_TRUE ,1200, HALF_STEP, SANE_FALSE, SANE_TRUE , 0, 3, 15937, 7968, 192, 3399, 337, 0.3, 0.4, 192}, + {MOTOR_HP3670,1200, SANE_TRUE ,1200, FULL_STEP, SANE_FALSE, SANE_TRUE , 0, 3, 15937, 7968, 192, 3399, 337, 0.3, 0.4, 192}, + {MOTOR_HP3670,2400, SANE_TRUE ,2400, HALF_STEP, SANE_FALSE, SANE_TRUE , 0, 3, 15937, 7968, 192, 3399, 337, 0.3, 0.4, 192}, {MOTOR_HP3670, 75, SANE_FALSE, 75, FULL_STEP, SANE_FALSE, SANE_TRUE , 1, 200, 3429, 305, 192, 3399, 337, 0.3, 0.4, 192}, {MOTOR_HP3670, 100, SANE_FALSE, 100, HALF_STEP, SANE_FALSE, SANE_TRUE , 1, 143, 2905, 187, 192, 3399, 337, 0.3, 0.4, 192}, {MOTOR_HP3670, 150, SANE_FALSE, 150, HALF_STEP, SANE_FALSE, SANE_TRUE , 1, 73, 3429, 305, 192, 3399, 341, 0.3, 0.4, 192}, {MOTOR_HP3670, 300, SANE_FALSE, 300, HALF_STEP, SANE_FALSE, SANE_TRUE , 1, 11, 1055, 563, 192, 3399, 341, 0.3, 0.4, 192}, {MOTOR_HP3670, 600, SANE_FALSE, 600, FULL_STEP, SANE_FALSE, SANE_TRUE , 0, 3, 10687, 5126, 192, 3399, 341, 0.3, 0.4, 192}, - {MOTOR_HP3670,1200, SANE_FALSE,1200, HALF_STEP, SANE_FALSE, SANE_TRUE , 0, 3, 12751,12751, 192, 3399, 341, 0.3, 0.4, 192}, + {MOTOR_HP3670,1200, SANE_FALSE,1200, FULL_STEP, SANE_FALSE, SANE_TRUE , 0, 3, 12751,12751, 192, 3399, 341, 0.3, 0.4, 192}, + {MOTOR_HP3670,2400, SANE_FALSE,2400, HALF_STEP, SANE_FALSE, SANE_TRUE , 0, 3, 12751,12751, 192, 3399, 341, 0.3, 0.4, 192}, /* HP2400/G2410 motor settings base motor dpi = 600 */ {MOTOR_HP2400, 50, SANE_TRUE , 50, HALF_STEP, SANE_FALSE, SANE_FALSE, 63, 4, 1382, 800, 2, 5400, 5400, 0.25, 0.5, 16},