diff --git a/backend/genesys_devices.c b/backend/genesys_devices.c index 31a5d3b2c..f198979ba 100644 --- a/backend/genesys_devices.c +++ b/backend/genesys_devices.c @@ -437,7 +437,7 @@ static Genesys_Sensor Sensor[] = { 200, {0x00, 0x00, 0x00, 0x00}, /* reg 0x10 - 0x1d */ - {0x03, 0x48, 0x01, 0xff, 0x01, 0x7d, /* EXPR/EXPG/EXPB */ + {0x01, 0x80, 0x01, 0x80, 0x01, 0x80, /* EXPR/EXPG/EXPB */ 0x10, 0x08, 0x00, 0xff, 0x34, 0x00, 0x02, 0x04 }, /* reg 0x52 - 0x5e */ {0x03, 0x07, @@ -787,10 +787,10 @@ static Genesys_Motor Motor[] = { { /* power mode 0 */ { 2343, 1017, 32, 0.80}, /* full step */ { 4678, 2034, 16, 0.80}, /* half step */ - { 4*2034, 4*2034, 32, 0.80}, /* quarter step */ - /* extra values kept for documentation */ - { 2343, 864, 32, 0.80}, /* full step */ - { 2*1171, 2*648, 32, 0.80}, /* half step */ + { 4*2034, 4*2034, 16, 0.80}, /* quarter step */ + /* extra values kept for documentation + { 2343, 864, 32, 0.80}, full step + { 2*1171, 2*648, 32, 0.80}, half step */ }, }, }, @@ -935,7 +935,7 @@ static Genesys_Model canon_lide_100_model = { {16, 8, 0}, /* possible depths in color mode */ SANE_FIX (6.42), /* Start of scan area in mm (x) */ - SANE_FIX (10.0), /* Start of scan area in mm (y) */ + SANE_FIX (0.0), /* Start of scan area in mm (y) */ SANE_FIX (217.44), /* Size of scan area in mm (x) */ SANE_FIX (299.0), /* Size of scan area in mm (y) */ @@ -965,7 +965,7 @@ static Genesys_Model canon_lide_100_model = { GPO_CANONLIDE200, MOTOR_CANONLIDE100, GENESYS_FLAG_LAZY_INIT /* Which flags are needed for this scanner? */ - | GENESYS_FLAG_NO_CALIBRATION + | GENESYS_FLAG_NO_CALIBRATION | GENESYS_FLAG_SKIP_WARMUP | GENESYS_FLAG_OFFSET_CALIBRATION | GENESYS_FLAG_DARK_WHITE_CALIBRATION @@ -982,9 +982,8 @@ static Genesys_Model canon_lide_200_model = { GENESYS_GL847, NULL, - /* XXX STEF XXX add 75 dpi mode at least, look at 2400 for motor */ - {1200, 600, 300, 150, 0}, /* possible x-resolutions */ - {1200, 600, 300, 150, 0}, /* possible y-resolutions */ + {1200, 600, 300, 150, 75, 0}, /* possible x-resolutions */ + {1200, 600, 300, 150, 75, 0}, /* possible y-resolutions */ {16, 8, 0}, /* possible depths in gray mode */ {16, 8, 0}, /* possible depths in color mode */ diff --git a/backend/genesys_gl847.c b/backend/genesys_gl847.c index bab315f2c..42d08d450 100644 --- a/backend/genesys_gl847.c +++ b/backend/genesys_gl847.c @@ -4087,8 +4087,9 @@ static SANE_Status gl847_dummy_scan(Genesys_Device *dev) size_t size; uint8_t *line; float pixels; + int dpi=300; - DBG (DBG_proc, "%s start\n", __FUNCTION__); + DBGSTART; /* initial calibration reg values */ memcpy (dev->calib_reg, dev->reg, GENESYS_GL847_MAX_REGS * sizeof (Genesys_Register_Set)); @@ -4096,8 +4097,8 @@ static SANE_Status gl847_dummy_scan(Genesys_Device *dev) pixels= (16 * 300) / dev->sensor.optical_res; status = gl847_init_scan_regs (dev, dev->calib_reg, - 300, - 300, + dpi, + dpi, 0, 0, pixels, @@ -4122,8 +4123,8 @@ static SANE_Status gl847_dummy_scan(Genesys_Device *dev) if (!line) return SANE_STATUS_NO_MEM; - DBG (DBG_info, - "gl847_init: starting dummy data reading\n"); + DBG (DBG_info, "%s: starting dummy data reading\n", __FUNCTION__); + RIE (gl847_begin_scan (dev, dev->calib_reg, SANE_TRUE)); sanei_usb_set_timeout(1000);/* 1 second*/ @@ -4137,7 +4138,7 @@ static SANE_Status gl847_dummy_scan(Genesys_Device *dev) free(line); - DBG (DBG_proc, "%s completed\n", __FUNCTION__); + DBGCOMPLETED; return SANE_STATUS_GOOD; } @@ -4330,7 +4331,7 @@ gl847_init (Genesys_Device * dev) } /* to clear error condition on scan */ - /* gl847_dummy_scan(dev); */ + gl847_dummy_scan(dev); memcpy (dev->calib_reg, dev->reg, GENESYS_GL847_MAX_REGS * sizeof (Genesys_Register_Set)); diff --git a/backend/genesys_gl847.h b/backend/genesys_gl847.h index 2d3166225..e9ed88149 100644 --- a/backend/genesys_gl847.h +++ b/backend/genesys_gl847.h @@ -62,6 +62,9 @@ #include "../include/_stdint.h" #include "genesys.h" +#define DBGSTART DBG (DBG_proc, "%s start\n", __FUNCTION__); +#define DBGCOMPLETED DBG (DBG_proc, "%s completed\n", __FUNCTION__); + #define REG01 0x01 #define REG01_CISSET 0x80 #define REG01_DOGENB 0x40