calibration fixes

- make calibration work for both KV-SS080 and G4050
merge-requests/1/head
Stphane Voltz 2011-08-22 22:19:57 +02:00
rodzic 1e8c1043b3
commit ae95873837
2 zmienionych plików z 7 dodań i 7 usunięć

Wyświetl plik

@ -1262,7 +1262,7 @@ gl843_init_optical_regs_scan (Genesys_Device * dev,
dpiset = used_res * cksel;
/* start and end coordinate in optical dpi coordinates */
startx = (start + dev->sensor.dummy_pixel+dev->sensor.black_pixels)/cksel;
startx = (start + dev->sensor.dummy_pixel)/cksel;
used_pixels=pixels/cksel;
endx = startx + used_pixels;
@ -2430,9 +2430,9 @@ gl843_slow_back_home (Genesys_Device * dev, SANE_Bool wait_until_home)
SCAN_FLAG_IGNORE_LINE_DISTANCE);
/* set exposure to zero */
sanei_genesys_set_triple(local_reg,REG_EXPR,0);
sanei_genesys_set_triple(local_reg,REG_EXPG,0);
sanei_genesys_set_triple(local_reg,REG_EXPB,0);
sanei_genesys_set_double(local_reg,REG_EXPR,0);
sanei_genesys_set_double(local_reg,REG_EXPG,0);
sanei_genesys_set_double(local_reg,REG_EXPB,0);
/* clear scan and feed count */
RIE (sanei_genesys_write_register (dev, REG0D, REG0D_CLRLNCNT | REG0D_CLRMCNT));
@ -3239,10 +3239,10 @@ gl843_offset_calibration (Genesys_Device * dev)
lines=1;
bpp=8;
/* comptue divider factor to compute final pixels number */
/* compute divider factor to compute final pixels number */
dpihw=sanei_genesys_compute_dpihw(dev,dev->settings.xres);
factor=dev->sensor.optical_res/dpihw;
resolution=dev->settings.xres;
resolution=dpihw;
pixels = dev->sensor.sensor_pixels/factor;
black_pixels = dev->sensor.black_pixels / factor;
DBG (DBG_io, "gl843_offset_calibration: dpihw =%d\n", dpihw);

Wyświetl plik

@ -559,7 +559,7 @@ typedef struct {
* database of sensor profiles
*/
static Sensor_Profile sensors[]={
{CCD_KVSS080, 600, 8000, 0x000000, 0x00ffff, 0x03ffff, 5168, 0, 0x2a, 0, 0, 0, 0x00, 0x00, 0x0a, 0x20, 0x21},
{CCD_KVSS080, 600, 8000, 0x000000, 0x00ffff, 0x03ffff, 5168, 0, 0x2a, 0, 0, 0, 0x00, 0xc0, 0x00, 0x00, 0x00},
{CCD_G4050 , 600, 8016, 0x0001ff, 0x03ffff, 0x03ffff, 5168, 0, 0x2a, 0, 0, 0, 0x00, 0x40, 0x00, 0x5a, 0x00},
{CCD_G4050 , 1200, 56064, 0x03ffff, 0x0001ff, 0x0001ff, 5168, 0, 0x2a, 0, 0, 0, 0x11, 0x40, 0x00, 0x5f, 0xc0},
{CCD_G4050 , 2400, 56064, 0x03ffff, 0x000000, 0x000000, 5168, 0, 0x2a, 0, 0, 0, 0x11, 0x40, 0x00, 0x5f, 0xc0},