Add post_scan and eject_feed to struct Genesys_Model

merge-requests/1/head
Pierre Willenbrock 2009-02-23 14:12:20 +00:00
rodzic 3846396eff
commit 271e9cf317
4 zmienionych plików z 85 dodań i 16 usunięć

Wyświetl plik

@ -1,3 +1,8 @@
2009-02-23 Pierre Willenbrock <pierre@pirsoft.dnsalias.org>
* backend/genesys_devices.c, backend/genesys_gl841.c,
backend/genesys_low.h: Add post_scan and eject_feed to struct
Genesys_Model
2009-02-23 Jonathan Bravo Lopez <jkdsoft@gmail.com>
backend/hp3900_config.c: Fix area of negative/slide scans for
HP ScanJet G3110.

Wyświetl plik

@ -527,6 +527,11 @@ static Genesys_Model umax_astra_4500_model = {
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, 8, 16, /* RGB CCD Line-distance correction in pixel */
COLOR_ORDER_BGR, /* Order of the CCD/CIS colors */
@ -571,6 +576,11 @@ static Genesys_Model canon_lide_50_model = {
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, 0, 0, /* RGB CCD Line-distance correction in pixel */
COLOR_ORDER_RGB, /* Order of the CCD/CIS colors */
@ -621,6 +631,11 @@ static Genesys_Model canon_lide_60_model = {
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, 0, 0, /* RGB CCD Line-distance correction in pixel */
COLOR_ORDER_RGB, /* Order of the CCD/CIS colors */
@ -669,6 +684,11 @@ static Genesys_Model hp2300c_model = {
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 */
16, 8, 0, /* RGB CCD Line-distance correction in pixel */
COLOR_ORDER_RGB, /* Order of the CCD/CIS colors */
@ -719,6 +739,11 @@ Genesys_Model hp2400c_model = {
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, 0, 0, /* RGB CCD Line-distance correction in pixel */
COLOR_ORDER_BGR, /* Order of the CCD/CIS colors */
@ -771,6 +796,11 @@ Genesys_Model visioneer_xp200_model = {
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, 0, 0, /* RGB CCD Line-distance correction in pixel */
COLOR_ORDER_RGB, /* Order of the CCD/CIS colors */
@ -818,6 +848,11 @@ static Genesys_Model hp3670c_model = {
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, 8, 16, /* RGB CCD Line-distance correction in pixel */
COLOR_ORDER_BGR, /* Order of the CCD/CIS colors */
@ -862,6 +897,11 @@ static Genesys_Model plustek_st12_model = {
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, 8, 16, /* RGB CCD Line-distance correction in pixel */
COLOR_ORDER_BGR, /* Order of the CCD/CIS colors */
@ -905,6 +945,11 @@ static Genesys_Model plustek_st24_model = {
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, 8, 16, /* RGB CCD Line-distance correction in pixel */
COLOR_ORDER_BGR, /* Order of the CCD/CIS colors */
@ -953,6 +998,11 @@ static Genesys_Model medion_md5345_model = {
SANE_FIX (0.00), /* 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 */
48, 24, 0, /* RGB CCD Line-distance correction in pixel */
COLOR_ORDER_RGB, /* Order of the CCD/CIS colors */
@ -990,7 +1040,7 @@ static Genesys_Model visioneer_xp300_model = {
{16, 8, 0}, /* possible depths in color mode */
SANE_FIX (0.0), /* Start of scan area in mm (x) */
SANE_FIX (3.0), /* Start of scan area in mm (y) */
SANE_FIX (1.0), /* Start of scan area in mm (y) */
SANE_FIX (435.0), /* Size of scan area in mm (x) */
SANE_FIX (511), /* Size of scan area in mm (y) */
@ -1004,6 +1054,12 @@ static Genesys_Model visioneer_xp300_model = {
SANE_FIX (0.0), /* Start of white strip in TA mode in mm (y) */
SANE_FIX (26.5), /* Size of scan area after paper sensor stops
sensing document in mm */
/* this is larger than needed -- accounts for second sensor head, which is a
calibration item */
SANE_FIX (0.0), /* Amount of feeding needed to eject document
after finishing scanning in mm */
0, 0, 0, /* RGB CCD Line-distance correction in pixel */
COLOR_ORDER_RGB, /* Order of the CCD/CIS colors */

Wyświetl plik

@ -3343,7 +3343,8 @@ gl841_eject_document (Genesys_Device * dev)
int i;
SANE_Bool paper_loaded;
unsigned int init_steps;
int loop = 0;
float feed_mm;
int loop;
DBG (DBG_proc, "gl841_eject_document\n");
@ -3442,13 +3443,13 @@ gl841_eject_document (Genesys_Device * dev)
RIE(gl841_get_paper_sensor(dev, &paper_loaded));
if (paper_loaded)
{
int loop = 300;
DBG (DBG_info,
"gl841_eject_document: paper still loaded\n");
/* force document TRUE, because it is definitely present */
dev->document = SANE_TRUE;
dev->scanhead_position_in_steps = 0;
loop = 300;
while (loop > 0) /* do not wait longer then 30 seconds */
{
@ -3475,6 +3476,12 @@ gl841_eject_document (Genesys_Device * dev)
}
}
feed_mm = SANE_UNFIX(dev->model->eject_feed);
if (dev->document)
{
feed_mm += SANE_UNFIX(dev->model->post_scan);
}
status = sanei_genesys_read_feed_steps(dev, &init_steps);
if (status != SANE_STATUS_GOOD)
{
@ -3485,7 +3492,7 @@ gl841_eject_document (Genesys_Device * dev)
}
/* now feed for extra <number> steps */
loop = 0;
while (loop < 300) /* do not wait longer then 30 seconds */
{
unsigned int steps;
@ -3502,7 +3509,7 @@ gl841_eject_document (Genesys_Device * dev)
DBG (DBG_info, "gl841_eject_document: init_steps: %d, steps: %d\n",
init_steps, steps);
if (steps > init_steps + 400)
if (steps > init_steps + (feed_mm * dev->motor.base_ydpi) / MM_PER_INCH)
{
break;
}
@ -3599,7 +3606,7 @@ gl841_detect_document_end (Genesys_Device * dev)
* we need to read the final bytes which are word per line * number of last lines
* to have doc leaving feeder */
lines =
(29 * dev->current_setup.yres) /
(SANE_UNFIX(dev->model->post_scan) * dev->current_setup.yres) /
MM_PER_INCH;
DBG (DBG_io, "gl841_detect_document_end: adding %d line to flush\n", lines);
/* number of bytes to read from scanner to get document out of it after
@ -3701,14 +3708,9 @@ gl841_end_scan (Genesys_Device * dev, Genesys_Register_Set * reg,
DBG (DBG_proc, "gl841_end_scan (check_stop = %d)\n", check_stop);
if (dev->model->is_sheetfed == SANE_TRUE && dev->document == SANE_TRUE)
if (dev->model->is_sheetfed == SANE_TRUE)
{
status = gl841_eject_document (dev);
if (status != SANE_STATUS_GOOD)
{
DBG (DBG_error, "gl841_end_scan: failed to eject document\n");
return status;
}
status = SANE_STATUS_GOOD;
}
else /* flat bed scanners */
{

Wyświetl plik

@ -398,7 +398,8 @@ typedef struct Genesys_Model
SANE_Int bpp_color_values[MAX_DPI]; /* possible depths in color mode */
SANE_Fixed x_offset; /* Start of scan area in mm */
SANE_Fixed y_offset; /* Start of scan area in mm */
SANE_Fixed y_offset; /* Start of scan area in mm (Amount of
feeding needed to get to the medium) */
SANE_Fixed x_size; /* Size of scan area in mm */
SANE_Fixed y_size; /* Size of scan area in mm */
@ -412,6 +413,11 @@ typedef struct Genesys_Model
SANE_Fixed y_offset_calib_ta; /* Start of white strip in TA mode in mm */
SANE_Fixed post_scan; /* Size of scan area after paper sensor stops
sensing document in mm */
SANE_Fixed eject_feed; /* Amount of feeding needed to eject document
after finishing scanning in mm */
/* Line-distance correction (in pixel at optical_ydpi) for CCD scanners */
SANE_Int ld_shift_r; /* red */
SANE_Int ld_shift_g; /* green */