button support for HP3670

- button support for hp3670
- fix visibility of gl646_public_set_fe
- scanning area fix
merge-requests/1/head
Stphane Voltz 2010-02-16 06:44:36 +01:00
rodzic b37621d86a
commit b8a7f1ec2f
4 zmienionych plików z 15 dodań i 11 usunięć

Wyświetl plik

@ -3191,7 +3191,6 @@ genesys_send_shading_coefficient (Genesys_Device * dev)
case CCD_HP3670: case CCD_HP3670:
case CCD_HP2400: case CCD_HP2400:
target_code = 0xe000; target_code = 0xe000;
/* 0, 20 KO, -20 ~OK ?*/
o = -20; o = -20;
cmat[0] = 0; cmat[0] = 0;
cmat[1] = 1; cmat[1] = 1;

Wyświetl plik

@ -276,7 +276,7 @@ static Genesys_Sensor Sensor[] = {
{0x00, 0x0a, 0x0b, 0x0d} , {0x00, 0x0a, 0x0b, 0x0d} ,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x07, 0x20, 0x2a, 0x00, 0x00, 0xc0, 0x43} , {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x07, 0x20, 0x2a, 0x00, 0x00, 0xc0, 0x43} ,
{0x0f, 0x13, 0x17, 0x03, 0x07, 0x0b, 0x83, 0x00, 0x15, 0x05, 0x0a, 0x0f, 0x00}, {0x0f, 0x13, 0x17, 0x03, 0x07, 0x0b, 0x83, 0x00, 0x15, 0x05, 0x0a, 0x0f, 0x00},
2.10, 2.10, 2.10, 1.00, 1.00, 1.00,
NULL, NULL, NULL} NULL, NULL, NULL}
, ,
/* Syscan DP 665 */ /* Syscan DP 665 */
@ -1048,7 +1048,7 @@ static Genesys_Model hp3670c_model = {
{16, 8, 0}, /* possible depths in color mode */ {16, 8, 0}, /* possible depths in color mode */
SANE_FIX (8.5), /* Start of scan area in mm (x) */ SANE_FIX (8.5), /* Start of scan area in mm (x) */
SANE_FIX (12.0), /* Start of scan area in mm (y) */ SANE_FIX (11.0), /* Start of scan area in mm (y) */
SANE_FIX (215.9), /* Size of scan area in mm (x) */ SANE_FIX (215.9), /* Size of scan area in mm (x) */
SANE_FIX (300.0), /* Size of scan area in mm (y) */ SANE_FIX (300.0), /* Size of scan area in mm (y) */
@ -1083,8 +1083,9 @@ static Genesys_Model hp3670c_model = {
| GENESYS_FLAG_OFFSET_CALIBRATION | GENESYS_FLAG_OFFSET_CALIBRATION
| GENESYS_FLAG_SKIP_WARMUP | GENESYS_FLAG_SKIP_WARMUP
| GENESYS_FLAG_NO_CALIBRATION | GENESYS_FLAG_NO_CALIBRATION
/* | GENESYS_FLAG_STAGGERED_LINE */
| GENESYS_FLAG_CUSTOM_GAMMA, | GENESYS_FLAG_CUSTOM_GAMMA,
GENESYS_HAS_NO_BUTTONS, GENESYS_HAS_COPY_SW | GENESYS_HAS_EMAIL_SW | GENESYS_HAS_SCAN_SW,
20, 20,
200 200
}; };

Wyświetl plik

