kopia lustrzana https://gitlab.com/sane-project/backends
Fixed problem, that has been reported in conjunction with
backtracking and sensor-speedup option.merge-requests/1/head
rodzic
64c2b9df30
commit
80f10fc89a
|
@ -41,6 +41,7 @@
|
||||||
* - added usb_FillLampRegs() - sets also PWMDutyCylce now
|
* - added usb_FillLampRegs() - sets also PWMDutyCylce now
|
||||||
* - added UMAX3450 TPA autodetection
|
* - added UMAX3450 TPA autodetection
|
||||||
* - 0.49 - a_bRegs is now part of the device structure
|
* - 0.49 - a_bRegs is now part of the device structure
|
||||||
|
* - fixed problem in backtracking, when speedup is enabled
|
||||||
* .
|
* .
|
||||||
* <hr>
|
* <hr>
|
||||||
* This file is part of the SANE package.
|
* This file is part of the SANE package.
|
||||||
|
@ -238,6 +239,7 @@ static SANE_Bool usb_WaitPos( Plustek_Device *dev, u_long to, SANE_Bool stay )
|
||||||
{
|
{
|
||||||
SANE_Bool retval;
|
SANE_Bool retval;
|
||||||
u_char value, mclk_div, mch;
|
u_char value, mclk_div, mch;
|
||||||
|
u_char r[2];
|
||||||
u_short ffs, step, min_ffs;
|
u_short ffs, step, min_ffs;
|
||||||
long dwTicks;
|
long dwTicks;
|
||||||
double maxf, fac, speed;
|
double maxf, fac, speed;
|
||||||
|
@ -321,9 +323,9 @@ static SANE_Bool usb_WaitPos( Plustek_Device *dev, u_long to, SANE_Bool stay )
|
||||||
if((int)fac > 25 )
|
if((int)fac > 25 )
|
||||||
usleep( 150 * 1000 );
|
usleep( 150 * 1000 );
|
||||||
|
|
||||||
regs[0x48] = (u_char)(ffs >> 8);
|
r[0] = (u_char)(ffs >> 8);
|
||||||
regs[0x49] = (u_char)(ffs & 0xFF);
|
r[1] = (u_char)(ffs & 0xFF);
|
||||||
sanei_lm983x_write(dev->fd, 0x48, ®s[0x48], 2, SANE_TRUE);
|
sanei_lm983x_write(dev->fd, 0x48, r, 2, SANE_TRUE);
|
||||||
if(ffs == min_ffs )
|
if(ffs == min_ffs )
|
||||||
ffs = 0;
|
ffs = 0;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1348,6 +1348,7 @@ static SANE_Bool usb_ScanReadImage( Plustek_Device *dev,
|
||||||
void *pBuf, u_long dwSize )
|
void *pBuf, u_long dwSize )
|
||||||
{
|
{
|
||||||
static u_long dwBytes = 0;
|
static u_long dwBytes = 0;
|
||||||
|
u_char *regs = dev->usbDev.a_bRegs;
|
||||||
SANE_Status res;
|
SANE_Status res;
|
||||||
|
|
||||||
DBG( _DBG_READ, "usb_ScanReadImage(%lu)\n", dwSize );
|
DBG( _DBG_READ, "usb_ScanReadImage(%lu)\n", dwSize );
|
||||||
|
@ -1362,6 +1363,9 @@ static SANE_Bool usb_ScanReadImage( Plustek_Device *dev,
|
||||||
DBG( _DBG_ERROR, "Nothing to read...\n" );
|
DBG( _DBG_ERROR, "Nothing to read...\n" );
|
||||||
return SANE_FALSE;
|
return SANE_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* restore the fast forward stepsize...*/
|
||||||
|
sanei_lm983x_write(dev->fd, 0x48, ®s[0x48], 2, SANE_TRUE);
|
||||||
}
|
}
|
||||||
/* HEINER: ADF */
|
/* HEINER: ADF */
|
||||||
#if 0
|
#if 0
|
||||||
|
|
Ładowanie…
Reference in New Issue