tune HP2400/G2410 settings for genesys backend

merge-requests/1/head
Stphane Voltz 2010-02-28 07:07:35 +01:00
rodzic 1903d646b2
commit 00da89b379
4 zmienionych plików z 28 dodań i 14 usunięć

Wyświetl plik

@ -1,3 +1,7 @@
2010-02-28 Stéphane Voltz <stef.dev at free.fr>
* backend/genesys_devices.c backend/genesys_gl646.c
backend/genesys_gl646.h: tune HP2400/G2410 settings
2010-02-27 Chris Bagwell <chris at cnpbagwell dot com>
* Rerun autoconf/automake to align files to single version
of tools.

Wyświetl plik

@ -570,7 +570,7 @@ static Genesys_Motor Motor[] = {
},
{MOTOR_HP2400, /* HP 2400c */
1200,
1200,
2400,
1,
1,
{{{
@ -962,7 +962,7 @@ Genesys_Model hp2400c_model = {
SANE_FIX (0.0), /* Amount of feeding needed to eject document
after finishing scanning in mm */
0, 12, 24, /* RGB CCD Line-distance correction in pixel */
0, 24, 48, /* RGB CCD Line-distance correction in pixel */
COLOR_ORDER_BGR, /* Order of the CCD/CIS colors */
@ -975,10 +975,12 @@ Genesys_Model hp2400c_model = {
GENESYS_FLAG_UNTESTED /* not fully working yet */
| GENESYS_FLAG_LAZY_INIT
| GENESYS_FLAG_14BIT_GAMMA
| GENESYS_FLAG_XPA
| GENESYS_FLAG_DARK_CALIBRATION
| GENESYS_FLAG_OFFSET_CALIBRATION
| GENESYS_FLAG_SKIP_WARMUP
| GENESYS_FLAG_STAGGERED_LINE
| GENESYS_FLAG_CUSTOM_GAMMA,
GENESYS_HAS_NO_BUTTONS, /* no buttons supported */
20,
132
};

Wyświetl plik

@ -992,8 +992,8 @@ gl646_setup_registers (Genesys_Device * dev,
stagger = 0;
if ((!half_ccd) && (dev->model->flags & GENESYS_FLAG_STAGGERED_LINE))
{
/* for CCD_HP3670, stagger happens only at >=1200 dpi */
if(dev->model->motor_type != MOTOR_HP3670 || scan_settings.yres >= dev->sensor.optical_res)
/* for HP3670, stagger happens only at >=1200 dpi */
if((dev->model->motor_type != MOTOR_HP3670 && dev->model->motor_type != MOTOR_HP2400)|| scan_settings.yres >= dev->sensor.optical_res)
{
stagger = (4 * scan_settings.yres) / dev->motor.base_ydpi;
}
@ -5095,6 +5095,7 @@ gl646_update_hardware_sensors (Genesys_Scanner * session)
session->val[OPT_SCAN_SW].b = (value == 0x6c);
break;
case GPO_HP3670:
case GPO_HP2400:
session->val[OPT_SCAN_SW].b = ((value & 0x20) == 0);
break;
default:
@ -5112,6 +5113,7 @@ gl646_update_hardware_sensors (Genesys_Scanner * session)
session->val[OPT_EMAIL_SW].b = (value == 0x12);
break;
case GPO_HP3670:
case GPO_HP2400:
session->val[OPT_EMAIL_SW].b = ((value & 0x08) == 0);
break;
default:
@ -5132,6 +5134,7 @@ gl646_update_hardware_sensors (Genesys_Scanner * session)
session->val[OPT_COPY_SW].b = (value == 0x5c);
break;
case GPO_HP3670:
case GPO_HP2400:
session->val[OPT_COPY_SW].b = ((value & 0x10) == 0);
break;
default:
@ -5188,6 +5191,7 @@ gl646_update_hardware_sensors (Genesys_Scanner * session)
switch (dev->model->gpo_type)
{
case GPO_HP3670:
case GPO_HP2400:
/* test if XPA is plugged-in */
if ((value & 0x40) == 0)
{
@ -5300,7 +5304,7 @@ gl646_is_compatible_calibration (Genesys_Device * dev,
for_overwrite);
/* calibration caching not supported yet for HP3670 */
if (cache == NULL || dev->model->ccd_type == CCD_HP3670)
if (cache == NULL || dev->model->ccd_type == CCD_HP3670 || dev->model->ccd_type == CCD_HP2400)
return SANE_STATUS_UNSUPPORTED;
/* build minimal current_setup for calibration cache use only, it will be better

Wyświetl plik

@ -460,6 +460,10 @@ static Sensor_Master sensor_master[] = {
{CCD_HP2400, 100, SANE_TRUE , 100, 7211, 400, 4, 42, NULL, SANE_FALSE, 0x3f, 0x02},
{CCD_HP2400, 300, SANE_TRUE , 300, 8751, 1200, 4, 42, NULL, SANE_FALSE, 0x3f, 0x02},
{CCD_HP2400, 600, SANE_TRUE , 1200, 18760, 1200, 2, 42, NULL, SANE_FALSE, 0x3f, 0x02},
{CCD_HP2400, 50, SANE_FALSE, 50, 675, 200, 4, 42, NULL, SANE_FALSE, 0x3f, 0x02},
{CCD_HP2400, 100, SANE_FALSE, 100, 7211, 400, 4, 42, NULL, SANE_FALSE, 0x3f, 0x02},
{CCD_HP2400, 300, SANE_FALSE, 300, 8751, 1200, 4, 42, NULL, SANE_FALSE, 0x3f, 0x02},
{CCD_HP2400, 600, SANE_FALSE, 1200, 18760, 1200, 2, 42, NULL, SANE_FALSE, 0x3f, 0x02},
/* XP 200 master settings */
{CIS_XP200 , 75, SANE_TRUE , 75, 5700, 75, 1, 42, xp200_color, SANE_FALSE, 0x00, 0x11},
@ -536,14 +540,14 @@ static Motor_Master motor_master[] = {
{MOTOR_HP3670,2400, SANE_TRUE ,2400, HALF_STEP, SANE_FALSE, SANE_TRUE , 0, 3, 15937, 12750, 192, 3399, 337, 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},
{MOTOR_HP2400, 100, SANE_TRUE , 100, FULL_STEP, SANE_FALSE, SANE_TRUE, 63, 120, 8736, 601, 120, 4905, 337, 0.30, 0.4, 192},
{MOTOR_HP2400, 300, SANE_TRUE , 300, HALF_STEP, SANE_FALSE, SANE_TRUE , 63, 32, 16703, 2188, 120, 4905, 337, 0.25, 0.5, 16},
{MOTOR_HP2400, 600, SANE_TRUE , 600, FULL_STEP, SANE_FALSE, SANE_TRUE , 63, 3, 18761, 18761, 16, 4905, 627, 0.25, 0.5, 16},
{MOTOR_HP2400, 50, SANE_FALSE, 50, HALF_STEP, SANE_FALSE, SANE_FALSE, 63, 4, 1382, 800, 2, 5400, 5400, 0.25, 0.5, 16},
{MOTOR_HP2400, 100, SANE_FALSE, 100, FULL_STEP, SANE_FALSE, SANE_TRUE, 63, 120, 8736, 601, 120, 4905, 337, 0.30, 0.4, 192},
{MOTOR_HP2400, 300, SANE_FALSE, 300, HALF_STEP, SANE_FALSE, SANE_TRUE , 63, 32, 16703, 2188, 120, 4905, 337, 0.25, 0.5, 16},
{MOTOR_HP2400, 600, SANE_FALSE, 600, FULL_STEP, SANE_FALSE, SANE_TRUE , 63, 3, 18761, 18761, 16, 4905, 627, 0.25, 0.5, 16},
{MOTOR_HP2400, 50, SANE_TRUE , 50, HALF_STEP, SANE_FALSE, SANE_FALSE, 63, 4, 1382, 800, 192, 4905, 337, 0.30, 0.4, 192},
{MOTOR_HP2400, 100, SANE_TRUE , 100, FULL_STEP, SANE_FALSE, SANE_TRUE, 63, 120, 8736, 601, 192, 4905, 337, 0.30, 0.4, 192},
{MOTOR_HP2400, 300, SANE_TRUE , 300, HALF_STEP, SANE_FALSE, SANE_TRUE , 63, 32, 16703, 2188, 192, 4905, 337, 0.30, 0.4, 192},
{MOTOR_HP2400, 600, SANE_TRUE , 600, FULL_STEP, SANE_FALSE, SANE_TRUE , 63, 3, 18761, 18761, 192, 4905, 627, 0.30, 0.4, 192},
{MOTOR_HP2400, 50, SANE_FALSE, 50, HALF_STEP, SANE_FALSE, SANE_FALSE, 63, 4, 1382, 800, 192, 4905, 337, 0.30, 0.4, 192},
{MOTOR_HP2400, 100, SANE_FALSE, 100, FULL_STEP, SANE_FALSE, SANE_TRUE, 63, 120, 8736, 601, 192, 4905, 337, 0.30, 0.4, 192},
{MOTOR_HP2400, 300, SANE_FALSE, 300, HALF_STEP, SANE_FALSE, SANE_TRUE , 63, 32, 16703, 2188, 192, 4905, 337, 0.30, 0.4, 192},
{MOTOR_HP2400, 600, SANE_FALSE, 600, FULL_STEP, SANE_FALSE, SANE_TRUE , 63, 3, 18761, 18761, 192, 4905, 337, 0.30, 0.4, 192},
/* XP 200 motor settings */
{MOTOR_XP200, 75, SANE_TRUE, 75, HALF_STEP, SANE_TRUE , SANE_FALSE, 0, 4, 6000, 2136, 8, 12000, 1200, 0.3, 0.5, 1},