From 561bcd09a9f13a11a82500c0f0b29923182ef669 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Voltz?= Date: Tue, 28 Sep 2010 21:36:02 +0200 Subject: [PATCH] add test value for G4010 --- backend/genesys.conf.in | 3 +++ backend/genesys_devices.c | 53 +++++++++++++++++++++++++++++++++++++++ backend/genesys_gl843.c | 3 ++- 3 files changed, 58 insertions(+), 1 deletion(-) diff --git a/backend/genesys.conf.in b/backend/genesys.conf.in index 68742dce2..3d883546a 100644 --- a/backend/genesys.conf.in +++ b/backend/genesys.conf.in @@ -84,5 +84,8 @@ usb 0x04a7 0x04ac # Panasonic KV-SS080 usb 0x04da 0x100f +# Hewlett Packard ScanJet G4010 +usb 0x03f0 0x4505 + # Hewlett Packard ScanJet G4050 usb 0x03f0 0x4605 diff --git a/backend/genesys_devices.c b/backend/genesys_devices.c index a2fc2ebeb..773ca8644 100644 --- a/backend/genesys_devices.c +++ b/backend/genesys_devices.c @@ -1048,6 +1048,58 @@ static Genesys_Model panasonic_kvss080_model = { 100 }; +static Genesys_Model hpg4010_model = { + "hewlett-packard-scanjet-g4010", /* Name */ + "Hewlett Packard", /* Device vendor string */ + "ScanJet G4010", /* Device model name */ + GENESYS_GL843, + NULL, + + { /* 4800, 2400, 1200, 800, 600, 400, */ 300, 200, 0}, + { /* 4800, 2400, 1200, 800, 600, 400, */ 300, 200, 0}, + {16, 8, 0}, /* possible depths in gray mode */ + {16, 8, 0}, /* possible depths in color mode */ + + SANE_FIX (6.55), /* Start of scan area in mm (x) */ + SANE_FIX (15.00), /* Start of scan area in mm (y) */ + SANE_FIX (223.0), /* Size of scan area in mm (x) */ + SANE_FIX (315.0), /* Size of scan area in mm (y) */ + + SANE_FIX (3.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) */ + SANE_FIX (0.0), /* Start of scan area in TA mode in mm (y) */ + SANE_FIX (100.0), /* Size of scan area in TA mode in mm (x) */ + SANE_FIX (100.0), /* Size of scan area in TA mode in mm (y) */ + + SANE_FIX (0.0), /* Start of white strip in TA mode in mm (y) */ + + SANE_FIX (0.0), /* Size of scan area after paper sensor stops + sensing document in mm */ + SANE_FIX (0.0), /* Amount of feeding needed to eject document + after finishing scanning in mm */ + + 0, 32, 48, /* RGB CCD Line-distance correction in pixel */ + + COLOR_ORDER_RGB, /* Order of the CCD/CIS colors */ + + SANE_FALSE, /* Is this a CIS scanner? */ + SANE_FALSE, /* Is this a sheetfed scanner? */ + CCD_G4050, + DAC_G4050, + GPO_G4050, + MOTOR_G4050, + GENESYS_FLAG_NO_CALIBRATION | + GENESYS_FLAG_LAZY_INIT | /* Which flags are needed for this scanner? */ + GENESYS_FLAG_SKIP_WARMUP | + GENESYS_FLAG_OFFSET_CALIBRATION | + GENESYS_FLAG_CUSTOM_GAMMA, + GENESYS_HAS_SCAN_SW | GENESYS_HAS_FILE_SW | GENESYS_HAS_COPY_SW, + 280, + 400 +}; + static Genesys_Model hpg4050_model = { "hewlett-packard-scanjet-g4050", /* Name */ "Hewlett Packard", /* Device vendor string */ @@ -2351,6 +2403,7 @@ static Genesys_USB_Device_Entry genesys_usb_device_list[] = { {0x04a9, 0x1906, &canon_5600f_model}, /* GL843 devices */ {0x04da, 0x100f, &panasonic_kvss080_model}, + {0x03f0, 0x4505, &hpg4010_model}, {0x03f0, 0x4605, &hpg4050_model}, {0, 0, NULL} }; diff --git a/backend/genesys_gl843.c b/backend/genesys_gl843.c index 69d590fda..a6f934ed4 100644 --- a/backend/genesys_gl843.c +++ b/backend/genesys_gl843.c @@ -3513,7 +3513,8 @@ gl843_init_gpio (Genesys_Device * dev) RIE (sanei_genesys_write_register (dev, REG6F, dev->gpo.enable[1])); RIE (sanei_genesys_write_register (dev, REG6C, dev->gpo.value[0])); RIE (sanei_genesys_write_register (dev, REG6D, dev->gpo.value[1])); - if (strcmp (dev->model->name, "hewlett-packard-scanjet-g4050") == 0) + if ((strcmp (dev->model->name, "hewlett-packard-scanjet-g4010") == 0) + || (strcmp (dev->model->name, "hewlett-packard-scanjet-g4050") == 0)) { i = 0; }