@ -1994,8 +1994,10 @@ gl646_set_fe (Genesys_Device * dev, uint8_t set, int dpi)
* @param dev device to set * @param dev device to set
* @param set action to execute * @param set action to execute
* @return error or SANE_STATUS_GOOD */ * @return error or SANE_STATUS_GOOD */
SANE_Status #ifndef UNIT_TESTING
gl646_public_set_fe (Genesys_Device * dev, uint8_t set) static
#endif
SANE_Status gl646_public_set_fe (Genesys_Device * dev, uint8_t set)
{ {
return gl646_set_fe(dev,set,dev->settings.yres); return gl646_set_fe(dev,set,dev->settings.yres);
} }
@ -4015,7 +4017,6 @@ gl646_coarse_gain_calibration (Genesys_Device * dev, int dpi)
float average[3]; float average[3];
Genesys_Settings settings; Genesys_Settings settings;
char title[32]; char title[32];
SANE_Bool half_ccd=dev->model->flags & GENESYS_FLAG_HALF_CCD_MODE;
if (dev->model->ccd_type == CIS_XP200) if (dev->model->ccd_type == CIS_XP200)
{ {
@ -4872,7 +4873,7 @@ gl646_update_hardware_sensors (Genesys_Scanner * session)
session->val[OPT_SCAN_SW].b = (value == 0x6c); session->val[OPT_SCAN_SW].b = (value == 0x6c);
break; break;
case GPO_HP3670: case GPO_HP3670:
session->val[OPT_SCAN_SW].b = ((value & 0x01) != 0); session->val[OPT_SCAN_SW].b = ((value & 0x20) == 0);
break; break;
default: default:
return SANE_STATUS_UNSUPPORTED; return SANE_STATUS_UNSUPPORTED;
@ -4889,7 +4890,7 @@ gl646_update_hardware_sensors (Genesys_Scanner * session)
session->val[OPT_EMAIL_SW].b = (value == 0x12); session->val[OPT_EMAIL_SW].b = (value == 0x12);
break; break;
case GPO_HP3670: case GPO_HP3670:
session->val[OPT_EMAIL_SW].b = ((value & 0x02) != 0); session->val[OPT_EMAIL_SW].b = ((value & 0x08) == 0);
break; break;
default: default:
return SANE_STATUS_UNSUPPORTED; return SANE_STATUS_UNSUPPORTED;
@ -4909,7 +4910,7 @@ gl646_update_hardware_sensors (Genesys_Scanner * session)
session->val[OPT_COPY_SW].b = (value == 0x5c); session->val[OPT_COPY_SW].b = (value == 0x5c);
break; break;
case GPO_HP3670: case GPO_HP3670:
session->val[OPT_COPY_SW].b = ((value & 0x02) != 0); session->val[OPT_COPY_SW].b = ((value & 0x10) == 0);
break; break;
default: default:
return SANE_STATUS_UNSUPPORTED; return SANE_STATUS_UNSUPPORTED;

Wyświetl plik

@ -2,7 +2,7 @@
Copyright (C) 2003-2004 Henning Meier-Geinitz <henning@meier-geinitz.de> Copyright (C) 2003-2004 Henning Meier-Geinitz <henning@meier-geinitz.de>
Copyright (C) 2004-2005 Gerhard Jaeger <gerhard@gjaeger.de> Copyright (C) 2004-2005 Gerhard Jaeger <gerhard@gjaeger.de>
Copyright (C) 2004-2009 Stéphane Voltz <stef.dev@free.fr> Copyright (C) 2004-2010 Stéphane Voltz <stef.dev@free.fr>
Copyright (C) 2005-2009 Pierre Willenbrock <pierre@pirsoft.dnsalias.org> Copyright (C) 2005-2009 Pierre Willenbrock <pierre@pirsoft.dnsalias.org>
This file is part of the SANE package. This file is part of the SANE package.
@ -274,6 +274,9 @@ static
#endif #endif
SANE_Status gl646_set_fe (Genesys_Device * dev, uint8_t set, int dpi); SANE_Status gl646_set_fe (Genesys_Device * dev, uint8_t set, int dpi);
#ifndef UNIT_TESTING
static
#endif
SANE_Status gl646_public_set_fe (Genesys_Device * dev, uint8_t set); SANE_Status gl646_public_set_fe (Genesys_Device * dev, uint8_t set);
/** /**