Added calibration data for Benq 5150 / 5250, preliminary support for Epson Stylus CX 1500

merge-requests/1/head
Oliver Schwartz 2006-01-01 22:57:02 +00:00
rodzic 12d53d9d43
commit 9a24efc4ea
7 zmienionych plików z 4221 dodań i 7 usunięć

Wyświetl plik

@ -1,3 +1,11 @@
2006-01-01 Oliver Schwartz <Oliver.Schwartz@gmx.de>
* backend/snapscan-data.c backend/snapscan-options.c backend/snapscan.c
doc/descriptions/snascan.desc:
Added (static) calibration data for Benq 5150 / 5250
* backend/snapscan.h backend/snapscan.conf:
Added preliminary support for Epson Stylus CX 1500
2005-12-29 Henning Meier-Geinitz <henning@meier-geinitz.de>
* doc/descriptions-external/scanwit.desc: Added "(Acer)" to

Plik diff jest za duży Load Diff

Wyświetl plik

@ -384,10 +384,10 @@ static void init_options (SnapScan_Scanner * ps)
if (ps->pdev->model == PERFECTION1270)
{
po[OPT_HIGHQUALITY].cap |= SANE_CAP_INACTIVE;
ps->val[OPT_QUALITY_CAL].b = SANE_TRUE;
ps->val[OPT_HIGHQUALITY].b = SANE_TRUE;
ps->highquality=SANE_TRUE;
}
po[OPT_BRIGHTNESS].name = SANE_NAME_BRIGHTNESS;
po[OPT_BRIGHTNESS].title = SANE_TITLE_BRIGHTNESS;
po[OPT_BRIGHTNESS].desc = SANE_DESC_BRIGHTNESS;
@ -609,6 +609,12 @@ static void init_options (SnapScan_Scanner * ps)
ps->val[OPT_QUALITY_CAL].b = SANE_FALSE;
}
if (ps->pdev->model == PRISA5150)
{
po[OPT_QUALITY_CAL].cap |= SANE_CAP_INACTIVE;
ps->val[OPT_QUALITY_CAL].b = SANE_TRUE;
}
po[OPT_GAMMA_BIND].name = SANE_NAME_ANALOG_GAMMA_BIND;
po[OPT_GAMMA_BIND].title = SANE_TITLE_ANALOG_GAMMA_BIND;
po[OPT_GAMMA_BIND].desc = SANE_DESC_ANALOG_GAMMA_BIND;
@ -1257,7 +1263,7 @@ SANE_Status sane_control_option (SANE_Handle h,
pss->source = SRC_FLATBED;
pss->pdev->x_range.max = x_range_fb.max;
pss->pdev->y_range.max = y_range_fb.max;
}
}
else if (strcmp(v, src_tpo) == 0)
{
pss->source = SRC_TPO;
@ -1610,6 +1616,9 @@ SANE_Status sane_control_option (SANE_Handle h,
/*
* $Log$
* Revision 1.34 2006/01/01 22:57:01 oliver-guest
* Added calibration data for Benq 5150 / 5250, preliminary support for Epson Stylus CX 1500
*
* Revision 1.33 2005/12/04 15:03:00 oliver-guest
* Some fixes for Benq 5150
*

Wyświetl plik

@ -756,6 +756,25 @@ static SANE_Status send (SnapScan_Scanner *pss, u_char dtc, u_char dtcq)
return status;
}
#include "snapscan-data.c"
static SANE_Status send_calibration_5150(SnapScan_Scanner *pss)
{
static const int length = sizeof(calibration_data_5150);
SANE_Byte* buf = malloc (length + SEND_LENGTH);
SANE_Status status;
zero_buf (buf, SEND_LENGTH);
*buf = SEND;
*(buf + 2) = DTC_CALIBRATION;
*(buf + 6) = (length >> 16) & 0xff;
*(buf + 7) = (length >> 8) & 0xff;
*(buf + 8) = length & 0xff;
memcpy(buf + SEND_LENGTH, calibration_data_5150, length);
status = snapscan_cmd (
pss->pdev->bus, pss->fd, buf, SEND_LENGTH + length, NULL, NULL);
free (buf);
return status;
}
#define SET_WINDOW_LEN 10
#define SET_WINDOW_HEADER 10 /* header starts */
#define SET_WINDOW_HEADER_LEN 8
@ -1334,6 +1353,11 @@ static SANE_Status calibrate (SnapScan_Scanner *pss)
(pss->pdev->model == PERFECTION3490)) {
return calibrate_epson (pss);
}
if (pss->pdev->model == PRISA5150)
{
return send_calibration_5150(pss);
}
if ((pss->hconfig & HCFG_CAL_ALLOWED) && line_length) {
int num_lines = pss->phys_buf_sz / line_length;
@ -1425,6 +1449,7 @@ static SANE_Status download_firmware(SnapScan_Scanner * pss)
case PRISA5000E:
case PRISA5150:
case PRISA5300:
case STYLUS_CX1500:
/* ACER firmware files do not contain an info block */
fseek(fd, 0, SEEK_END);
bufLength = ftell(fd);
@ -1432,8 +1457,8 @@ static SANE_Status download_firmware(SnapScan_Scanner * pss)
break;
case PERFECTION1270:
case PERFECTION1670:
case PERFECTION2480:
case PERFECTION3490:
case PERFECTION2480:
case PERFECTION3490:
/* Epson firmware files contain an info block which
specifies the length of the firmware data. The
length information is stored at offset 0x64 from
@ -1488,6 +1513,9 @@ static SANE_Status download_firmware(SnapScan_Scanner * pss)
/*
* $Log$
* Revision 1.54 2006/01/01 22:57:01 oliver-guest
* Added calibration data for Benq 5150 / 5250, preliminary support for Epson Stylus CX 1500
*
* Revision 1.53 2005/12/05 20:38:22 oliver-guest
* Small bugfix for Benq 5150
*

Wyświetl plik

@ -65,7 +65,7 @@ usb 0x04a5 0x20fc
# Benq/Acer 5300
usb 0x04a5 0x20fe
# Benq 5250C
# Benq 5150C / 5250C
usb 0x04a5 0x2137
# Agfa 1236U
@ -110,3 +110,6 @@ usb 0x04b8 0x0121
# Epson Perfection 3490
usb 0x04b8 0x0122
# Epson Stylus CX 1500
usb 0x04b8 0x080c

Wyświetl plik

@ -106,6 +106,7 @@ typedef enum
PERFECTION1670, /* Epson Perfection 1670 - 1600 DPI */
PERFECTION2480, /* Epson Perfection 2480 - 2400 DPI */
PERFECTION3490, /* Epson Perfection 3490 - 3200 DPI */
STYLUS_CX1500, /* Epson Stylus CX 1500 - 600 DPI */
ARCUS1200 /* Agfa Arcus 1200 - 1200 DPI (rebadged Acer?) */
} SnapScan_Model;
@ -144,7 +145,8 @@ static struct SnapScan_Driver_desc drivers[] =
{PERFECTION1270, "Perfection 1270"},
{PERFECTION1670, "Perfection 1670"},
{PERFECTION2480, "Perfection 2480"},
{PERFECTION3490, "Perfection 3490"}
{PERFECTION3490, "Perfection 3490"},
{STYLUS_CX1500, "Stylus CX 1500"}
};
#define known_drivers ((int) (sizeof(drivers)/sizeof(drivers[0])))
@ -197,6 +199,7 @@ static struct SnapScan_Model_desc scanners[] =
{"EPSON Scanner", PERFECTION1670}, /* dummy entry to detect scanner */
{"EPSON Scanner1", PERFECTION2480}, /* dummy entry to detect scanner */
{"EPSON Scanner2", PERFECTION3490}, /* dummy entry to detect scanner */
{"EPSON MFP00", STYLUS_CX1500},
{"ARCUS 1200", ARCUS1200}
};
@ -419,6 +422,9 @@ struct snapscan_scanner
/*
* $Log$
* Revision 1.40 2006/01/01 22:57:01 oliver-guest
* Added calibration data for Benq 5150 / 5250, preliminary support for Epson Stylus CX 1500
*
* Revision 1.39 2005/12/04 15:03:00 oliver-guest
* Some fixes for Benq 5150
*

Wyświetl plik

@ -190,6 +190,16 @@
:status :good
:comment "USB ID 0x04a5,0x20f8: Color / grayscale scans working up to 1200 DPI"
:model "5150"
:interface "USB"
:status :basic
:comment "Calibration algorithm unknown"
:model "5250"
:interface "USB"
:status :basic
:comment "Same hardware as 5150 (?)"
:model "5300"
:interface "USB"
:status :basic